From 3514be327e18e115c7b6e1582a4f1fa9caf87c93 Mon Sep 17 00:00:00 2001 From: badaix Date: Sat, 13 Jan 2024 12:36:51 +0100 Subject: [PATCH] restructure matrix build --- .github/workflows/package.yml | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/.github/workflows/package.yml b/.github/workflows/package.yml index 73f5a90f..94739544 100644 --- a/.github/workflows/package.yml +++ b/.github/workflows/package.yml @@ -12,28 +12,33 @@ jobs: strategy: fail-fast: false matrix: - image: + debian: - bullseye - bookworm - os: - - ubuntu-latest - - self-hosted-rpi5 + arch: + - amd64 + - armhf + - arm64 include: - - os: ubuntu-latest - arch: "amd64" + - arch: "amd64" + os: ubuntu-latest image_prefix: "debian:" image_suffix: "" - - os: self-hosted-rpi5 - arch: "arm64" + - arch: "armhf" + os: self-hosted-rpi5 + image_prefix: "badaix/raspios-" + image_suffix: "-armhf-lite" + - arch: "arm64" + os: self-hosted-rpi5 image_prefix: "badaix/raspios-" image_suffix: "-arm64-lite" runs-on: ${{ matrix.os }} - name: deb (${{ matrix.arch }}, ${{ matrix.image }}) + name: deb (${{ matrix.arch }}, ${{ matrix.debian }}) timeout-minutes: 240 container: - image: ${{matrix.image_prefix}}${{matrix.image}}${{matrix.image_suffix}} + image: ${{matrix.image_prefix}}${{matrix.debian}}${{matrix.image_suffix}} steps: - name: Get dependencies run: apt-get update && apt-get install -yq wget debhelper build-essential cmake git rename libatomic1 libasound2-dev libsoxr-dev libvorbisidec-dev libvorbis-dev libflac-dev libopus-dev alsa-utils libpulse-dev libavahi-client-dev avahi-daemon libexpat1-dev python3 ccache @@ -71,8 +76,8 @@ jobs: with: # TODO: use environment variable $HOME/.ccache path: /home/runner/.ccache - key: ${{ matrix.os }}-${{ matrix.image }}-ccache-${{ github.sha }} - restore-keys: ${{ matrix.os }}-${{ matrix.image }}-ccache- + key: ${{ matrix.os }}-${{ matrix.debian }}-ccache-${{ github.sha }} + restore-keys: ${{ matrix.os }}-${{ matrix.debian }}-ccache- - name: Create deb package env: # TODO: use environment variable $HOME/.ccache @@ -85,7 +90,7 @@ jobs: - name: Archive artifacts uses: actions/upload-artifact@v3 with: - name: snapcast_${{ matrix.arch }}-debian-${{matrix.image}}-${{ github.sha }} + name: snapcast_${{ matrix.arch }}-debian-${{matrix.debian}}-${{ github.sha }} path: ${{env.PARENT_DIR}}/snap*_${{ matrix.arch }}.deb