Skip to content

Merge pull request #5 from monofuel/hip-cpu-varargs #123

Merge pull request #5 from monofuel/hip-cpu-varargs

Merge pull request #5 from monofuel/hip-cpu-varargs #123

Workflow file for this run

name: Github Actions
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
# container:
# image: ubuntu:24.04
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: jiro4989/setup-nim-action@v2
with:
nim-version: 'devel'
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
run: |
sudo wget https://repo.radeon.com/rocm/rocm.gpg.key -O - | gpg --dearmor | sudo tee /etc/apt/keyrings/rocm.gpg > /dev/null
echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/rocm.gpg] https://repo.radeon.com/rocm/apt/6.1 jammy main" | sudo tee --append /etc/apt/sources.list.d/rocm.list
echo -e 'Package: *\nPin: release o=repo.radeon.com\nPin-Priority: 600' | sudo tee /etc/apt/preferences.d/rocm-pin-600
sudo apt-get update
# rocm takes up too much space for github ci runner
#sudo apt-get install -y hipcc rocm nvidia-cuda-toolkit
sudo apt-get install -y hipcc rocm-device-libs rocm-hip-runtime nvidia-cuda-toolkit
echo "/opt/rocm/bin" >> $GITHUB_PATH
echo "/usr/local/cuda/bin" >> $GITHUB_PATH
- name: Run Tests
run: |
nimble test -y
nimble test --gc:orc -y
- name: Build Examples
run: |
nim cpp examples/vector_sum_cpu.nim
nim cpp examples/vector_sum_cuda.nim
nim cpp examples/vector_sum_hippo.nim
nim cpp examples/vector_sum_hip_amd.nim
#nim cpp examples/vector_sum_hip_nvidia.nim
# - name: Execute CPU Example
# run: |
# ./examples/vector_sum_cpu