-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (36 loc) · 1.21 KB
/
Copy pathc-cpp.yml
File metadata and controls
44 lines (36 loc) · 1.21 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
name: C/C++ CUDA CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install libtinfo5 Manually
run: |
sudo apt-get update
BASE="http://security.ubuntu.com/ubuntu/pool/universe/n/ncurses/"
DEB=$(curl -s "$BASE" | grep -oE 'libtinfo5_6\.3[^"]+_amd64\.deb' | sort -V | tail -1)
echo "Fetching $DEB"
wget -q "${BASE}${DEB}"
sudo apt-get install -y "./${DEB}"
- name: Install CUDA Toolkit 12.6
run: |
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.0-1_all.deb
sudo dpkg -i cuda-keyring_1.0-1_all.deb
sudo apt-get update
sudo apt-get install -y cuda-toolkit-12-6
- name: Add CUDA to PATH
run: |
echo "/usr/local/cuda-12.6/bin" >> $GITHUB_PATH
echo "LD_LIBRARY_PATH=/usr/local/cuda-12.6/lib64:$LD_LIBRARY_PATH" >> $GITHUB_ENV
- name: Verify NVCC and GCC Installation
run: |
nvcc --version
gcc --version
- name: Compile CUDA Code
run: nvcc -std=c++17 *.cu *.cpp -o "CATE_test"