Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ld64 matrix build #114

Merged
merged 6 commits into from
Jul 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/bin
64 changes: 55 additions & 9 deletions .github/workflows/ld.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,45 @@ on:
tags:
- 'v*'
paths:
- '.github/workflows/ld.yml'
- 'src/ld/**'
pull_request:
paths:
- '.github/workflows/ld.yml'
- 'src/ld/**'

env:
# needs latest for output platform-split support
BUILDKIT_IMAGE: "moby/buildkit:latest"

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 +65,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 +82,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 All @@ -75,6 +107,8 @@ jobs:
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
driver-opts: image=${{ env.BUILDKIT_IMAGE }}
-
name: Build
uses: docker/bake-action@v2
Expand All @@ -83,6 +117,11 @@ jobs:
set: |
*.cache-from=type=gha,scope=${{ matrix.target }}
*.cache-to=type=gha,scope=${{ matrix.target }}
*.output=type=local,dest=./dist,platform-split=false
-
name: List artifacts
run: |
tree -nh ./dist

ld-targets:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -121,6 +160,8 @@ jobs:
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
driver-opts: image=${{ env.BUILDKIT_IMAGE }}
-
name: Build
uses: docker/bake-action@v2
Expand All @@ -129,3 +170,8 @@ jobs:
set: |
*.cache-from=type=gha,scope=${{ matrix.target }}
*.cache-to=type=gha,scope=${{ matrix.target }}
*.output=type=local,dest=./dist,platform-split=false
-
name: List artifacts
run: |
tree -nh ./dist
2 changes: 2 additions & 0 deletions .github/workflows/llvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ on:
tags:
- 'v*'
paths:
- '.github/workflows/llvm.yml'
- 'src/llvm/**'
pull_request:
paths:
- '.github/workflows/llvm.yml'
- 'src/llvm/**'

jobs:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/sdk-extras.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ on:
tags:
- 'v*'
paths:
- '.github/workflows/sdk-extras.yml'
- 'src/sdk-extras/**'
pull_request:
paths:
- '.github/workflows/sdk-extras.yml'
- 'src/sdk-extras/**'

jobs:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/bin
Loading