diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..6b8710a71 --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +.git diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8a58eaeec..65196d608 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,6 +9,22 @@ on: - master jobs: + Docker: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: docker/metadata-action@v3 + id: metadata + with: + images: ghcr.io/${{ github.repository }} + - uses: int128/kaniko-action@v1 + with: + push: false + tags: ${{ steps.metadata.outputs.tags }} + labels: ${{ steps.metadata.outputs.labels }} + cache: false + cache-repository: ghcr.io/${{ github.repository }}/cache + Windows-mingw: name: "Windows - ${{ matrix.msystem }}" runs-on: windows-latest diff --git a/Dockerfile b/Dockerfile index 56aea1566..7f4f26ff8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,21 @@ -FROM gcc:9.3.0 +FROM gcc:latest + +ARG ENABLE_SINGLE_HOST="--enable-single-host" +ARG ENABLE_MARCH="--enable-march=native" +ARG ENABLE_DCLIB="--enable-dynamic-clib" +ARG NPROC=1 + WORKDIR gambit_install + COPY . . -RUN make clean && ./configure --enable-single-host && make -j$(nproc) && make check && make modules && make doc && make install + +RUN ./configure $ENABLE_SINGLE_HOST $ENABLE_MARCH $ENABLE_DCLIB +RUN make -j${NPROC} +RUN make check +RUN make doc +RUN make install +RUN make clean + RUN ln -s /gambit_install/gsi/gsi /bin/gsi && ln -s /gambit_install/gsc/gsc /bin/gsc + WORKDIR /workdir