Update c-cpp.yml #29
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 update | |
wget http://security.ubuntu.com/ubuntu/pool/universe/n/ncurses/libtinfo5_6.3-2ubuntu0.1_amd64.deb | |
sudo apt install -y ./libtinfo5_6.3-2ubuntu0.1_amd64.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 "/usr/local/cuda-12.6/lib64" >> $GITHUB_PATH | |
echo "LD_LIBRARY_PATH=/usr/local/cuda-12.6/lib64:$LD_LIBRARY_PATH" >> $GITHUB_ENV | |
export PATH=/usr/local/cuda-12.6/bin:$PATH | |
- name: Verify NVCC and GCC Installation | |
run: | | |
nvcc --version | |
gcc --version | |
- name: Compile CUDA Code | |
run: nvcc -std=c++17 *.cu *.cpp -o "CATE" | |
- name: Run Tests | |
run: ./CATE -h |