This repository was archived by the owner on Mar 9, 2025. It is now read-only.
Go - Build and Test (CUDA) #3
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: Go - Build and Test (CUDA) | |
on: workflow_dispatch | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.21.x' | |
- name: Install Essential Tools | |
run: sudo apt-get install -y wget | |
- name: Install CUDA Toolkit | |
run: | | |
# Install CUDA Toolkit (replace with your specific installation commands) | |
wget https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64/cuda-wsl-ubuntu.pin | |
sudo mv cuda-wsl-ubuntu.pin /etc/apt/preferences.d/cuda-repository-pin-600 | |
wget https://developer.download.nvidia.com/compute/cuda/12.3.1/local_installers/cuda-repo-wsl-ubuntu-12-3-local_12.3.1-1_amd64.deb | |
sudo dpkg -i cuda-repo-wsl-ubuntu-12-3-local_12.3.1-1_amd64.deb | |
sudo cp /var/cuda-repo-wsl-ubuntu-12-3-local/cuda-96064797-keyring.gpg /usr/share/keyrings/ | |
sudo apt-get update | |
sudo apt-get -y install cuda-toolkit-12-3 | |
- name: Install CMake | |
run: sudo apt-get install -y cmake build-essential libtool autoconf unzip checkinstall zlib1g-dev libssl-dev | |
- name: Set Build Environment | |
run: | | |
echo "GOOS=linux" >> $GITHUB_ENV | |
echo "GOARCH=amd64" >> $GITHUB_ENV | |
- name: Build with Makefile | |
run: make all | |
- name: Create Artifacts | |
run: | | |
mkdir -p artifacts | |
cp eternal artifacts/ | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-artifacts | |
path: artifacts |