Skip to content

fix cuda

fix cuda #12

Workflow file for this run

name: Build Release
on:
push:
branches:
- main
jobs:
release:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: "1.21"
- name: Setup CUDA
uses: Jimver/[email protected]
id: cuda-toolkit
with:
cuda: "12.1.0"
method: network
sub-packages: '["nvcc"]'
non-cuda-sub-packages: '["libcurand", "libcufft"]'
- name: Build Binary
run: go build -v
# - name: Get CUDA Libs (Linux)
# if: runner.os == 'Linux'
# run: |
# LIBCUFFT_PATH=$( ldd ./build/amumax-linux | grep libcufft | awk '{print $3}' )
# LIBCURAND_PATH=$( ldd ./build/amumax-linux | grep libcurand | awk '{print $3}' )
# echo "LIBCUFFT_PATH=${LIBCUFFT_PATH}" >> $GITHUB_ENV
# echo "LIBCURAND_PATH=${LIBCURAND_PATH}" >> $GITHUB_ENV
- name: Create Tag
run: |
TAG_NAME=$(date +'%Y.%m.%d')
echo "TAG_NAME=${TAG_NAME}" >> $GITHUB_ENV
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
git tag $TAG_NAME
git push origin $TAG_NAME
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ env.TAG_NAME }}
files: |
./amumax
./amumax.exe
# ${{ env.LIBCURAND_PATH }}
# ${{ env.LIBCUFFT_PATH }}