Skip to content

Commit 5200262

Browse files
authored
Switch over to self hosted CI (#1764)
* feat: convert CI to self-hosted runners * feat: only run CI on push, not both PR and push * fix: play with parallelism to avoid conflicts on runners
1 parent 152d802 commit 5200262

File tree

1 file changed

+27
-68
lines changed

1 file changed

+27
-68
lines changed

.github/workflows/ci.yml

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

3-
on: [pull_request, push]
3+
#on: [pull_request, push]
4+
on: [push]
45

56
# Cancel a job if there's a new on on the same branch started.
67
# Based on https://stackoverflow.com/questions/58895283/stop-already-running-workflow-job-in-github-actions/67223051#67223051
@@ -17,25 +18,23 @@ env:
1718

1819
jobs:
1920
check_clippy:
20-
runs-on: ubuntu-24.04
21+
runs-on: self-hosted
2122
name: Clippy
2223
steps:
2324
- uses: actions/checkout@v4
24-
- name: Install required packages
25-
run: sudo apt install --no-install-recommends --yes libhwloc-dev ocl-icd-opencl-dev
2625
- name: Run cargo clippy
2726
run: cargo clippy --all-targets --workspace -- -D warnings
2827

2928
check_fmt:
30-
runs-on: ubuntu-24.04
29+
runs-on: self-hosted
3130
name: Checking fmt
3231
steps:
3332
- uses: actions/checkout@v4
3433
- name: Run cargo fmt
3534
run: cargo fmt --all -- --check
3635

3736
test_release:
38-
runs-on: ubuntu-24.04
37+
runs-on: self-hosted
3938
name: Test in release mode
4039
strategy:
4140
matrix:
@@ -45,96 +44,56 @@ jobs:
4544
FIL_PROOFS_USE_MULTICORE_SDR: true
4645
steps:
4746
- uses: actions/checkout@v4
48-
- name: Install required packages
49-
run: sudo apt install --no-install-recommends --yes libhwloc-dev ocl-icd-opencl-dev
50-
51-
- name: Download the proof params
52-
uses: ./.github/actions/proof-params-download
53-
with:
54-
github-token: ${{ secrets.GITHUB_TOKEN }}
55-
5647
- name: Run usual tests in release profile
5748
run: cargo test --verbose --release --workspace --all-targets ${{ matrix.cargo-args }} -- --nocapture
5849
- name: Run isolated PoRep tests in release profile
59-
# Getting the cores does not work on GitHub Actions, hence skip that
60-
# specific test.
61-
run: cargo test --release -p storage-proofs-porep --features isolated-testing ${{ matrix.cargo-args }} -- --nocapture --skip stacked::vanilla::cores::tests::test_checkout_cores
50+
run: cargo test --release -p storage-proofs-porep --features isolated-testing ${{ matrix.cargo-args }} -- --nocapture --test-threads=1
6251
- name: Run isolated update tests in release profile
63-
# Some `storage-proofs-update` tests need to run sequentially due to
64-
# their high memory usage.
65-
run: cargo test --release -p storage-proofs-update --features isolated-testing ${{ matrix.cargo-args }} -- --nocapture --test-threads=1
52+
run: cargo test --release -p storage-proofs-update --features isolated-testing ${{ matrix.cargo-args }} -- --nocapture
6653

6754
test_ignored_release:
68-
runs-on: ubuntu-24.04
55+
runs-on: self-hosted
6956
name: Test ignored in release mode
7057
steps:
7158
- uses: actions/checkout@v4
72-
- name: Install required packages
73-
run: sudo apt install --no-install-recommends --yes libhwloc-dev ocl-icd-opencl-dev
74-
75-
- name: Download the proof params
76-
uses: ./.github/actions/proof-params-download
77-
with:
78-
github-token: ${{ secrets.GITHUB_TOKEN }}
79-
8059
- name: Test ignored in release profile
8160
run: cargo test --release --workspace -- ignored --nocapture
8261

8362
test_no_default_features:
84-
runs-on: ubuntu-24.04
63+
runs-on: self-hosted
8564
name: Test without default features
8665
steps:
8766
- uses: actions/checkout@v4
88-
- name: Install required packages
89-
run: sudo apt install --no-install-recommends --yes libhwloc-dev ocl-icd-opencl-dev
90-
91-
- name: Download the proof params
92-
uses: ./.github/actions/proof-params-download
93-
with:
94-
github-token: ${{ secrets.GITHUB_TOKEN }}
95-
9667
- name: Test ignored in release profile
9768
run: cargo test --release --workspace --no-default-features
9869

9970
build_gpu:
100-
runs-on: ubuntu-24.04
71+
runs-on: self-hosted
10172
name: Build with various GPU support enabled
10273
steps:
10374
- uses: actions/checkout@v4
104-
- name: Install required packages
105-
run: sudo apt install --no-install-recommends --yes libhwloc-dev nvidia-cuda-toolkit ocl-icd-opencl-dev
106-
10775
- name: Build with `cuda` and `opencl` features enabled
10876
run: cargo build --workspace --features cuda,opencl
10977
- name: Build with `cuda-supraseal` feature enabled
11078
run: CC=gcc-12 CXX=g++-12 NVCC_PREPEND_FLAGS='-ccbin /usr/bin/g++-12' cargo build --workspace --no-default-features --features cuda-supraseal
11179

112-
# Commented out until we run it on hardware with actual GPUs.
113-
#test_gpu:
114-
# runs-on: ubuntu-24.04
115-
# name: Test on GPUs
116-
# strategy:
117-
# matrix:
118-
# test-args: ['', '--ignored']
119-
# env:
120-
# FIL_PROOFS_USE_GPU_COLUMN_BUILDER: true
121-
# FIL_PROOFS_USE_GPU_TREE_BUILDER: true
122-
# BELLMAN_CUDA_NVCC_ARGS: --fatbin --gpu-architecture=sm_75 --generate-code=arch=compute_75,code=sm_75
123-
# NEPTUNE_CUDA_NVCC_ARGS: --fatbin --gpu-architecture=sm_75 --generate-code=arch=compute_75,code=sm_75
124-
# steps:
125-
# - uses: actions/checkout@v4
126-
# - name: Install required packages
127-
# run: sudo apt install --no-install-recommends --yes libhwloc-dev nvidia-cuda-toolkit ocl-icd-opencl-dev
128-
#
129-
# - name: Download the proof params
130-
# uses: ./.github/actions/proof-params-download
131-
# with:
132-
# github-token: ${{ secrets.GITHUB_TOKEN }}
133-
#
134-
# - name: Test with CUDA
135-
# run: cargo test --verbose --release --workspace --features cuda -- --nocapture ${{ matrix.test-args }}
136-
# - name: Test with `cuda-supraseal`
137-
# 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 }}
80+
test_gpu:
81+
runs-on: self-hosted
82+
name: Test on GPUs
83+
strategy:
84+
matrix:
85+
test-args: ['', '--ignored']
86+
env:
87+
FIL_PROOFS_USE_GPU_COLUMN_BUILDER: true
88+
FIL_PROOFS_USE_GPU_TREE_BUILDER: true
89+
BELLMAN_CUDA_NVCC_ARGS: --fatbin --gpu-architecture=sm_75 --generate-code=arch=compute_75,code=sm_75
90+
NEPTUNE_CUDA_NVCC_ARGS: --fatbin --gpu-architecture=sm_75 --generate-code=arch=compute_75,code=sm_75
91+
steps:
92+
- uses: actions/checkout@v4
93+
- name: Test with CUDA
94+
run: cargo test --verbose --release --workspace --features cuda -- --nocapture ${{ matrix.test-args }} -- --test-threads=1
95+
- name: Test with `cuda-supraseal`
96+
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 }}
13897

13998
test_macos:
14099
runs-on: macos-latest

0 commit comments

Comments
 (0)