diff --git a/.github/workflows/coq-debian.yml b/.github/workflows/coq-debian.yml index c50d3a129a..ef1a72d9f9 100644 --- a/.github/workflows/coq-debian.yml +++ b/.github/workflows/coq-debian.yml @@ -44,7 +44,6 @@ jobs: sudo mkdir -p "/chroot/$(pwd)" sudo chown "$(id -u):$(id -g)" "/chroot/$(pwd)" sudo mount --bind "$(pwd)" "/chroot/$(pwd)" - - name: host build params run: | "$(pwd)/etc/ci/describe-system-config.sh" @@ -64,19 +63,18 @@ jobs: run: | sudo chroot /chroot setpriv --reuid "$(id -u)" --regid "$(id -g)" --init-groups \ "$(pwd)/etc/ci/github-actions-make.sh" -C "$(pwd)" -j2 generated-files - if: github.event_name == 'pull_request' || ${{ matrix.env.COQ_VERSION }} != 'master' - run: tar -czvf generated-files.tgz fiat-*/ if: ${{ failure() }} - name: upload generated files uses: actions/upload-artifact@v3 with: - name: generated-files-${{ matrix.env.COQ_VERSION }} + name: generated-files-${{ matrix.env.DEBIAN }} path: generated-files.tgz if: ${{ failure() }} - name: upload OCaml files uses: actions/upload-artifact@v3 with: - name: ExtractionOCaml-${{ matrix.env.COQ_VERSION }} + name: ExtractionOCaml-${{ matrix.env.DEBIAN }} path: src/ExtractionOCaml if: always () - name: standalone-haskell @@ -86,7 +84,7 @@ jobs: - name: upload Haskell files uses: actions/upload-artifact@v3 with: - name: ExtractionHaskell-${{ matrix.env.COQ_VERSION }} + name: ExtractionHaskell-${{ matrix.env.DEBIAN }} path: src/ExtractionHaskell if: always () - name: display timing info @@ -107,14 +105,30 @@ jobs: uses: actions/checkout@v3 with: submodules: recursive + - name: bootstrap + run: | + sudo mkdir /chroot + sudo apt-get -q -y -o Acquire::Retries=30 update + sudo apt-get -q -y -o Acquire::Retries=30 install debootstrap + sudo debootstrap --variant=minbase "$DEBIAN" /chroot http://debian-archive.trafficmanager.net/debian/ || cat /tmp/tmp.*/debootstrap/debootstrap.log + sudo mount proc /chroot/proc -t proc + sudo mount sysfs /chroot/sys -t sysfs + sudo chroot /chroot apt-get -q -y -o Acquire::Retries=30 install ca-certificates git make time jq python3 python-is-python3 ocaml coq libcoq-core-ocaml-dev libfindlib-ocaml-dev ocaml-findlib cabal-install + sudo chroot /chroot groupadd -g "$(id -g)" "$(id -g -n)" + sudo chroot /chroot useradd -g "$(id -g)" -u "$(id -u)" "$(id -u -n)" + sudo mkdir -p "/chroot/$(pwd)" + sudo chown "$(id -u):$(id -g)" "/chroot/$(pwd)" + sudo mount --bind "$(pwd)" "/chroot/$(pwd)" - name: Download a Build Artifact uses: actions/download-artifact@v3 with: - name: "ExtractionOCaml-Ubuntu LTS" + name: ExtractionOCaml-${{ matrix.env.DEBIAN }} path: src/ExtractionOCaml - name: make binaries executable run: chmod +x src/ExtractionOCaml/* - name: make only-test-amd64-files - run: etc/ci/github-actions-make.sh -j2 only-test-amd64-files SLOWEST_FIRST=1 + run: | + sudo chroot /chroot setpriv --reuid "$(id -u)" --regid "$(id -g)" --init-groups \ + "$(pwd)/etc/ci/github-actions-make.sh" -C "$(pwd)" -j2 only-test-amd64-files SLOWEST_FIRST=1 env: ALLOW_DIFF: 1