This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
Fix matrix #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: [ main ] | |
paths: [ .github/workflows/build.yml, cconfig/**, config/**, docker/**, scripts/**] | |
pull_request: | |
branches: [ main ] | |
paths: [ .github/workflows/build.yml, cconfig/**, config/**, docker/**, scripts/**] | |
workflow_dispatch: | |
permissions: { } | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
cross: | |
- aarch64-linux-gnu | |
- x86_64-linux-gnu | |
build: | |
- target: aarch64-unknown-linux-musl | |
toolchain: aarch64-linux-musl | |
- target: armv7-unknown-linux-musleabihf | |
toolchain: arm-linux-musleabihf | |
- target: x86_64-unknown-linux-musl | |
toolchain: x86_64-linux-musl | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Space? | |
shell: bash | |
run: | | |
docker system prune --all -f | |
sudo rm -rf /usr/share/dotnet | |
sudo rm -rf /opt/ghc | |
sudo rm -rf "/usr/local/share/boost" | |
sudo rm -rf "$AGENT_TOOLSDIRECTORY" | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
with: | |
image: tonistiigi/binfmt:master | |
- name: Docker Setup Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build Docker | |
uses: docker/build-push-action@v5 | |
with: | |
context: ./ | |
file: ./docker/.Dockerfile | |
pull: true | |
push: false | |
load: true | |
tags: ink-toolchain:dev | |
build-args: | | |
RUST_TARGET=${{ matrix.build.target }} | |
CROSS_TOOLCHAIN=${{ matrix.build.toolchain }} | |
CCONFIG=x86_64-linux-gnu---${{ matrix.cross }} | |
platforms: linux/amd64 | |
builder: ${{ steps.buildx.outputs.name }} | |
- name: Extract | |
run: ./scripts/extract.sh | |
- name: Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: "${{ matrix.cross }}+${{ matrix.build.target }}" | |
path: | | |
export/*.tar.gz |