Skip to content

Commit

Permalink
WIP: github: Restructure the main build in a matrix with Dockerfile.t…
Browse files Browse the repository at this point in the history
…oolchain
  • Loading branch information
mstorsjo committed Feb 27, 2024
1 parent cb3491c commit bf17689
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,9 @@ jobs:
cat parameters.txt >> $GITHUB_OUTPUT
cat $GITHUB_OUTPUT
docker-build:
docker-build-dev:
needs: [prepare]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- { file: Dockerfile, maintag: test, prefix: test- }
- { file: Dockerfile.dev, maintag: test-dev, prefix: test-dev- }
steps:
- uses: actions/checkout@v4
- name: Log in to Docker Hub
Expand All @@ -61,20 +55,27 @@ jobs:
with:
context: .
push: false
file: ./${{matrix.file}}
file: ./Dockerfile.dev
tags: |
mstorsjo/llvm-mingw:${{matrix.maintag}}
mstorsjo/llvm-mingw:${{matrix.prefix}}${{needs.prepare.outputs.TAG}}
mstorsjo/llvm-mingw:test-dev
mstorsjo/llvm-mingw:test-dev-${{needs.prepare.outputs.TAG}}
- name: Inspect Docker images
run: |
docker images
docker-build-toolchain:
docker-build:
needs: [prepare]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- { file: Dockerfile }
- { file: Dockerfile.toolchain, platforms: linux/arm64 }
steps:
- uses: actions/checkout@v4
- name: Download toolchain
if: ${{matrix.file == 'Dockerfile.toolchain'}}
uses: dawidd6/action-download-artifact@v3
with:
workflow: build.yml
Expand All @@ -86,6 +87,7 @@ jobs:
name_is_regexp: true
path: toolchain
- name: Set up QEMU
if: ${{matrix.file == 'Dockerfile.toolchain'}}
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
Expand All @@ -99,9 +101,9 @@ jobs:
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/arm64
platforms: ${{matrix.platforms}}
push: false
file: ./Dockerfile.toolchain
file: ./${{matrix.file}}
load: true
tags: |
mstorsjo/llvm-mingw:test
Expand Down

0 comments on commit bf17689

Please sign in to comment.