From 0c9d03276206a5f59368e908e3d643610f9fddcd Mon Sep 17 00:00:00 2001 From: Jake Hemstad Date: Thu, 25 Jan 2024 11:58:19 -0500 Subject: [PATCH] Revert "Separate windows and Linux CI matrix " (#1324) --- .devcontainer/make_devcontainers.sh | 4 ++-- .../actions/compute-matrix/compute-matrix.sh | 16 +++++----------- .github/workflows/pr.yml | 18 ++++++++---------- ci/matrix.yaml | 5 +---- 4 files changed, 16 insertions(+), 27 deletions(-) diff --git a/.devcontainer/make_devcontainers.sh b/.devcontainer/make_devcontainers.sh index 6a43a0af4ec..64b92c0883e 100755 --- a/.devcontainer/make_devcontainers.sh +++ b/.devcontainer/make_devcontainers.sh @@ -85,13 +85,13 @@ fi matrix_json=$(yq -o json ${MATRIX_FILE}) # Exclude Windows environments -readonly matrix_json=$(echo "$matrix_json" | jq 'del(.pull_request.nvcc.windows)') +readonly matrix_json=$(echo "$matrix_json" | jq 'del(.pull_request.nvcc[] | select(.os | contains("windows")))') # Get the devcontainer image version and define image tag root readonly DEVCONTAINER_VERSION=$(echo "$matrix_json" | jq -r '.devcontainer_version') # Get unique combinations of cuda version, compiler name/version, and Ubuntu version -readonly combinations=$(echo "$matrix_json" | jq -c '[.pull_request.nvcc.linux[] | {cuda: .cuda, compiler_name: .compiler.name, compiler_exe: .compiler.exe, compiler_version: .compiler.version, os: .os}] | unique | .[]') +readonly combinations=$(echo "$matrix_json" | jq -c '[.pull_request.nvcc[] | {cuda: .cuda, compiler_name: .compiler.name, compiler_exe: .compiler.exe, compiler_version: .compiler.version, os: .os}] | unique | .[]') # Update the base devcontainer with the default values # The root devcontainer.json file is used as the default container as well as a template for all diff --git a/.github/actions/compute-matrix/compute-matrix.sh b/.github/actions/compute-matrix/compute-matrix.sh index f97a12fcd34..0b27d2b6faf 100755 --- a/.github/actions/compute-matrix/compute-matrix.sh +++ b/.github/actions/compute-matrix/compute-matrix.sh @@ -19,19 +19,13 @@ explode_libs() { extract_matrix() { local file="$1" local type="$2" - - write_output "DEVCONTAINER_VERSION" "$(yq -o json "$file" | jq -cr '.devcontainer_version')" - local matrix=$(yq -o=json "$file" | jq -cr ".$type") - local nvcc_full_linux_matrix="$(echo "$matrix" | jq -cr '.nvcc.linux' | explode_std_versions )" - local linux_per_cuda_compiler_matrix="$(echo "$nvcc_full_linux_matrix" | jq -cr ' group_by(.cuda + .compiler.name) | map({(.[0].cuda + "-" + .[0].compiler.name): .}) | add')" - write_output "LINUX_PER_CUDA_COMPILER_MATRIX" "$linux_per_cuda_compiler_matrix" - write_output "LINUX_PER_CUDA_COMPILER_KEYS" "$(echo "$linux_per_cuda_compiler_matrix" | jq -r 'keys | @json')" + write_output "DEVCONTAINER_VERSION" "$(yq -o json "$file" | jq -cr '.devcontainer_version')" - local nvcc_full_windows_matrix="$(echo "$matrix" | jq -cr '.nvcc.windows' | explode_std_versions )" - local windows_per_cuda_compiler_matrix="$(echo "$nvcc_full_windows_matrix" | jq -cr ' group_by(.cuda + .compiler.name) | map({(.[0].cuda + "-" + .[0].compiler.name): .}) | add')" - write_output "WINDOWS_PER_CUDA_COMPILER_MATRIX" "$windows_per_cuda_compiler_matrix" - write_output "WINDOWS_PER_CUDA_COMPILER_KEYS" "$(echo "$windows_per_cuda_compiler_matrix" | jq -r 'keys | @json')" + local nvcc_full_matrix="$(echo "$matrix" | jq -cr '.nvcc' | explode_std_versions )" + local per_cuda_compiler_matrix="$(echo "$nvcc_full_matrix" | jq -cr ' group_by(.cuda + .compiler.name) | map({(.[0].cuda + "-" + .[0].compiler.name): .}) | add')" + write_output "PER_CUDA_COMPILER_MATRIX" "$per_cuda_compiler_matrix" + write_output "PER_CUDA_COMPILER_KEYS" "$(echo "$per_cuda_compiler_matrix" | jq -r 'keys | @json')" write_output "NVRTC_MATRIX" "$(echo "$matrix" | jq '.nvrtc' | explode_std_versions)" diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 52f9847031d..8eaf3e31518 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -40,10 +40,8 @@ jobs: runs-on: ubuntu-latest outputs: DEVCONTAINER_VERSION: ${{steps.set-outputs.outputs.DEVCONTAINER_VERSION}} - LINUX_PER_CUDA_COMPILER_MATRIX: ${{steps.set-outputs.outputs.LINUX_PER_CUDA_COMPILER_MATRIX}} - LINUX_PER_CUDA_COMPILER_KEYS: ${{steps.set-outputs.outputs.LINUX_PER_CUDA_COMPILER_KEYS}} - WINDOWS_PER_CUDA_COMPILER_MATRIX: ${{steps.set-outputs.outputs.WINDOWS_PER_CUDA_COMPILER_MATRIX}} - WINDOWS_PER_CUDA_COMPILER_KEYS: ${{steps.set-outputs.outputs.WINDOWS_PER_CUDA_COMPILER_KEYS}} + PER_CUDA_COMPILER_MATRIX: ${{steps.set-outputs.outputs.PER_CUDA_COMPILER_MATRIX}} + PER_CUDA_COMPILER_KEYS: ${{steps.set-outputs.outputs.PER_CUDA_COMPILER_KEYS}} NVRTC_MATRIX: ${{steps.set-outputs.outputs.NVRTC_MATRIX}} CLANG_CUDA_MATRIX: ${{steps.set-outputs.outputs.CLANG_CUDA_MATRIX}} CCCL_INFRA_MATRIX: ${{steps.set-outputs.outputs.CCCL_INFRA_MATRIX}} @@ -84,10 +82,10 @@ jobs: strategy: fail-fast: false matrix: - cuda_host_combination: ${{ fromJSON(needs.compute-matrix.outputs.LINUX_PER_CUDA_COMPILER_KEYS) }} + cuda_host_combination: ${{ fromJSON(needs.compute-matrix.outputs.PER_CUDA_COMPILER_KEYS) }} with: project_name: "thrust" - per_cuda_compiler_matrix: ${{ toJSON(fromJSON(needs.compute-matrix.outputs.LINUX_PER_CUDA_COMPILER_MATRIX)[ matrix.cuda_host_combination ]) }} + per_cuda_compiler_matrix: ${{ toJSON(fromJSON(needs.compute-matrix.outputs.PER_CUDA_COMPILER_MATRIX)[ matrix.cuda_host_combination ]) }} devcontainer_version: ${{ needs.compute-matrix.outputs.DEVCONTAINER_VERSION }} is_windows: ${{ contains(matrix.cuda_host_combination, 'cl') }} @@ -101,10 +99,10 @@ jobs: strategy: fail-fast: false matrix: - cuda_host_combination: ${{ fromJSON(needs.compute-matrix.outputs.LINUX_PER_CUDA_COMPILER_KEYS) }} + cuda_host_combination: ${{ fromJSON(needs.compute-matrix.outputs.PER_CUDA_COMPILER_KEYS) }} with: project_name: "cub" - per_cuda_compiler_matrix: ${{ toJSON(fromJSON(needs.compute-matrix.outputs.LINUX_PER_CUDA_COMPILER_MATRIX)[ matrix.cuda_host_combination ]) }} + per_cuda_compiler_matrix: ${{ toJSON(fromJSON(needs.compute-matrix.outputs.PER_CUDA_COMPILER_MATRIX)[ matrix.cuda_host_combination ]) }} devcontainer_version: ${{ needs.compute-matrix.outputs.DEVCONTAINER_VERSION }} is_windows: ${{ contains(matrix.cuda_host_combination, 'cl') }} @@ -118,10 +116,10 @@ jobs: strategy: fail-fast: false matrix: - cuda_host_combination: ${{ fromJSON(needs.compute-matrix.outputs.LINUX_PER_CUDA_COMPILER_KEYS) }} + cuda_host_combination: ${{ fromJSON(needs.compute-matrix.outputs.PER_CUDA_COMPILER_KEYS) }} with: project_name: "libcudacxx" - per_cuda_compiler_matrix: ${{ toJSON(fromJSON(needs.compute-matrix.outputs.LINUX_PER_CUDA_COMPILER_MATRIX)[ matrix.cuda_host_combination ]) }} + per_cuda_compiler_matrix: ${{ toJSON(fromJSON(needs.compute-matrix.outputs.PER_CUDA_COMPILER_MATRIX)[ matrix.cuda_host_combination ]) }} devcontainer_version: ${{ needs.compute-matrix.outputs.DEVCONTAINER_VERSION }} is_windows: ${{ contains(matrix.cuda_host_combination, 'cl') }} diff --git a/ci/matrix.yaml b/ci/matrix.yaml index 8face973208..23e02525437 100644 --- a/ci/matrix.yaml +++ b/ci/matrix.yaml @@ -56,12 +56,12 @@ oneapi: &oneapi { name: 'oneapi', version: '2023.2.0', exe: 'icpc' } # Configurations that will run for every PR pull_request: nvcc: - linux: - {cuda: *cuda_oldest, os: 'ubuntu18.04', cpu: 'amd64', compiler: *gcc6, std: [11, 14], jobs: ['build']} - {cuda: *cuda_oldest, os: 'ubuntu18.04', cpu: 'amd64', compiler: *gcc7, std: [11, 14, 17], jobs: ['build']} - {cuda: *cuda_oldest, os: 'ubuntu18.04', cpu: 'amd64', compiler: *gcc8, std: [11, 14, 17], jobs: ['build']} - {cuda: *cuda_oldest, os: 'ubuntu18.04', cpu: 'amd64', compiler: *gcc9, std: [11, 14, 17], jobs: ['build']} - {cuda: *cuda_oldest, os: 'ubuntu18.04', cpu: 'amd64', compiler: *llvm9, std: [11, 14, 17], jobs: ['build']} + - {cuda: *cuda_oldest, os: 'windows2022', cpu: 'amd64', compiler: *msvc2017, std: [14, 17], jobs: ['build']} - {cuda: *cuda_newest, os: 'ubuntu20.04', cpu: 'amd64', compiler: *gcc7, std: [11, 14, 17], jobs: ['build']} - {cuda: *cuda_newest, os: 'ubuntu20.04', cpu: 'amd64', compiler: *gcc8, std: [11, 14, 17], jobs: ['build']} - {cuda: *cuda_newest, os: 'ubuntu20.04', cpu: 'amd64', compiler: *gcc9, std: [11, 14, 17], jobs: ['build']} @@ -78,9 +78,6 @@ pull_request: - {cuda: *cuda_newest, os: 'ubuntu22.04', cpu: 'amd64', compiler: *llvm15, std: [11, 14, 17, 20], jobs: ['build']} - {cuda: *cuda_newest, os: 'ubuntu22.04', cpu: 'amd64', compiler: *llvm16, std: [11, 14, 17, 20], jobs: ['build', 'test']} - {cuda: *cuda_newest, os: 'ubuntu22.04', cpu: 'arm64', compiler: *llvm16, std: [11, 14, 17, 20], jobs: ['build']} - - {cuda: *cuda_newest, os: 'ubuntu22.04', cpu: 'amd64', compiler: *oneapi, std: [11, 14, 17], jobs: ['build']} - windows: - - {cuda: *cuda_oldest, os: 'windows2022', cpu: 'amd64', compiler: *msvc2017, std: [14, 17], jobs: ['build']} - {cuda: *cuda_newest, os: 'windows2022', cpu: 'amd64', compiler: *msvc2019, std: [14, 17], jobs: ['build']} - {cuda: *cuda_newest, os: 'windows2022', cpu: 'amd64', compiler: *msvc2022, std: [14, 17, 20], jobs: ['build']} - {cuda: *cuda_newest, os: 'ubuntu22.04', cpu: 'amd64', compiler: *oneapi, std: [11, 14, 17], jobs: ['build']}