From b14c7807e5435021328f980825a2052d56b67260 Mon Sep 17 00:00:00 2001 From: Chris Hofstaedtler Date: Sun, 12 Nov 2023 17:36:01 +0100 Subject: [PATCH] actions: split build and test jobs --- .github/workflows/test-build.yml | 48 +++++++++++++++++++++++--------- 1 file changed, 35 insertions(+), 13 deletions(-) diff --git a/.github/workflows/test-build.yml b/.github/workflows/test-build.yml index 35e2e601..392a0d27 100644 --- a/.github/workflows/test-build.yml +++ b/.github/workflows/test-build.yml @@ -5,8 +5,38 @@ concurrency: group: "${{ github.ref }}" cancel-in-progress: true jobs: + build-debian: + strategy: + # Keep other matrix jobs running, even if one fails. + fail-fast: false + matrix: + host_release: + - unstable + - trixie + - bookworm + - bullseye + + # We want a working shell, qemu, python and docker. Specific version should not matter (much). + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - run: ./tests/gha-build-deb.sh + name: "Build .deb for ${{matrix.host_release}}" + env: + HOST_RELEASE: ${{matrix.host_release}} + + - name: Archive built .deb + uses: actions/upload-artifact@v3 + with: + name: deb-${{matrix.host_release}} + if-no-files-found: error + path: | + *.deb - debian: + test-debian: + needs: build-debian strategy: # Keep other matrix jobs running, even if one fails. fail-fast: false @@ -38,10 +68,10 @@ jobs: steps: - uses: actions/checkout@v4 - - run: ./tests/gha-build-deb.sh - name: "Build .deb for ${{matrix.host_release}}" - env: - HOST_RELEASE: ${{matrix.host_release}} + - name: Download built deb + uses: actions/download-artifact@v3 + with: + name: deb-${{matrix.host_release}} - run: ./tests/build-vm-and-test.sh setup name: "Setup test environment" @@ -58,14 +88,6 @@ jobs: env: RELEASE: ${{matrix.release}} - - name: Archive built .deb - uses: actions/upload-artifact@v3 - with: - name: deb-${{matrix.host_release}} - if-no-files-found: error - path: | - *.deb - - name: Archive VM test results uses: actions/upload-artifact@v3 with: