diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..6ebaa5ae --- /dev/null +++ b/.dockerignore @@ -0,0 +1,6 @@ +_build +.git +async +mirage +h2-async.opam +h2-mirage.opam diff --git a/.github/workflows/test_32bit.yml b/.github/workflows/test_32bit.yml new file mode 100644 index 00000000..9bd261bc --- /dev/null +++ b/.github/workflows/test_32bit.yml @@ -0,0 +1,28 @@ +name: 'Build & Test (32 bit)' +on: + pull_request: + push: + branches: + - master + +jobs: + docker-32bit: + runs-on: ubuntu-latest + container: + image: ocurrent/opam@sha256:e7a75342370514e1adf20c6c95102bb37dddefd5ad205c457e4aa72012283960 + steps: + - uses: actions/checkout@v1 + - name: Print the result of `uname -a` + run: uname -a + - name: apt-get update + run: sudo apt-get update && sudo apt-get upgrade -y + - name: opam update + run: opam update && opam upgrade + - name: opam depext conf-pkg-config conf-gmp conf-m4 + run: opam pin add . -n + - name: Install OPAM dependencies + run: opam install -y --deps-only . -t + - name: + run: opam install -y --deps-only . -t + - name: + run: opam exec -- dune runtest diff --git a/Dockerfile.32bit b/Dockerfile.32bit new file mode 100644 index 00000000..1d3ec89b --- /dev/null +++ b/Dockerfile.32bit @@ -0,0 +1,17 @@ +# https://discuss.ocaml.org/t/how-to-generate-a-32-bit-binary-on-a-64-bit-system/6163/6 +FROM ocurrent/opam@sha256:e7a75342370514e1adf20c6c95102bb37dddefd5ad205c457e4aa72012283960 + +WORKDIR /home/opam/src + +RUN sudo apt-get update && sudo apt-get upgrade -y +RUN sudo apt-get install vim -y + +RUN opam update && opam upgrade + +RUN opam depext conf-pkg-config conf-gmp conf-m4 +RUN opam install h2 h2-lwt-unix --deps-only -t + +COPY --chown=opam . /home/opam/src + +# ENTRYPOINT +