Skip to content

Commit

Permalink
actions: split build and test jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
zeha committed Nov 12, 2023
1 parent 6cd6df9 commit b14c780
Showing 1 changed file with 35 additions and 13 deletions.
48 changes: 35 additions & 13 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand All @@ -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:
Expand Down

0 comments on commit b14c780

Please sign in to comment.