-
Notifications
You must be signed in to change notification settings - Fork 24
84 lines (73 loc) · 2.5 KB
/
cpp-build-test.yml
File metadata and controls
84 lines (73 loc) · 2.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: C++ Build & Test
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: cpp-build-test-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build-and-test:
name: Build & Test
runs-on: colossus
container:
image: nvcr.io/nvidia/cuda:12.6.3-devel-ubuntu22.04
options: --gpus all
timeout-minutes: 90
steps:
- name: Verify GPU access
shell: bash
run: |
set -xeuo pipefail
nvidia-smi
- name: Check out source tree
uses: actions/checkout@v4
- name: Install dependencies
shell: bash
run: bash admin/ci/setup_dependencies.sh 3.12 2025.03.6
- name: Configure
shell: bash
env:
CUDA_HOME: /usr/local/cuda
run: |
set -xeo pipefail
. /usr/local/anaconda/etc/profile.d/conda.sh && conda activate base
export LD_LIBRARY_PATH="/usr/local/cuda/lib64${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
cmake -S . -B build \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc \
-DNVMOLKIT_EXTRA_DEV_FLAGS=OFF \
-DNVMOLKIT_BUILD_BENCHMARKS=ON \
-DNVMOLKIT_BUILD_PYTHON_BINDINGS=ON \
-DNVMOLKIT_BUILD_TESTS=ON \
-DNVMOLKIT_CUDA_TARGET_MODE=native
- name: Build
shell: bash
run: |
set -xeo pipefail
. /usr/local/anaconda/etc/profile.d/conda.sh && conda activate base
cmake --build build --parallel $(nproc)
- name: Test
shell: bash
run: |
set -xeo pipefail
. /usr/local/anaconda/etc/profile.d/conda.sh && conda activate base
ctest --test-dir build --output-on-failure