mirror of
https://github.com/NVIDIA/nvbench.git
synced 2026-03-14 20:27:24 +00:00
Consolidate build/test jobs.
This commit is contained in:
23
.github/workflows/build-and-test-linux.yml
vendored
23
.github/workflows/build-and-test-linux.yml
vendored
@@ -18,30 +18,15 @@ permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build ${{inputs.test_name}}
|
||||
build-and-test:
|
||||
name: Build/Test ${{inputs.test_name}}
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: read
|
||||
uses: ./.github/workflows/run-as-coder.yml
|
||||
with:
|
||||
name: Build ${{inputs.test_name}}
|
||||
runner: linux-${{inputs.cpu}}-cpu16
|
||||
name: Build/Test ${{inputs.test_name}}
|
||||
runner: linux-${{inputs.cpu}}-gpu-v100-latest-1
|
||||
image: ${{ inputs.container_image }}
|
||||
command: |
|
||||
${{ inputs.build_script }}
|
||||
|
||||
test:
|
||||
needs: build
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: read
|
||||
if: ${{ !cancelled() && ( needs.build.result == 'success' || needs.build.result == 'skipped' ) && inputs.run_tests}}
|
||||
name: Test ${{inputs.test_name}}
|
||||
uses: ./.github/workflows/run-as-coder.yml
|
||||
with:
|
||||
name: Test ${{inputs.test_name}}
|
||||
runner: linux-${{inputs.cpu}}-gpu-v100-latest-1
|
||||
image: ${{inputs.container_image}}
|
||||
command: |
|
||||
${{ inputs.test_script }}
|
||||
|
||||
10
.github/workflows/build-and-test-windows.yml
vendored
10
.github/workflows/build-and-test-windows.yml
vendored
@@ -5,11 +5,12 @@ on:
|
||||
inputs:
|
||||
test_name: {type: string, required: false}
|
||||
build_script: {type: string, required: false}
|
||||
test_script: {type: string, required: false}
|
||||
container_image: {type: string, required: false}
|
||||
|
||||
jobs:
|
||||
prepare:
|
||||
name: Build ${{inputs.test_name}}
|
||||
name: Build/Test ${{inputs.test_name}}
|
||||
runs-on: windows-amd64-cpu16
|
||||
permissions:
|
||||
id-token: write
|
||||
@@ -41,9 +42,8 @@ jobs:
|
||||
[System.Environment]::SetEnvironmentVariable('SCCACHE_IDLE_TIMEOUT','${{env.SCCACHE_IDLE_TIMEOUT}}')
|
||||
[System.Environment]::SetEnvironmentVariable('SCCACHE_S3_USE_SSL','${{env.SCCACHE_S3_USE_SSL}}')
|
||||
[System.Environment]::SetEnvironmentVariable('SCCACHE_S3_NO_CREDENTIALS','${{env.SCCACHE_S3_NO_CREDENTIALS}}')
|
||||
git clone https://github.com/NVIDIA/cccl.git;
|
||||
cd cccl;
|
||||
git clone https://github.com/NVIDIA/nvbench.git;
|
||||
cd nvbench;
|
||||
git fetch --all;
|
||||
git checkout ${{github.ref_name}};
|
||||
${{inputs.build_script}};"
|
||||
|
||||
${{inputs.test_script}};"
|
||||
|
||||
@@ -32,7 +32,6 @@ jobs:
|
||||
build_script: './ci/build_${{ inputs.project_name }}.sh -cxx ${{matrix.compiler.exe}} -std ${{matrix.std}} "${{matrix.extra_build_args}}"'
|
||||
test_script: './ci/test_${{ inputs.project_name }}.sh -cxx ${{matrix.compiler.exe}} -std ${{matrix.std}} "${{matrix.extra_build_args}}"'
|
||||
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
|
||||
@@ -48,4 +47,5 @@ jobs:
|
||||
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}}"
|
||||
test_script: "./ci/windows/test_${{ 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}}
|
||||
|
||||
@@ -57,29 +57,29 @@ oneapi: &oneapi { name: 'oneapi', version: '2023.2.0', exe: 'icpc' }
|
||||
# Configurations that will run for every PR
|
||||
pull_request:
|
||||
nvcc:
|
||||
- {cuda: *cuda_prev_min, os: 'ubuntu18.04', cpu: 'amd64', compiler: *gcc7, std: [17], jobs: ['build']}
|
||||
- {cuda: *cuda_prev_min, os: 'ubuntu18.04', cpu: 'amd64', compiler: *gcc8, std: [17], jobs: ['build']}
|
||||
- {cuda: *cuda_prev_min, os: 'ubuntu18.04', cpu: 'amd64', compiler: *gcc9, std: [17], jobs: ['build']}
|
||||
- {cuda: *cuda_prev_min, os: 'ubuntu18.04', cpu: 'amd64', compiler: *llvm9, std: [17], jobs: ['build']}
|
||||
- {cuda: *cuda_prev_min, os: 'windows2022', cpu: 'amd64', compiler: *msvc2017, std: [17], jobs: ['build']}
|
||||
- {cuda: *cuda_prev_max, os: 'ubuntu22.04', cpu: 'amd64', compiler: *gcc11, std: [17], jobs: ['build'], extra_build_args: '-cmake-options -DCMAKE_CUDA_ARCHITECTURES=90'}
|
||||
- {cuda: *cuda_curr, os: 'ubuntu20.04', cpu: 'amd64', compiler: *gcc7, std: [17], jobs: ['build']}
|
||||
- {cuda: *cuda_curr, os: 'ubuntu20.04', cpu: 'amd64', compiler: *gcc8, std: [17], jobs: ['build']}
|
||||
- {cuda: *cuda_curr, os: 'ubuntu20.04', cpu: 'amd64', compiler: *gcc9, std: [17], jobs: ['build']}
|
||||
- {cuda: *cuda_curr, os: 'ubuntu20.04', cpu: 'amd64', compiler: *gcc10, std: [17], jobs: ['build']}
|
||||
- {cuda: *cuda_curr, os: 'ubuntu22.04', cpu: 'amd64', compiler: *gcc11, std: [17], jobs: ['build']}
|
||||
- {cuda: *cuda_curr, os: 'ubuntu22.04', cpu: 'amd64', compiler: *gcc12, std: [17], jobs: ['build'], extra_build_args: '-cmake-options -DCMAKE_CUDA_ARCHITECTURES=90a'}
|
||||
- {cuda: *cuda_curr, os: 'ubuntu22.04', cpu: 'amd64', compiler: *gcc12, std: [17], jobs: ['build', 'test']}
|
||||
- {cuda: *cuda_curr, os: 'ubuntu22.04', cpu: 'arm64', compiler: *gcc12, std: [17], jobs: ['build']}
|
||||
- {cuda: *cuda_curr, os: 'ubuntu20.04', cpu: 'amd64', compiler: *llvm9, std: [17], jobs: ['build']}
|
||||
- {cuda: *cuda_curr, os: 'ubuntu20.04', cpu: 'amd64', compiler: *llvm10, std: [17], jobs: ['build']}
|
||||
- {cuda: *cuda_curr, os: 'ubuntu20.04', cpu: 'amd64', compiler: *llvm11, std: [17], jobs: ['build']}
|
||||
- {cuda: *cuda_curr, os: 'ubuntu20.04', cpu: 'amd64', compiler: *llvm12, std: [17], jobs: ['build']}
|
||||
- {cuda: *cuda_curr, os: 'ubuntu20.04', cpu: 'amd64', compiler: *llvm13, std: [17], jobs: ['build']}
|
||||
- {cuda: *cuda_curr, os: 'ubuntu20.04', cpu: 'amd64', compiler: *llvm14, std: [17], jobs: ['build']}
|
||||
- {cuda: *cuda_curr, os: 'ubuntu22.04', cpu: 'amd64', compiler: *llvm15, std: [17], jobs: ['build']}
|
||||
- {cuda: *cuda_curr, os: 'ubuntu22.04', cpu: 'amd64', compiler: *llvm16, std: [17], jobs: ['build', 'test']}
|
||||
- {cuda: *cuda_curr, os: 'ubuntu22.04', cpu: 'arm64', compiler: *llvm16, std: [17], jobs: ['build']}
|
||||
- {cuda: *cuda_curr, os: 'windows2022', cpu: 'amd64', compiler: *msvc2019, std: [17], jobs: ['build']}
|
||||
- {cuda: *cuda_curr, os: 'windows2022', cpu: 'amd64', compiler: *msvc2022, std: [17], jobs: ['build']}
|
||||
- {cuda: *cuda_curr, os: 'ubuntu22.04', cpu: 'amd64', compiler: *oneapi, std: [17], jobs: ['build']}
|
||||
- {cuda: *cuda_prev_min, os: 'ubuntu18.04', cpu: 'amd64', compiler: *gcc7, std: [17]}
|
||||
- {cuda: *cuda_prev_min, os: 'ubuntu18.04', cpu: 'amd64', compiler: *gcc8, std: [17]}
|
||||
- {cuda: *cuda_prev_min, os: 'ubuntu18.04', cpu: 'amd64', compiler: *gcc9, std: [17]}
|
||||
- {cuda: *cuda_prev_min, os: 'ubuntu18.04', cpu: 'amd64', compiler: *llvm9, std: [17]}
|
||||
- {cuda: *cuda_prev_min, os: 'windows2022', cpu: 'amd64', compiler: *msvc2017, std: [17]}
|
||||
- {cuda: *cuda_prev_max, os: 'ubuntu22.04', cpu: 'amd64', compiler: *gcc11, std: [17], extra_build_args: '-cmake-options -DCMAKE_CUDA_ARCHITECTURES=90'}
|
||||
- {cuda: *cuda_curr, os: 'ubuntu20.04', cpu: 'amd64', compiler: *gcc7, std: [17]}
|
||||
- {cuda: *cuda_curr, os: 'ubuntu20.04', cpu: 'amd64', compiler: *gcc8, std: [17]}
|
||||
- {cuda: *cuda_curr, os: 'ubuntu20.04', cpu: 'amd64', compiler: *gcc9, std: [17]}
|
||||
- {cuda: *cuda_curr, os: 'ubuntu20.04', cpu: 'amd64', compiler: *gcc10, std: [17]}
|
||||
- {cuda: *cuda_curr, os: 'ubuntu22.04', cpu: 'amd64', compiler: *gcc11, std: [17]}
|
||||
- {cuda: *cuda_curr, os: 'ubuntu22.04', cpu: 'amd64', compiler: *gcc12, std: [17], extra_build_args: '-cmake-options -DCMAKE_CUDA_ARCHITECTURES=90a'}
|
||||
- {cuda: *cuda_curr, os: 'ubuntu22.04', cpu: 'amd64', compiler: *gcc12, std: [17]}
|
||||
- {cuda: *cuda_curr, os: 'ubuntu22.04', cpu: 'arm64', compiler: *gcc12, std: [17]}
|
||||
- {cuda: *cuda_curr, os: 'ubuntu20.04', cpu: 'amd64', compiler: *llvm9, std: [17]}
|
||||
- {cuda: *cuda_curr, os: 'ubuntu20.04', cpu: 'amd64', compiler: *llvm10, std: [17]}
|
||||
- {cuda: *cuda_curr, os: 'ubuntu20.04', cpu: 'amd64', compiler: *llvm11, std: [17]}
|
||||
- {cuda: *cuda_curr, os: 'ubuntu20.04', cpu: 'amd64', compiler: *llvm12, std: [17]}
|
||||
- {cuda: *cuda_curr, os: 'ubuntu20.04', cpu: 'amd64', compiler: *llvm13, std: [17]}
|
||||
- {cuda: *cuda_curr, os: 'ubuntu20.04', cpu: 'amd64', compiler: *llvm14, std: [17]}
|
||||
- {cuda: *cuda_curr, os: 'ubuntu22.04', cpu: 'amd64', compiler: *llvm15, std: [17]}
|
||||
- {cuda: *cuda_curr, os: 'ubuntu22.04', cpu: 'amd64', compiler: *llvm16, std: [17]}
|
||||
- {cuda: *cuda_curr, os: 'ubuntu22.04', cpu: 'arm64', compiler: *llvm16, std: [17]}
|
||||
- {cuda: *cuda_curr, os: 'windows2022', cpu: 'amd64', compiler: *msvc2019, std: [17]}
|
||||
- {cuda: *cuda_curr, os: 'windows2022', cpu: 'amd64', compiler: *msvc2022, std: [17]}
|
||||
- {cuda: *cuda_curr, os: 'ubuntu22.04', cpu: 'amd64', compiler: *oneapi, std: [17]}
|
||||
|
||||
27
ci/windows/test_nvbench.ps1
Normal file
27
ci/windows/test_nvbench.ps1
Normal file
@@ -0,0 +1,27 @@
|
||||
|
||||
Param(
|
||||
[Parameter(Mandatory = $true)]
|
||||
[Alias("std")]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[ValidateSet(17)]
|
||||
[int]$CXX_STANDARD = 17
|
||||
)
|
||||
|
||||
$CURRENT_PATH = Split-Path $pwd -leaf
|
||||
If($CURRENT_PATH -ne "ci") {
|
||||
Write-Host "Moving to ci folder"
|
||||
pushd "$PSScriptRoot/.."
|
||||
}
|
||||
|
||||
Remove-Module -Name build_common
|
||||
Import-Module $PSScriptRoot/build_common.psm1 -ArgumentList $CXX_STANDARD
|
||||
|
||||
$PRESET = "nvbench-cpp$CXX_STANDARD"
|
||||
$CMAKE_OPTIONS = ""
|
||||
|
||||
configure_and_build_preset "NVBench" "$PRESET" "$CMAKE_OPTIONS"
|
||||
test_preset "NVBench" "$PRESET"
|
||||
|
||||
If($CURRENT_PATH -ne "ci") {
|
||||
popd
|
||||
}
|
||||
Reference in New Issue
Block a user