Skip to content

Refactor test job to use run-as-coder. #354

Refactor test job to use run-as-coder.

Refactor test job to use run-as-coder. #354

Workflow file for this run

# This is the main workflow that runs on every PR and push to main
name: pr
defaults:
run:
shell: bash
on:
push:
branches:
- main
- "pull-request/[0-9]+"
# Only runs one instance of this workflow at a time for a given PR and cancels any in-progress runs when a new one starts.
concurrency:
group: ${{ github.workflow }}-on-${{ github.event_name }}-from-${{ github.ref_name }}
cancel-in-progress: true
jobs:
compute-matrix:
uses: ./.github/workflows/compute-matrix.yml
with:
matrix_file: "./ci/matrix.yaml"
matrix_type: "pull-request"
thrust:
name: Thrust CUDA${{ matrix.cuda_version }} ${{ matrix.compiler }}
needs: compute-matrix
uses: ./.github/workflows/dispatch-build-and-test.yml

Check failure on line 30 in .github/workflows/pr.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/pr.yml

Invalid workflow file

error parsing called workflow ".github/workflows/pr.yml" -> "./.github/workflows/dispatch-build-and-test.yml" (source branch with sha:6880ded0b6de4e6c29378241af599af39eaaa890) --> "./.github/workflows/build-and-test.yml" (source branch with sha:6880ded0b6de4e6c29378241af599af39eaaa890) ---> "./.github/workflows/run-as-coder.yml" (source branch with sha:6880ded0b6de4e6c29378241af599af39eaaa890) : Invalid type for `on`
strategy:
fail-fast: false
matrix:
cuda_version: ${{ fromJSON(needs.compute-matrix.outputs.CUDA_VERSIONS) }}
compiler: ${{ fromJSON(needs.compute-matrix.outputs.COMPILERS) }}
with:
per_cuda_compiler_matrix: ${{ toJSON(fromJSON(needs.compute-matrix.outputs.PER_CUDA_COMPILER_MATRIX)[ format('{0}-{1}', matrix.cuda_version, matrix.compiler) ]) }}
build_script: "./ci/build_thrust.sh"
test_script: "./ci/test_thrust.sh"
cub:
name: CUB CUDA${{ matrix.cuda_version }} ${{ matrix.compiler }}
needs: compute-matrix
uses: ./.github/workflows/dispatch-build-and-test.yml
strategy:
fail-fast: false
matrix:
cuda_version: ${{ fromJSON(needs.compute-matrix.outputs.CUDA_VERSIONS) }}
compiler: ${{ fromJSON(needs.compute-matrix.outputs.COMPILERS) }}
with:
per_cuda_compiler_matrix: ${{ toJSON(fromJSON(needs.compute-matrix.outputs.PER_CUDA_COMPILER_MATRIX)[ format('{0}-{1}', matrix.cuda_version, matrix.compiler) ]) }}
build_script: "./ci/build_cub.sh"
test_script: "./ci/test_cub.sh"
libcudacxx:
name: libcudacxx CUDA${{ matrix.cuda_version }} ${{ matrix.compiler }}
needs: compute-matrix
uses: ./.github/workflows/dispatch-build-and-test.yml
strategy:
fail-fast: false
matrix:
cuda_version: ${{ fromJSON(needs.compute-matrix.outputs.CUDA_VERSIONS) }}
compiler: ${{ fromJSON(needs.compute-matrix.outputs.COMPILERS) }}
with:
per_cuda_compiler_matrix: ${{ toJSON(fromJSON(needs.compute-matrix.outputs.PER_CUDA_COMPILER_MATRIX)[ format('{0}-{1}', matrix.cuda_version, matrix.compiler) ]) }}
build_script: "./ci/build_libcudacxx.sh"
test_script: "./ci/test_libcudacxx.sh"
# This job is the final job that runs after all other jobs and is used for branch protection status checks.
# See: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/about-status-checks
ci:
runs-on: ubuntu-latest
name: CI
needs:
- libcudacxx
- cub
- thrust
steps:
- run: echo "CI success"