Skip to content

Refactor advanced.yml so that matrix strategy is moved to a parent workflow #4

Refactor advanced.yml so that matrix strategy is moved to a parent workflow

Refactor advanced.yml so that matrix strategy is moved to a parent workflow #4

Workflow file for this run

name: Build toolchain variants
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
inputs:
binutils_branch:
description: 'Binutils branch to build'
required: false
default: 'woarm64'
gcc_branch:
description: 'GCC branch to build'
required: false
default: 'woarm64'
mingw_branch:
description: 'MinGW branch to build'
required: false
default: 'woarm64'
cygwin_branch:
description: 'Cygwin branch to build'
required: false
default: 'main'
cygwin_packages_branch:
description: 'Cygwin packages branch to build'
required: false
default: 'main'
cocom_branch:
description: 'COCOM branch to build'
required: false
default: 'master'
openblas_branch:
description: 'OpenBLAS branch to test'
required: false
default: 'v0.3.26'
openssl_branch:
description: 'OpenSSL branch to test'
required: false
default: 'fix-tests'
workflow_call:
inputs:
binutils_branch:
type: string
gcc_branch:
type: string
mingw_branch:
type: string
cygwin_branch:
type: string
cygwin_packages_branch:
type: string
cocom_branch:
type: string
openblas_branch:
type: string
openssl_branch:
type: string
env:
BINUTILS_BRANCH: ${{ inputs.binutils_branch || 'woarm64' }}
GCC_BRANCH: ${{ inputs.gcc_branch || 'woarm64' }}
MINGW_BRANCH: ${{ inputs.mingw_branch || 'woarm64' }}
CYGWIN_BRANCH: ${{ inputs.cygwin_branch || 'main' }}
CYGWIN_PACKAGES_BRANCH: ${{ inputs.cygwin_packages_branch || 'main' }}
COCOM_BRANCH: ${{ inputs.cocom_branch || 'master' }}
OPENBLAS_BRANCH: ${{ inputs.openblas_branch || 'v0.3.26' }}
OPENSSL_BRANCH: ${{ inputs.openssl_branch || 'fix-tests' }}
jobs:
build-toolchain-variants:
name: Build toolchain variants
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
arch: [aarch64, x86_64]
platform: [w64-mingw32, pc-linux-gnu, pc-cygwin]
crt: [msvcrt, ucrt, libc]
exclude:
- platform: w64-mingw32
crt: libc
- platform: pc-linux-gnu
crt: msvcrt
- platform: pc-linux-gnu
crt: ucrt
- platform: pc-cygwin
crt: ucrt
- platform: pc-cygwin
crt: libc
- platform: pc-cygwin
arch: aarch64
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: ${{ github.workspace }}
- name: Test
run: |
ls -al ${{ github.workspace }}
ls -al .
- name: Build toolchain variant
uses: ./.github/workflows/advanced.yml
with:
arch: ${{ matrix.arch }}
platform: ${{ matrix.platform }}
crt: ${{ matrix.crt }}
binutils_branch: ${{ env.BINUTILS_BRANCH }}
gcc_branch: ${{ env.GCC_BRANCH }}
mingw_branch: ${{ env.MINGW_BRANCH }}
cygwin_branch: ${{ env.CYGWIN_BRANCH }}
cygwin_packages_branch: ${{ env.CYGWIN_PACKAGES_BRANCH }}
cocom_branch: ${{ env.COCOM_BRANCH }}
openblas_branch: ${{ env.OPENBLAS_BRANCH }}
openssl_branch: ${{ env.OPENSSL_BRANCH }}