fix boolean handling? #1
Workflow file for this run
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: "C++ Tests on all platforms & compilers" | ||
on: | ||
workflow_call: | ||
inputs: | ||
CONCURRENCY: | ||
required: true | ||
type: string | ||
FULL: | ||
type: boolean | ||
required: false | ||
default: true | ||
workflow_dispatch: | ||
inputs: | ||
CONCURRENCY: | ||
required: false | ||
type: string | ||
default: "adhoc" | ||
FULL: | ||
description: "If false only linux is tested" | ||
type: boolean | ||
required: false | ||
default: true | ||
concurrency: | ||
group: ${{ inputs.CONCURRENCY }}-checks_cpp | ||
cancel-in-progress: true | ||
env: | ||
# See: https://github.com/marketplace/actions/sccache-action | ||
SCCACHE_GHA_ENABLED: "false" | ||
permissions: | ||
contents: "read" | ||
id-token: "write" | ||
jobs: | ||
matrix_prep: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
MATRIX: ${{ steps.set-matrix.outputs.matrix }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || '' }} | ||
- name: Load C++ test matrix | ||
id: set-matrix | ||
# Workaround for https://github.com/actions/runner/issues/2831 | ||
env: | ||
FULL: ${{ github.event.inputs.FULL }} | ||
run: | | ||
echo "full: ${{ env.FULL }}" | ||
if [${{ env.FULL }} == "true"]; then | ||
echo "matrix=$(jq -c . < ./.github/workflows/cpp_matrix_full.json)" >> $GITHUB_OUTPUT | ||
else | ||
echo "matrix=$(jq -c . < ./.github/workflows/cpp_matrix_partial.json)" >> $GITHUB_OUTPUT | ||
fi | ||
cpp-tests: | ||
name: C++ build & test @ ${{ matrix.runner }} | ||
needs: matrix_prep | ||
strategy: | ||
matrix: ${{ fromJson(needs.matrix_prep.outputs.MATRIX) }} | ||
runs-on: ${{ matrix.runs_on }} | ||
env: | ||
RUSTC_WRAPPER: "sccache" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || '' }} | ||
- uses: prefix-dev/[email protected] | ||
with: | ||
pixi-version: v0.6.0 | ||
cache: true | ||
- name: Set up Rust | ||
uses: ./.github/actions/setup-rust | ||
with: | ||
cache_key: ${{ matrix.cache_key }} | ||
# Cache will be produced by `reusable_checks/rs-lints` | ||
save_cache: false | ||
workload_identity_provider: ${{ secrets.GOOGLE_WORKLOAD_IDENTITY_PROVIDER }} | ||
service_account: ${{ secrets.GOOGLE_SERVICE_ACCOUNT }} | ||
- name: Build and run C++ tests | ||
shell: bash | ||
run: | | ||
pixi run cpp-clean | ||
RERUN_WERROR=ON RERUN_USE_ASAN=ON pixi run cpp-build-all | ||
RERUN_WERROR=ON RERUN_USE_ASAN=ON pixi run cpp-test |