Skip to content

Builds

Builds #22

Workflow file for this run

# Builds for all compilers, architectures and targets
name: Builds
on:
workflow_call:
inputs:
gcc:
type: string
description: GCC versions to use
default: all
clang:
type: string
description: Clang versions to use
default: all
machine:
type: string
description: Machines to build for
default: all
verbose:
type: boolean
description: Show error outputs
default: false
exit_on_err:
type: boolean
description: Exit on the first error
default: false
workflow_dispatch:
inputs:
gcc:
type: string
description: GCC versions to use (comma-separated | none | all)
default: all
clang:
type: string
description: Clang versions to use (comma-separated | none | all)
default: all
machine:
type: string
description: Machines to build for (comma-separated | all)
default: all
verbose:
type: boolean
description: Show error outputs
default: false
exit_on_err:
type: boolean
description: Exit on the first error
default: false
concurrency:
group: builds_${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build_gcc:
runs-on: X64
if: ${{ inputs.gcc != 'none' }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: dtolnay/rust-toolchain@1.73.0
- name: Build command line args
run: |
ARGS=""
# verbose
if [ "${{ inputs.verbose }}" == "true" ]; then
ARGS="$ARGS --verbose"
fi
# exit-on-err
if [ "${{ inputs.exit_on_err }}" == "true" ]; then
ARGS="$ARGS --exit-on-err"
fi
# machine
if [ "${{ inputs.machine }}" != "all" ]; then
ARGS="$ARGS --machines ${{ inputs.machine }}"
fi
# gcc
if [ "${{ inputs.gcc }}" != "all" ]; then
ARGS="$ARGS --gcc-versions ${{ inputs.gcc }}"
fi
echo "BUILD_ARGS=$ARGS" >> $GITHUB_ENV
- name: Run gcc builds
run: |
contrib/build.sh --no-rust --no-clang ${{ env.BUILD_ARGS }}
build_clang:
runs-on: 512G
if: ${{ inputs.clang != 'none' }}
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: dtolnay/rust-toolchain@1.73.0
- name: Build command line args
run: |
ARGS=""
# verbose
if [ "${{ inputs.verbose }}" == "true" ]; then
ARGS="$ARGS --verbose"
fi
# exit-on-err
if [ "${{ inputs.exit_on_err }}" == "true" ]; then
ARGS="$ARGS --exit-on-err"
fi
# machine
if [ "${{ inputs.machine }}" != "all" ]; then
ARGS="$ARGS --machines ${{ inputs.machine }}"
fi
# clang
if [ "${{ inputs.clang }}" != "all" ]; then
ARGS="$ARGS --clang-versions ${{ inputs.clang }}"
fi
echo "ARGS=$ARGS" >> $GITHUB_ENV
- name: Run clang builds
run: |
contrib/build.sh --no-rust --no-gcc ${{ env.BUILD_ARGS }}