Try to always pass the right thing #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: Dispatch build and test | ||
on: | ||
workflow_call: | ||
inputs: | ||
project_name: {type: string, required: true} | ||
per_cuda_compiler_matrix: {type: string, required: true} | ||
devcontainer_version: {type: string, required: true} | ||
is_windows: {type: boolean, required: true} | ||
permissions: | ||
contents: read | ||
jobs: | ||
# Using a matrix to dispatch to the build-and-test reusable workflow for each build configuration | ||
# ensures that the build/test steps can overlap across different configurations. For example, | ||
# the build step for CUDA 12.1 + gcc 9.3 can run at the same time as the test step for CUDA 11.0 + clang 11. | ||
build_and_test_linux: | ||
name: build and test linux | ||
permissions: | ||
id-token: write | ||
contents: read | ||
if: ${{ !inputs.is_windows }} | ||
uses: ./.github/workflows/build-and-test-linux.yml | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: ${{ fromJSON(inputs.per_cuda_compiler_matrix) }} | ||
with: | ||
cpu: ${{ matrix.cpu }} | ||
test_name: ${{matrix.cpu}}/${{matrix.compiler.name}}${{matrix.compiler.version}}/C++${{matrix.std}} | ||
build_script: './ci/build_${{ inputs.project_name }}.sh -cxx ${{matrix.compiler.exe}} -std ${{matrix.std}} -arch "${{matrix.cuda_archs}}" "${{matrix.extra_build_args}}"' | ||
test_script: './ci/test_${{ inputs.project_name }}.sh -cxx ${{matrix.compiler.exe}} -std ${{matrix.std}} -arch "${{matrix.cuda_archs}}"' | ||
container_image: rapidsai/devcontainers:${{inputs.devcontainer_version}}-cpp-${{matrix.compiler.name}}${{matrix.compiler.version}}-cuda${{matrix.cuda}}-${{matrix.os}} | ||
run_tests: ${{ contains(matrix.jobs, 'test') && !contains(github.event.head_commit.message, 'skip-tests') && matrix.os != 'windows-2022' }} | ||
build_and_test_windows: | ||
name: build and test windows | ||
permissions: | ||
id-token: write | ||
contents: read | ||
if: ${{ inputs.is_windows }} | ||
uses: ./.github/workflows/build-and-test-windows.yml | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: ${{ fromJSON(inputs.per_cuda_compiler_matrix) }} | ||
with: | ||
test_name: ${{matrix.cpu}}/${{matrix.compiler.name}}${{matrix.compiler.version}}/C++${{matrix.std}} | ||
build_script: "./ci/windows/build_${{ inputs.project_name }}.ps1 -std ${{matrix.std}} | ||
container_image: rapidsai/devcontainers:${{inputs.devcontainer_version}}-cuda${{matrix.cuda}}-${{matrix.compiler.name}}${{matrix.compiler.version}}-${{matrix.os}} |