#6045 add Ubuntu latest compatible Docker image

This commit is contained in:
khalyomede 2023-11-22 15:44:32 +01:00
parent a134484853
commit 3b1cf62ad2
3 changed files with 43 additions and 0 deletions

View file

@ -4,6 +4,25 @@ on:
name: Docker images tests
jobs:
ubuntu-latest-nightly:
name: ubuntu-latest-nightly
runs-on: [ubuntu-20.04]
timeout-minutes: 120
steps:
- uses: actions/checkout@v3
- name: Copy example docker file
run: cp docker/ubuntu-latest-nightly/docker-compose.example.yml docker/ubuntu-latest-nightly/docker-compose.yml
- name: Build image
run: docker-compose -f docker/ubuntu-latest-nightly/docker-compose.yml build
- name: Run hello world test
run: docker-compose -f docker/ubuntu-latest-nightly/docker-compose.yml run roc examples/helloWorld.roc
- name: Run C platform test
run: docker-compose -f docker/ubuntu-latest-nightly/docker-compose.yml run roc examples/platform-switching/rocLovesC.roc
ubuntu-2204-nightly:
name: ubuntu-2204-nightly
runs-on: [ubuntu-20.04]

View file

@ -0,0 +1,16 @@
FROM ubuntu:latest
RUN apt-get update --fix-missing
RUN apt-get upgrade --yes
RUN apt-get install --yes \
wget \
libc-dev \
binutils \
build-essential \
clang
RUN wget -q -O roc.tar.gz https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-linux_x86_64-latest.tar.gz
RUN mkdir /usr/lib/roc
# --strip-components=1 not needed once https://github.com/roc-lang/roc/issues/4118 is solved.
RUN tar -xvz -f roc.tar.gz --directory /usr/lib/roc --strip-components=1
ENV PATH="$PATH:/usr/lib/roc"

View file

@ -0,0 +1,8 @@
version: "3"
services:
roc:
build: .
entrypoint: roc
working_dir: /home/ubuntu/app
volumes:
- ../../:/home/ubuntu/app