Skip to content

Commit 455f743

Browse files
committed
ci: test gpu on self-hosted runners
1 parent 0e2b1cc commit 455f743

File tree

1 file changed

+35
-35
lines changed

1 file changed

+35
-35
lines changed

.github/workflows/ci.yml

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
name: CI
22

3-
on: [pull_request, push]
4-
#on: [push]
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
- self-hosted
59

610
# Cancel a job if there's a new on on the same branch started.
711
# Based on https://stackoverflow.com/questions/58895283/stop-already-running-workflow-job-in-github-actions/67223051#67223051
@@ -40,7 +44,7 @@ jobs:
4044
run: cargo fmt --all -- --check
4145

4246
test_release:
43-
runs-on: ubuntu-24.04
47+
runs-on: ['self-hosted', 'linux', 'x64', '2xlarge']
4448
name: Test in release mode
4549
strategy:
4650
matrix:
@@ -50,6 +54,7 @@ jobs:
5054
FIL_PROOFS_USE_MULTICORE_SDR: true
5155
steps:
5256
- uses: actions/checkout@v4
57+
5358
- name: Install required packages
5459
run: sudo apt install --no-install-recommends --yes libhwloc-dev ocl-icd-opencl-dev
5560

@@ -61,13 +66,9 @@ jobs:
6166
- name: Run usual tests in release profile
6267
run: cargo test --verbose --release --workspace --all-targets ${{ matrix.cargo-args }} -- --nocapture
6368
- name: Run isolated PoRep tests in release profile
64-
# Getting the cores does not work on GitHub Actions, hence skip that
65-
# specific test.
66-
run: cargo test --release -p storage-proofs-porep --features isolated-testing ${{ matrix.cargo-args }} -- --nocapture --skip stacked::vanilla::cores::tests::test_checkout_cores
69+
run: cargo test --release -p storage-proofs-porep --features isolated-testing ${{ matrix.cargo-args }} -- --nocapture
6770
- name: Run isolated update tests in release profile
68-
# Some `storage-proofs-update` tests need to run sequentially due to
69-
# their high memory usage.
70-
run: cargo test --release -p storage-proofs-update --features isolated-testing ${{ matrix.cargo-args }} -- --nocapture --test-threads=1
71+
run: cargo test --release -p storage-proofs-update --features isolated-testing ${{ matrix.cargo-args }} -- --nocapture
7172

7273
test_ignored_release:
7374
runs-on: ubuntu-24.04
@@ -114,32 +115,31 @@ jobs:
114115
- name: Build with `cuda-supraseal` feature enabled
115116
run: CC=gcc-12 CXX=g++-12 NVCC_PREPEND_FLAGS='-ccbin /usr/bin/g++-12' cargo build --workspace --no-default-features --features cuda-supraseal
116117

117-
# Commented out until we run it on hardware with actual GPUs.
118-
#test_gpu:
119-
# runs-on: ubuntu-24.04
120-
# name: Test on GPUs
121-
# strategy:
122-
# matrix:
123-
# test-args: ['', '--ignored']
124-
# env:
125-
# FIL_PROOFS_USE_GPU_COLUMN_BUILDER: true
126-
# FIL_PROOFS_USE_GPU_TREE_BUILDER: true
127-
# BELLMAN_CUDA_NVCC_ARGS: --fatbin --gpu-architecture=sm_75 --generate-code=arch=compute_75,code=sm_75
128-
# NEPTUNE_CUDA_NVCC_ARGS: --fatbin --gpu-architecture=sm_75 --generate-code=arch=compute_75,code=sm_75
129-
# steps:
130-
# - uses: actions/checkout@v4
131-
# - name: Install required packages
132-
# run: sudo apt install --no-install-recommends --yes libhwloc-dev nvidia-cuda-toolkit ocl-icd-opencl-dev
133-
#
134-
# - name: Download the proof params
135-
# uses: ./.github/actions/proof-params-download
136-
# with:
137-
# github-token: ${{ secrets.GITHUB_TOKEN }}
138-
#
139-
# - name: Test with CUDA
140-
# run: cargo test --verbose --release --workspace --features cuda -- --nocapture ${{ matrix.test-args }}
141-
# - name: Test with `cuda-supraseal`
142-
# run: CC=gcc-12 CXX=g++-12 NVCC_PREPEND_FLAGS='-ccbin /usr/bin/g++-12' cargo test -p filecoin-proofs --release --no-default-features --features cuda-supraseal -- --nocapture --test-threads=1 ${{ matrix.test-args }}
118+
test_gpu:
119+
runs-on: ['self-hosted', 'linux', 'x64', '2xlarge+gpu']
120+
name: Test on GPUs
121+
strategy:
122+
matrix:
123+
test-args: ['', '--ignored']
124+
env:
125+
FIL_PROOFS_USE_GPU_COLUMN_BUILDER: true
126+
FIL_PROOFS_USE_GPU_TREE_BUILDER: true
127+
BELLMAN_CUDA_NVCC_ARGS: --fatbin --gpu-architecture=sm_75 --generate-code=arch=compute_75,code=sm_75
128+
NEPTUNE_CUDA_NVCC_ARGS: --fatbin --gpu-architecture=sm_75 --generate-code=arch=compute_75,code=sm_75
129+
steps:
130+
- uses: actions/checkout@v4
131+
- name: Install required packages
132+
run: sudo apt install --no-install-recommends --yes libhwloc-dev nvidia-cuda-toolkit ocl-icd-opencl-dev
133+
134+
- name: Download the proof params
135+
uses: ./.github/actions/proof-params-download
136+
with:
137+
github-token: ${{ secrets.GITHUB_TOKEN }}
138+
139+
- name: Test with CUDA
140+
run: cargo test --verbose --release --workspace --features cuda -- --nocapture ${{ matrix.test-args }}
141+
- name: Test with `cuda-supraseal`
142+
run: CC=gcc-12 CXX=g++-12 NVCC_PREPEND_FLAGS='-ccbin /usr/bin/g++-12' cargo test -p filecoin-proofs --release --no-default-features --features cuda-supraseal -- --nocapture ${{ matrix.test-args }}
143143

144144
test_macos:
145145
runs-on: macos-latest

0 commit comments

Comments
 (0)