Skip to content

Commit

Permalink
ci: move binutils to its own workflow
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 041e484 commit 3345924
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 46 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/binutils.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: binutils

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
workflow_dispatch:
push:
branches:
- 'master'
tags:
- 'v*'
paths:
- 'src/ld/**'
pull_request:
paths:
- 'src/ld/**'

jobs:
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
uses: actions/checkout@v3
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Build
uses: docker/bake-action@v2
with:
targets: ${{ matrix.target }}
set: |
*.cache-from=type=gha,scope=${{ matrix.target }}
*.cache-to=type=gha,scope=${{ matrix.target }}
46 changes: 0 additions & 46 deletions .github/workflows/ld.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,52 +27,6 @@ env:
BUILDKIT_IMAGE: "moby/buildkit:latest"

jobs:
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
uses: actions/checkout@v3
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Build
uses: docker/bake-action@v2
with:
targets: ${{ matrix.target }}
set: |
*.cache-from=type=gha,scope=${{ matrix.target }}
*.cache-to=type=gha,scope=${{ matrix.target }}
ld64-targets:
runs-on: ubuntu-latest
outputs:
Expand Down

0 comments on commit 3345924

Please sign in to comment.