Skip to content

Commit

Permalink
ci(ld): ld64 matrix build
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <[email protected]>
  • Loading branch information
crazy-max committed Jul 13, 2023
1 parent 2801eaf commit a43bc52
Showing 1 changed file with 35 additions and 9 deletions.
44 changes: 35 additions & 9 deletions .github/workflows/ld.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,33 @@ on:
- 'src/ld/**'

jobs:
ld64:
binutils-targets:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.targets.outputs.matrix }}
steps:
-
name: Checkout
uses: actions/checkout@v3
-
name: Create targets matrix
id: targets
run: |
matrix=$(docker buildx bake binutils --print | jq -cr '.group.binutils.targets')
echo "matrix=${matrix}" >> ${GITHUB_OUTPUT}
-
name: Show matrix
run: |
echo ${{ steps.targets.outputs.matrix }}
binutils:
runs-on: ubuntu-latest
needs:
- binutils-targets
strategy:
fail-fast: false
matrix:
target: ${{ fromJson(needs.binutils-targets.outputs.matrix) }}
steps:
-
name: Checkout
Expand All @@ -34,11 +59,12 @@ jobs:
name: Build
uses: docker/bake-action@v2
with:
files: |
./docker-bake.hcl
targets: ld64-tgz
targets: ${{ matrix.target }}
set: |
*.cache-from=type=gha,scope=${{ matrix.target }}
*.cache-to=type=gha,scope=${{ matrix.target }}
binutils-targets:
ld64-targets:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.targets.outputs.matrix }}
Expand All @@ -50,21 +76,21 @@ jobs:
name: Create targets matrix
id: targets
run: |
matrix=$(docker buildx bake binutils --print | jq -cr '.group.binutils.targets')
matrix=$(docker buildx bake ld64-static-tgz --print | jq -cr '.group."ld64-static-tgz".targets')
echo "matrix=${matrix}" >> ${GITHUB_OUTPUT}
-
name: Show matrix
run: |
echo ${{ steps.targets.outputs.matrix }}
binutils:
ld64:
runs-on: ubuntu-latest
needs:
- binutils-targets
- ld64-targets
strategy:
fail-fast: false
matrix:
target: ${{ fromJson(needs.binutils-targets.outputs.matrix) }}
target: ${{ fromJson(needs.ld64-targets.outputs.matrix) }}
steps:
-
name: Checkout
Expand Down

0 comments on commit a43bc52

Please sign in to comment.