Merge pull request #4 from AndrewBoessen/global #24
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: Build with CUDA and C++ | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Install CUDA and dependencies | |
run: | | |
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb | |
sudo dpkg -i cuda-keyring_1.1-1_all.deb | |
sudo apt-get update | |
# install CUDA toolkit | |
sudo apt-get -y install nvidia-cuda-toolkit | |
# Install other necessary dependencies like build-essential | |
sudo apt-get install -y build-essential | |
# Verify that CUDA is installed | |
nvcc --version | |
g++ --version | |
- name: Build with Makefile | |
run: | | |
# Make sure the Makefile exists and then build the project | |
if [ -f Makefile ]; then | |
make | |
else | |
echo "Makefile not found!" | |
exit 1 | |
fi | |
- name: Run tests (optional) | |
run: | | |
# Run tests if you have them defined | |
# Example: ./test_program | |
echo "No tests defined" | |