diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 0000000000..d543aaf905 --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,103 @@ +on: + workflow_dispatch: + +name: Docker images tests + +jobs: + nightly-ubuntu-latest: + name: nightly-ubuntu-latest + runs-on: [ubuntu-22.04] + timeout-minutes: 120 + steps: + - uses: actions/checkout@v3 + + - name: Copy example docker file + run: cp docker/nightly-ubuntu-latest/docker-compose.example.yml docker/nightly-ubuntu-latest/docker-compose.yml + + - name: Build image + run: docker-compose -f docker/nightly-ubuntu-latest/docker-compose.yml build + + - name: Run hello world test + run: docker-compose -f docker/nightly-ubuntu-latest/docker-compose.yml run roc examples/helloWorld.roc + + + nightly-ubuntu-2204: + name: nightly-ubuntu-2204 + runs-on: [ubuntu-22.04] + timeout-minutes: 120 + steps: + - uses: actions/checkout@v3 + + - name: Copy example docker file + run: cp docker/nightly-ubuntu-2204/docker-compose.example.yml docker/nightly-ubuntu-2204/docker-compose.yml + + - name: Build image + run: docker-compose -f docker/nightly-ubuntu-2204/docker-compose.yml build + + - name: Run hello world test + run: docker-compose -f docker/nightly-ubuntu-2204/docker-compose.yml run roc examples/helloWorld.roc + + nightly-ubuntu-2004: + name: nightly-ubuntu-2004 + runs-on: [ubuntu-22.04] + timeout-minutes: 120 + steps: + - uses: actions/checkout@v3 + + - name: Copy example docker file + run: cp docker/nightly-ubuntu-2004/docker-compose.example.yml docker/nightly-ubuntu-2004/docker-compose.yml + + - name: Build image + run: docker-compose -f docker/nightly-ubuntu-2004/docker-compose.yml build + + - name: Run hello world test + run: docker-compose -f docker/nightly-ubuntu-2004/docker-compose.yml run roc examples/helloWorld.roc + + nightly-debian-latest: + name: nightly-debian-latest + runs-on: [ubuntu-22.04] + timeout-minutes: 120 + steps: + - uses: actions/checkout@v3 + + - name: Copy example docker file + run: cp docker/nightly-debian-latest/docker-compose.example.yml docker/nightly-debian-latest/docker-compose.yml + + - name: Build image + run: docker-compose -f docker/nightly-debian-latest/docker-compose.yml build + + - name: Run hello world test + run: docker-compose -f docker/nightly-debian-latest/docker-compose.yml run roc examples/helloWorld.roc + + nightly-debian-bookworm: + name: nightly-debian-bookworm + runs-on: [ubuntu-22.04] + timeout-minutes: 120 + steps: + - uses: actions/checkout@v3 + + - name: Copy example docker file + run: cp docker/nightly-debian-bookworm/docker-compose.example.yml docker/nightly-debian-bookworm/docker-compose.yml + + - name: Build image + run: docker-compose -f docker/nightly-debian-bookworm/docker-compose.yml build + + - name: Run hello world test + run: docker-compose -f docker/nightly-debian-bookworm/docker-compose.yml run roc examples/helloWorld.roc + + nightly-debian-buster: + name: nightly-debian-buster + runs-on: [ubuntu-22.04] + timeout-minutes: 120 + steps: + - uses: actions/checkout@v3 + + - name: Copy example docker file + run: cp docker/nightly-debian-buster/docker-compose.example.yml docker/nightly-debian-buster/docker-compose.yml + + - name: Build image + run: docker-compose -f docker/nightly-debian-buster/docker-compose.yml build + + - name: Run hello world test + run: docker-compose -f docker/nightly-debian-buster/docker-compose.yml run roc examples/helloWorld.roc + diff --git a/docker/nightly-debian-bookworm/Dockerfile b/docker/nightly-debian-bookworm/Dockerfile new file mode 100644 index 0000000000..1e5ad905f0 --- /dev/null +++ b/docker/nightly-debian-bookworm/Dockerfile @@ -0,0 +1,17 @@ +FROM debian:bookworm + +RUN apt-get update --fix-missing +RUN apt-get upgrade --yes + +RUN apt-get install --yes wget + +# you can leave out libc-dev and binutils if you don't need the REPL +RUN apt-get install --yes libc-dev binutils + +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 + +RUN tar -xvz -f roc.tar.gz --directory /usr/lib/roc --strip-components=1 + +ENV PATH="$PATH:/usr/lib/roc" diff --git a/docker/nightly-debian-bookworm/docker-compose.example.yml b/docker/nightly-debian-bookworm/docker-compose.example.yml new file mode 100644 index 0000000000..d33c7ff31f --- /dev/null +++ b/docker/nightly-debian-bookworm/docker-compose.example.yml @@ -0,0 +1,8 @@ +version: "3" +services: + roc: + build: . + entrypoint: roc + working_dir: /home/ubuntu/app + volumes: + - ../../:/home/ubuntu/app diff --git a/docker/nightly-debian-buster/Dockerfile b/docker/nightly-debian-buster/Dockerfile new file mode 100644 index 0000000000..c847fcd211 --- /dev/null +++ b/docker/nightly-debian-buster/Dockerfile @@ -0,0 +1,18 @@ +FROM debian:buster + +RUN apt-get update --fix-missing +RUN apt-get upgrade --yes + +RUN apt-get install --yes wget + +# you can leave out libc-dev and binutils if you don't need the REPL +RUN apt-get install --yes libc-dev binutils + +RUN wget -q -O roc.tar.gz https://github.com/roc-lang/roc/releases/download/nightly/roc_nightly-old_linux_x86_64-latest.tar.gz + +RUN mkdir /usr/lib/roc + +RUN tar -xvz -f roc.tar.gz --directory /usr/lib/roc --strip-components=1 + +ENV PATH="$PATH:/usr/lib/roc" + diff --git a/docker/nightly-debian-buster/docker-compose.example.yml b/docker/nightly-debian-buster/docker-compose.example.yml new file mode 100644 index 0000000000..d33c7ff31f --- /dev/null +++ b/docker/nightly-debian-buster/docker-compose.example.yml @@ -0,0 +1,8 @@ +version: "3" +services: + roc: + build: . + entrypoint: roc + working_dir: /home/ubuntu/app + volumes: + - ../../:/home/ubuntu/app diff --git a/docker/nightly-debian-latest/Dockerfile b/docker/nightly-debian-latest/Dockerfile new file mode 100644 index 0000000000..d2bab43987 --- /dev/null +++ b/docker/nightly-debian-latest/Dockerfile @@ -0,0 +1,17 @@ +FROM debian:latest + +RUN apt-get update --fix-missing +RUN apt-get upgrade --yes + +RUN apt-get install --yes wget + +# you can leave out libc-dev and binutils if you don't need the REPL +RUN apt-get install --yes libc-dev binutils + +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 + +RUN tar -xvz -f roc.tar.gz --directory /usr/lib/roc --strip-components=1 + +ENV PATH="$PATH:/usr/lib/roc" diff --git a/docker/nightly-debian-latest/docker-compose.example.yml b/docker/nightly-debian-latest/docker-compose.example.yml new file mode 100644 index 0000000000..d33c7ff31f --- /dev/null +++ b/docker/nightly-debian-latest/docker-compose.example.yml @@ -0,0 +1,8 @@ +version: "3" +services: + roc: + build: . + entrypoint: roc + working_dir: /home/ubuntu/app + volumes: + - ../../:/home/ubuntu/app diff --git a/docker/nightly-ubuntu-2004/Dockerfile b/docker/nightly-ubuntu-2004/Dockerfile new file mode 100644 index 0000000000..81a047e860 --- /dev/null +++ b/docker/nightly-ubuntu-2004/Dockerfile @@ -0,0 +1,17 @@ +FROM ubuntu:20.04 + +RUN apt-get update --fix-missing +RUN apt-get upgrade --yes + +RUN apt-get install --yes wget + +# you can leave out libc-dev and binutils if you don't need the REPL +RUN apt-get install --yes libc-dev binutils + +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 + +RUN tar -xvz -f roc.tar.gz --directory /usr/lib/roc --strip-components=1 + +ENV PATH="$PATH:/usr/lib/roc" diff --git a/docker/nightly-ubuntu-2004/docker-compose.example.yml b/docker/nightly-ubuntu-2004/docker-compose.example.yml new file mode 100644 index 0000000000..d33c7ff31f --- /dev/null +++ b/docker/nightly-ubuntu-2004/docker-compose.example.yml @@ -0,0 +1,8 @@ +version: "3" +services: + roc: + build: . + entrypoint: roc + working_dir: /home/ubuntu/app + volumes: + - ../../:/home/ubuntu/app diff --git a/docker/nightly-ubuntu-2204/Dockerfile b/docker/nightly-ubuntu-2204/Dockerfile new file mode 100644 index 0000000000..fab49301bc --- /dev/null +++ b/docker/nightly-ubuntu-2204/Dockerfile @@ -0,0 +1,17 @@ +FROM ubuntu:22.04 + +RUN apt-get update --fix-missing +RUN apt-get upgrade --yes + +RUN apt-get install --yes wget + +# you can leave out libc-dev and binutils if you don't need the REPL +RUN apt-get install --yes libc-dev binutils + +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 + +RUN tar -xvz -f roc.tar.gz --directory /usr/lib/roc --strip-components=1 + +ENV PATH="$PATH:/usr/lib/roc" diff --git a/docker/nightly-ubuntu-2204/docker-compose.example.yml b/docker/nightly-ubuntu-2204/docker-compose.example.yml new file mode 100644 index 0000000000..d33c7ff31f --- /dev/null +++ b/docker/nightly-ubuntu-2204/docker-compose.example.yml @@ -0,0 +1,8 @@ +version: "3" +services: + roc: + build: . + entrypoint: roc + working_dir: /home/ubuntu/app + volumes: + - ../../:/home/ubuntu/app diff --git a/docker/nightly-ubuntu-latest/Dockerfile b/docker/nightly-ubuntu-latest/Dockerfile new file mode 100644 index 0000000000..fa65a87928 --- /dev/null +++ b/docker/nightly-ubuntu-latest/Dockerfile @@ -0,0 +1,17 @@ +FROM ubuntu:latest + +RUN apt-get update --fix-missing +RUN apt-get upgrade --yes + +RUN apt-get install --yes wget + +# you can leave out libc-dev and binutils if you don't need the REPL +RUN apt-get install --yes libc-dev binutils + +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 + +RUN tar -xvz -f roc.tar.gz --directory /usr/lib/roc --strip-components=1 + +ENV PATH="$PATH:/usr/lib/roc" diff --git a/docker/nightly-ubuntu-latest/docker-compose.example.yml b/docker/nightly-ubuntu-latest/docker-compose.example.yml new file mode 100644 index 0000000000..d33c7ff31f --- /dev/null +++ b/docker/nightly-ubuntu-latest/docker-compose.example.yml @@ -0,0 +1,8 @@ +version: "3" +services: + roc: + build: . + entrypoint: roc + working_dir: /home/ubuntu/app + volumes: + - ../../:/home/ubuntu/app