1+ # SPDX-FileCopyrightText: Copyright (c) 2023-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+ # SPDX-License-Identifier: Apache-2.0
3+ #
4+ # Licensed under the Apache License, Version 2.0 (the "License");
5+ # you may not use this file except in compliance with the License.
6+ # You may obtain a copy of the License at
7+ #
8+ # http://www.apache.org/licenses/LICENSE-2.0
9+ #
10+ # Unless required by applicable law or agreed to in writing, software
11+ # distributed under the License is distributed on an "AS IS" BASIS,
12+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ # See the License for the specific language governing permissions and
14+ # limitations under the License.
15+
16+ name : Clang 16 Build
17+
18+ defaults :
19+ run :
20+ shell : bash -euo pipefail {0}
21+
22+ on :
23+ push :
24+ branches :
25+ - " pull-request/[0-9]+"
26+ - main
27+ - dev
28+ pull_request :
29+ branches :
30+ - main
31+ - dev
32+ workflow_dispatch :
33+
34+ # Only runs one instance of this workflow at a time for a given ref and cancels any in-progress runs when a new one starts.
35+ concurrency :
36+ group : ${{ github.workflow }}-on-${{ github.event_name }}-from-${{ github.ref_name }}
37+ cancel-in-progress : true
38+
39+ jobs :
40+ clang16-build :
41+ name : Clang 16 CUDA ${{ matrix.cuda }} Build
42+ runs-on : ubuntu-latest
43+ strategy :
44+ fail-fast : false
45+ matrix :
46+ cuda : ["12.8"]
47+ std : [17]
48+ gpu_build_archs : ["70"]
49+ container :
50+ image : rapidsai/devcontainers:25.08-cpp-clang16-cuda${{ matrix.cuda }}-ubuntu22.04
51+ env :
52+ NVIDIA_VISIBLE_DEVICES : ${{ env.NVIDIA_VISIBLE_DEVICES }}
53+ CUDA_VERSION : ${{ matrix.cuda }}
54+
55+ steps :
56+ - name : Checkout repository
57+ uses : actions/checkout@v4
58+ with :
59+ fetch-depth : 0
60+
61+ - name : Setup build environment
62+ run : |
63+ echo "CUDA_VERSION=${{ matrix.cuda }}" >> $GITHUB_ENV
64+ echo "CXX_STD=${{ matrix.std }}" >> $GITHUB_ENV
65+ echo "GPU_BUILD_ARCHS=${{ matrix.gpu_build_archs }}" >> $GITHUB_ENV
66+
67+ - name : Build with Clang 16
68+ run : |
69+ ./ci/build.sh \
70+ --cxx clang++ \
71+ --std ${{ matrix.std }} \
72+ --arch ${{ matrix.gpu_build_archs }} \
73+ --infix amd64-clang16-cuda${{ matrix.cuda }}
74+ env :
75+ CXX : clang++
76+ CUDAHOSTCXX : clang++
77+
78+ - name : Run tests
79+ if : ${{ !contains(github.event.head_commit.message, 'skip-tests') }}
80+ run : |
81+ ./ci/test.sh \
82+ --tests \
83+ --cxx clang++ \
84+ --std ${{ matrix.std }} \
85+ --arch ${{ matrix.gpu_build_archs }} \
86+ --infix amd64-clang16-cuda${{ matrix.cuda }}
87+ env :
88+ CXX : clang++
89+ CUDAHOSTCXX : clang++
90+
91+ - name : Upload build artifacts
92+ if : always()
93+ uses : actions/upload-artifact@v4
94+ with :
95+ name : clang16-build-artifacts-cuda${{ matrix.cuda }}-std${{ matrix.std }}
96+ path : |
97+ build/
98+ !build/**/*.o
99+ !build/**/*.a
100+ retention-days : 7
101+
102+ clang16-success :
103+ runs-on : ubuntu-latest
104+ name : Clang 16 Build Success
105+ if : ${{ always() }}
106+ needs :
107+ - clang16-build
108+ steps :
109+ - name : Check status of Clang 16 build
110+ if : >-
111+ ${{
112+ contains(needs.*.result, 'failure')
113+ || contains(needs.*.result, 'cancelled')
114+ || contains(needs.*.result, 'skipped')
115+ }}
116+ run : |
117+ echo "❌ Clang 16 build failed or was cancelled"
118+ exit 1
119+ - name : Success
120+ run : |
121+ echo "✅ Clang 16 build completed successfully"
0 commit comments