diff --git a/.github/matrix.yml b/.github/matrix.yml new file mode 100644 index 000000000..89647d524 --- /dev/null +++ b/.github/matrix.yml @@ -0,0 +1,82 @@ +target: + - name: windows-2022-x64 + runs-on: windows-latest-16-cores + package-os: windows-x64 + + - name: macos-14-arm64 + runs-on: macos-14 + package-os: macos-arm64 + + - name: macos-14-x64 + runs-on: macos-14-large + package-os: macos-x64 + + - name: debian-13-x86_64 + runs-on: ubuntu-latest + container: debian:trixie-slim + + - name: debian-12-x86_64 + runs-on: ubuntu-latest + container: debian:bookworm-slim + + - name: ubuntu-25.04-x86_64 + runs-on: ubuntu-latest + container: ubuntu:25.04 + + - name: ubuntu-24.04-x86_64 + runs-on: ubuntu-latest + container: ubuntu:24.04 + + - name: ubuntu-24.04-arm64 + runs-on: ubuntu-24.04-8-core-arm64 + container: ubuntu:24.04 + + - name: ubuntu-22.04-x86_64 + runs-on: ubuntu-latest + container: ubuntu:22.04 + + - name: ubuntu-22.04-arm64 + runs-on: ubuntu-24.04-8-core-arm64 + container: ubuntu:22.04 + + - name: fedora-42-arm64 + runs-on: ubuntu-24.04-8-core-arm64 + container: fedora:42 + + - name: fedora-42-x86_64 + runs-on: ubuntu-latest + container: fedora:42 + + - name: fedora-41-x86_64 + runs-on: ubuntu-latest + container: fedora:41 + + - name: fedora-40-x86_84 + runs-on: ubuntu-latest + container: fedora:40 + + - name: opensuse-tumbleweed-x86_64 + runs-on: ubuntu-latest + container: opensuse/tumbleweed:latest + + - name: arch-linux-x86_64 + runs-on: ubuntu-latest + container: archlinux:latest + + - name: manjaro-x86_64 + runs-on: ubuntu-latest + container: manjarolinux/base:latest + + - name: flatpak-x86_64 + runs-on: ubuntu-latest + arch: x86_64 + container: + image: ghcr.io/flathub-infra/flatpak-github-actions:kde-6.8 + options: --privileged + + - name: flatpak-arm64 + runs-on: ubuntu-24.04-8-core-arm64 + arch: aarch64 + container: + image: ghcr.io/flathub-infra/flatpak-github-actions:kde-6.8 + options: --privileged diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cf5975851..749d0c531 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,6 +20,10 @@ on: description: "Override AWS S3 upload dir" required: false type: string + target: + description: "Only build one target (e.g. ubuntu-24.04-x86_64)" + required: false + type: string push: branches: - master* @@ -59,8 +63,24 @@ jobs: steps: - run: echo "✅ CI passed" > $GITHUB_STEP_SUMMARY + setup-matrix: + runs-on: ubuntu-latest + + outputs: + matrix: ${{ steps.setup-matrix.outputs.matrix }} + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup matrix + id: setup-matrix + uses: symless/actions/setup-matrix@v1 + with: + file: ".github/matrix.yml" + target: ${{ inputs.target }} + get-version: - if: ${{ !github.event.pull_request.draft }} runs-on: ubuntu-latest outputs: @@ -78,7 +98,7 @@ jobs: uses: ./.github/actions/get-version main: - needs: get-version + needs: [get-version, setup-matrix] name: main / ${{ matrix.target.name }} runs-on: ${{ matrix.target.runs-on }} container: ${{ matrix.target.container }} @@ -89,89 +109,8 @@ jobs: # fail due to transient issues unrelated to the build. fail-fast: false - matrix: - target: - - name: windows-2022-x64 - runs-on: windows-latest-16-cores - package-os: windows-x64 - - - name: macos-14-arm64 - runs-on: macos-14 - package-os: macos-arm64 - - - name: macos-14-x64 - runs-on: macos-14-large - package-os: macos-x64 - - - name: debian-13-x86_64 - runs-on: ubuntu-latest - container: debian:trixie-slim - - - name: debian-12-x86_64 - runs-on: ubuntu-latest - container: debian:bookworm-slim - - - name: ubuntu-25.04-x86_64 - runs-on: ubuntu-latest - container: ubuntu:25.04 - - - name: ubuntu-24.04-x86_64 - runs-on: ubuntu-latest - container: ubuntu:24.04 - - - name: ubuntu-24.04-arm64 - runs-on: ubuntu-24.04-8-core-arm64 - container: ubuntu:24.04 - - - name: ubuntu-22.04-x86_64 - runs-on: ubuntu-latest - container: ubuntu:22.04 - - - name: ubuntu-22.04-arm64 - runs-on: ubuntu-24.04-8-core-arm64 - container: ubuntu:22.04 - - - name: fedora-42-arm64 - runs-on: ubuntu-24.04-8-core-arm64 - container: fedora:42 - - - name: fedora-42-x86_64 - runs-on: ubuntu-latest - container: fedora:42 - - - name: fedora-41-x86_64 - runs-on: ubuntu-latest - container: fedora:41 - - - name: fedora-40-x86_84 - runs-on: ubuntu-latest - container: fedora:40 - - - name: opensuse-tumbleweed-x86_64 - runs-on: ubuntu-latest - container: opensuse/tumbleweed:latest - - - name: arch-linux-x86_64 - runs-on: ubuntu-latest - container: archlinux:latest - - - name: manjaro-x86_64 - runs-on: ubuntu-latest - container: manjarolinux/base:latest - - - name: flatpak-x86_64 - runs-on: ubuntu-latest - arch: x86_64 - container: - image: ghcr.io/flathub-infra/flatpak-github-actions:kde-6.8 - options: --privileged - - - name: flatpak-arm64 - runs-on: ubuntu-24.04-8-core-arm64 - arch: aarch64 - container: - image: ghcr.io/flathub-infra/flatpak-github-actions:kde-6.8 - options: --privileged + # Build targets are defined in .github/matrix.yml + matrix: ${{ fromJSON(needs.setup-matrix.outputs.matrix) }} steps: - name: Setup variables