Skip to content

Merge pull request #432 from kprinssu/upstream-master #2

Merge pull request #432 from kprinssu/upstream-master

Merge pull request #432 from kprinssu/upstream-master #2

Workflow file for this run

name: Build Images (Dry Run)

Check failure on line 1 in .github/workflows/test_build.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/test_build.yml

Invalid workflow file

(Line: 44, Col: 9): Unrecognized named-value: 'matrix'. Located at position 56 within expression: inputs.build_target == 'all' || inputs.build_target == matrix.build_target
on:
workflow_dispatch:
inputs:
branch_name:
description: 'Branch to build from'
required: true
type: string
build_target:
description: 'Build target'
required: true
type: choice
options:
- all
- cpu
- gpu
- rocm
jobs:
build-images:
env:
DOCKER_BUILDKIT: 1
BUILDKIT_STEP_LOG_MAX_SIZE: 10485760
strategy:
matrix:
include:
- build_target: "cpu"
platform: "amd64"
runs_on: "ubuntu-latest"
- build_target: "gpu"
platform: "amd64"
runs_on: "ubuntu-latest"
- build_target: "cpu"
platform: "arm64"
runs_on: "ubuntu-24.04-arm"
- build_target: "gpu"
platform: "arm64"
runs_on: "ubuntu-24.04-arm"
- build_target: "rocm"
platform: "amd64"
runs_on: "ubuntu-latest"
runs-on: ${{ matrix.runs_on }}
if: inputs.build_target == 'all' || inputs.build_target == matrix.build_target
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ inputs.branch_name }}
- name: Free disk space
run: |
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache
docker system prune -af
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: |
image=moby/buildkit:latest
network=host
- name: Build image
run: |
TARGET="${{ matrix.build_target }}-${{ matrix.platform }}"
docker buildx bake $TARGET --progress=plain