From c48e39d8ee9156b1816ea4c1bf5efb6f855a33e5 Mon Sep 17 00:00:00 2001 From: Jason Gross Date: Mon, 17 Jun 2024 21:08:17 -0700 Subject: [PATCH] [CI] [debian] Containerize testing of standalone (#1924) This should hopefully deal with https://github.com/mit-plv/fiat-crypto/issues/1394#issuecomment-2160967034 --- .github/workflows/coq-debian.yml | 46 +++++++++++++++++++++++++------- 1 file changed, 37 insertions(+), 9 deletions(-) diff --git a/.github/workflows/coq-debian.yml b/.github/workflows/coq-debian.yml index cf066bf94d..042e856e9e 100644 --- a/.github/workflows/coq-debian.yml +++ b/.github/workflows/coq-debian.yml @@ -102,7 +102,7 @@ jobs: - name: display per-line timing info run: etc/ci/github-actions-display-per-line-timing.sh - test-standalone: + test-standalone-host: strategy: fail-fast: false matrix: @@ -135,10 +135,34 @@ jobs: printf '::warning::Debian ${{ matrix.debian }} binary does not run on ubuntu: %s\n' \ "$(etc/ci/test-run-fiat-crypto.sh dist/fiat_crypto 2>&1 | tr '\n' '~' | sed 's/~/%0A/g')"; } - - name: setup Debian chroot - run: etc/ci/setup-debian-chroot.sh "${{ matrix.debian }}" + + test-standalone-container: + strategy: + fail-fast: false + matrix: + include: + - debian: sid + #- debian: bookworm # restore once 8.17 lands in Debian stable + runs-on: ubuntu-latest + container: debian:${{ matrix.debian }} + needs: build + steps: + - uses: actions/checkout@v4 + - name: Download standalone ${{ matrix.debian }} + uses: actions/download-artifact@v4 + with: + name: standalone-${{ matrix.debian }} + path: dist/ + - name: install system dependencies + run: | + apt-get -o Acquire::Retries=30 update -y + apt-get -q -y --allow-unauthenticated -o Acquire::Retries=30 install sudo time file + - name: List files + run: find dist + - run: chmod +x dist/fiat_crypto + - name: host build params + run: etc/ci/describe-system-config.sh - name: Test files (container) - shell: in-debian-chroot.sh {0} run: | echo "::group::file fiat_crypto" file dist/fiat_crypto @@ -187,18 +211,22 @@ jobs: debian-check-all: runs-on: ubuntu-latest - needs: [build, test-standalone, publish-standalone-dry-run] + needs: [build, test-standalone-host, test-standalone-container, publish-standalone-dry-run] if: always() steps: - run: echo 'build passed' if: ${{ needs.build.result == 'success' }} - - run: echo 'test-standalone passed' - if: ${{ needs.test-standalone.result == 'success' }} + - run: echo 'test-standalone-host passed' + if: ${{ needs.test-standalone-host.result == 'success' }} + - run: echo 'test-standalone-container passed' + if: ${{ needs.test-standalone-container.result == 'success' }} - run: echo 'publish-standalone-dry-run passed' if: ${{ needs.publish-standalone-dry-run.result == 'success' }} - run: echo 'build failed' && false if: ${{ needs.build.result != 'success' }} - - run: echo 'test-standalone failed' && false - if: ${{ needs.test-standalone.result != 'success' }} + - run: echo 'test-standalone-host failed' && false + if: ${{ needs.test-standalone-host.result != 'success' }} + - run: echo 'test-standalone-container failed' && false + if: ${{ needs.test-standalone-container.result != 'success' }} - run: echo 'publish-standalone-dry-run failed' && false if: ${{ needs.publish-standalone-dry-run.result != 'success' }}