Skip to content

Commit

Permalink
restructure matrix build
Browse files Browse the repository at this point in the history
  • Loading branch information
badaix committed Jan 13, 2024
1 parent d5fa311 commit 3514be3
Showing 1 changed file with 18 additions and 13 deletions.
31 changes: 18 additions & 13 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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


Expand Down

0 comments on commit 3514be3

Please sign in to comment.