Skip to content

Commit

Permalink
unify build conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
phnzb committed Dec 2, 2024
1 parent d1bf3f0 commit 63f31c0
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,27 @@ env:

jobs:

prepare-build-matrix:
runs-on: ubuntu-latest
outputs:
archs: ${{ steps.matrix-vars.outputs.ARCHS }}
types: ${{ steps.matrix-vars.outputs.TYPES }}
steps:

- name: Calculate matrix variables
id: matrix-vars
run: |
echo ARCHS=[\"$BUILD_ARCHS\"] | sed 's| |","|g' >> "$GITHUB_OUTPUT"
echo TYPES=[\"$BUILD_TYPES\"] | sed 's| |","|g' >> "$GITHUB_OUTPUT"
cat "$GITHUB_OUTPUT"
build-bin:
runs-on: ubuntu-latest
needs: prepare-build-matrix
strategy:
matrix:
arch: [aarch64, armel, armhf, i686, mipseb, mipsel, ppc500, ppc6xx, riscv64, x86_64]
type: [release, debug]
build-only-release:
- ${{ github.ref_name != 'develop' && github.ref_name != 'main' }}
exclude:
- build-only-release: true
type: debug

arch: ${{ fromJSON(needs.prepare-build-matrix.outputs.archs) }}
type: ${{ fromJSON(needs.prepare-build-matrix.outputs.types) }}
steps:

- name: Checkout
Expand Down

0 comments on commit 63f31c0

Please sign in to comment.