Skip to content

Commit

Permalink
split up utility targets from main dockerfile
Browse files Browse the repository at this point in the history
We can not use bake with linked targets to split
up ld, sdk-extras and llvm in own subdirectories.

Signed-off-by: Tonis Tiigi <[email protected]>
  • Loading branch information
tonistiigi authored and crazy-max committed Jul 11, 2023
1 parent ebe730a commit c3679c7
Show file tree
Hide file tree
Showing 40 changed files with 508 additions and 213 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,18 @@ jobs:
uses: docker/setup-buildx-action@v2
-
name: Test
if: ${{ matrix.typ != 'rhel' }}
uses: docker/bake-action@v2
with:
targets: test-${{ matrix.typ }}
targets: test
set: |
test-${{ matrix.typ }}.args.TEST_BASE_IMAGE=${{ matrix.image }}
-
name: Test (info)
if: ${{ matrix.typ == 'rhel' }}
uses: docker/bake-action@v2
with:
targets: test-info
set: |
test-${{ matrix.typ }}.args.TEST_BASE_IMAGE=${{ matrix.image }}
Expand Down
108 changes: 108 additions & 0 deletions .github/workflows/ld.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
name: ld

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

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

jobs:
ld64:
runs-on: ubuntu-latest
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:
files: |
./docker-bake.hcl
targets: ld64-tgz

binutils:
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.allow-failure }}
strategy:
fail-fast: false
matrix:
include:
- target: linux-arm64
- target: linux-amd64
- target: linux-armv7
- target: linux-armv6
- target: linux-ppc64le
- target: linux-386
- target: linux-riscv64
- target: linux-s390x
- target: windows-amd64
- target: windows-386
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: binutils-${{ matrix.target }}-alpine

ld:
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.allow-failure }}
strategy:
fail-fast: false
matrix:
include:
- target: linux-arm64
- target: linux-amd64
- target: linux-armv7
- target: linux-armv6
- target: linux-ppc64le
- target: linux-386
- target: linux-riscv64
- target: linux-s390x
- target: windows-amd64
- target: windows-386

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: ld-${{ matrix.target }}-tgz
52 changes: 52 additions & 0 deletions .github/workflows/llvm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: llvm

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

on:
workflow_dispatch:
push:
branches:
- "master"
tags:
- "v*"
paths:
- "src/llvm/**"
pull_request:
branches:
- "master"
paths:
- "src/llvm/**"

jobs:
compiler-rt:
runs-on: ubuntu-latest
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:
files: |
./docker-bake.hcl
targets: compiler-rt
libcxx:
runs-on: ubuntu-latest
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:
files: |
./docker-bake.hcl
targets: compiler-rt
37 changes: 37 additions & 0 deletions .github/workflows/sdk-extras.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: sdk-extras

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

on:
workflow_dispatch:
push:
branches:
- "master"
tags:
- "v*"
paths:
- "src/sdk-extras/**"
pull_request:
branches:
- "master"
paths:
- "src/sdk-extras/**"

jobs:
build:
runs-on: ubuntu-latest
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:
files: |
./docker-bake.hcl
targets: sdk-extras
Loading

0 comments on commit c3679c7

Please sign in to comment.