From 33459245b0e25171749e26257154cc19e569b0f9 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Thu, 13 Jul 2023 13:38:39 +0200 Subject: [PATCH] ci: move binutils to its own workflow Signed-off-by: CrazyMax --- .github/workflows/binutils.yml | 65 ++++++++++++++++++++++++++++++++++ .github/workflows/ld.yml | 46 ------------------------ 2 files changed, 65 insertions(+), 46 deletions(-) create mode 100644 .github/workflows/binutils.yml diff --git a/.github/workflows/binutils.yml b/.github/workflows/binutils.yml new file mode 100644 index 0000000..b16e7b3 --- /dev/null +++ b/.github/workflows/binutils.yml @@ -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 }} diff --git a/.github/workflows/ld.yml b/.github/workflows/ld.yml index 3add930..e454665 100644 --- a/.github/workflows/ld.yml +++ b/.github/workflows/ld.yml @@ -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: