1
1
name : CI
2
2
3
- on : [pull_request, push]
4
- # on: [push]
3
+ on :
4
+ pull_request :
5
+ push :
6
+ branches :
7
+ - master
8
+ - self-hosted
5
9
6
10
# Cancel a job if there's a new on on the same branch started.
7
11
# Based on https://stackoverflow.com/questions/58895283/stop-already-running-workflow-job-in-github-actions/67223051#67223051
23
27
steps :
24
28
- uses : actions/checkout@v4
25
29
- name : Install required packages
26
- run : sudo apt install --no-install-recommends --yes libhwloc-dev ocl-icd-opencl-dev
30
+ run : |
31
+ sudo apt-get update
32
+ sudo apt-get install --no-install-recommends --yes libhwloc-dev ocl-icd-opencl-dev
27
33
- name : Install cargo clippy
28
34
run : rustup component add clippy
29
35
- name : Run cargo clippy
@@ -40,33 +46,36 @@ jobs:
40
46
run : cargo fmt --all -- --check
41
47
42
48
test_release :
43
- runs-on : ubuntu-24.04
49
+ runs-on : ['self-hosted', 'linux', 'x64', '4xlarge']
44
50
name : Test in release mode
45
51
strategy :
46
52
matrix :
47
53
cargo-args : ['', '--features fixed-rows-to-discard']
54
+ fail-fast : false
48
55
env :
49
56
# Run all tests with multicore-SDR enabled.
50
57
FIL_PROOFS_USE_MULTICORE_SDR : true
51
58
steps :
52
59
- uses : actions/checkout@v4
53
60
- name : Install required packages
54
- run : sudo apt install --no-install-recommends --yes libhwloc-dev ocl-icd-opencl-dev
61
+ run : |
62
+ sudo apt-get update
63
+ sudo apt-get install --no-install-recommends --yes libhwloc-dev ocl-icd-opencl-dev
55
64
56
65
- name : Download the proof params
57
66
uses : ./.github/actions/proof-params-download
58
67
with :
59
68
github-token : ${{ secrets.GITHUB_TOKEN }}
60
69
70
+ - uses : dtolnay/rust-toolchain@21dc36fb71dd22e3317045c0c31a3f4249868b17
71
+ with :
72
+ toolchain : 1.83
73
+
61
74
- name : Run usual tests in release profile
62
75
run : cargo test --verbose --release --workspace --all-targets ${{ matrix.cargo-args }} -- --nocapture
63
76
- 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
77
+ run : cargo test --release -p storage-proofs-porep --features isolated-testing ${{ matrix.cargo-args }} -- --nocapture --test-threads=1
67
78
- 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
79
run : cargo test --release -p storage-proofs-update --features isolated-testing ${{ matrix.cargo-args }} -- --nocapture --test-threads=1
71
80
72
81
test_ignored_release :
75
84
steps :
76
85
- uses : actions/checkout@v4
77
86
- name : Install required packages
78
- run : sudo apt install --no-install-recommends --yes libhwloc-dev ocl-icd-opencl-dev
87
+ run : |
88
+ sudo apt-get update
89
+ sudo apt-get install --no-install-recommends --yes libhwloc-dev ocl-icd-opencl-dev
79
90
80
91
- name : Download the proof params
81
92
uses : ./.github/actions/proof-params-download
@@ -86,60 +97,86 @@ jobs:
86
97
run : cargo test --release --workspace -- ignored --nocapture
87
98
88
99
test_no_default_features :
89
- runs-on : ubuntu-24.04
100
+ runs-on : ['self-hosted', 'linux', 'x64', '2xlarge']
90
101
name : Test without default features
91
102
steps :
92
103
- uses : actions/checkout@v4
93
104
- name : Install required packages
94
- run : sudo apt install --no-install-recommends --yes libhwloc-dev ocl-icd-opencl-dev
105
+ run : |
106
+ sudo apt-get update
107
+ sudo apt-get install --no-install-recommends --yes libhwloc-dev ocl-icd-opencl-dev
95
108
96
109
- name : Download the proof params
97
110
uses : ./.github/actions/proof-params-download
98
111
with :
99
112
github-token : ${{ secrets.GITHUB_TOKEN }}
100
113
114
+ - uses : dtolnay/rust-toolchain@21dc36fb71dd22e3317045c0c31a3f4249868b17
115
+ with :
116
+ toolchain : 1.83
117
+
101
118
- name : Test ignored in release profile
102
119
run : cargo test --release --workspace --no-default-features
103
120
104
121
build_gpu :
105
- runs-on : ubuntu-24.04
122
+ runs-on : ['self-hosted', 'linux', 'x64', '2xlarge']
106
123
name : Build with various GPU support enabled
107
124
steps :
108
125
- uses : actions/checkout@v4
109
126
- name : Install required packages
110
- run : sudo apt install --no-install-recommends --yes libhwloc-dev nvidia-cuda-toolkit ocl-icd-opencl-dev
127
+ run : |
128
+ sudo apt-get update
129
+ sudo apt-get install --no-install-recommends --yes libhwloc-dev nvidia-cuda-toolkit ocl-icd-opencl-dev
130
+
131
+ - uses : dtolnay/rust-toolchain@21dc36fb71dd22e3317045c0c31a3f4249868b17
132
+ with :
133
+ toolchain : 1.83
111
134
112
135
- name : Build with `cuda` and `opencl` features enabled
113
136
run : cargo build --workspace --features cuda,opencl
114
137
- name : Build with `cuda-supraseal` feature enabled
115
138
run : CC=gcc-12 CXX=g++-12 NVCC_PREPEND_FLAGS='-ccbin /usr/bin/g++-12' cargo build --workspace --no-default-features --features cuda-supraseal
116
139
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 }}
140
+ test_gpu :
141
+ runs-on : ['self-hosted', 'linux', 'x64', '2xlarge+gpu']
142
+ name : Test on GPUs
143
+ strategy :
144
+ matrix :
145
+ test-args : ['', '--ignored']
146
+ fail-fast : false
147
+ env :
148
+ FIL_PROOFS_USE_GPU_COLUMN_BUILDER : true
149
+ FIL_PROOFS_USE_GPU_TREE_BUILDER : true
150
+ BELLMAN_CUDA_NVCC_ARGS : --fatbin --gpu-architecture=sm_75 --generate-code=arch=compute_75,code=sm_75
151
+ NEPTUNE_CUDA_NVCC_ARGS : --fatbin --gpu-architecture=sm_75 --generate-code=arch=compute_75,code=sm_75
152
+ steps :
153
+ - uses : actions/checkout@v4
154
+ - name : Install CUDA drivers
155
+ run : |
156
+ curl -L -o nvidia-driver-local-repo-ubuntu2404-570.148.08_1.0-1_amd64.deb https://us.download.nvidia.com/tesla/570.148.08/nvidia-driver-local-repo-ubuntu2404-570.148.08_1.0-1_amd64.deb
157
+ sudo dpkg -i nvidia-driver-local-repo-ubuntu2404-570.148.08_1.0-1_amd64.deb
158
+ sudo cp /var/nvidia-driver-local-repo-ubuntu2404-570.148.08/nvidia-driver-local-*-keyring.gpg /usr/share/keyrings/
159
+ sudo apt-get update
160
+ sudo apt-get install --no-install-recommends --yes cuda-drivers
161
+ rm nvidia-driver-local-repo-ubuntu2404-570.148.08_1.0-1_amd64.deb
162
+ - name : Install required packages
163
+ run : |
164
+ sudo apt-get update
165
+ sudo apt-get install --no-install-recommends --yes libhwloc-dev nvidia-cuda-toolkit ocl-icd-opencl-dev
166
+
167
+ - name : Download the proof params
168
+ uses : ./.github/actions/proof-params-download
169
+ with :
170
+ github-token : ${{ secrets.GITHUB_TOKEN }}
171
+
172
+ - uses : dtolnay/rust-toolchain@21dc36fb71dd22e3317045c0c31a3f4249868b17
173
+ with :
174
+ toolchain : 1.83
175
+
176
+ - name : Test with CUDA
177
+ run : cargo test --verbose --release --workspace --features cuda -- --nocapture --test-threads=1 ${{ matrix.test-args }}
178
+ - name : Test with `cuda-supraseal`
179
+ 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 }}
143
180
144
181
test_macos :
145
182
runs-on : macos-latest
0 commit comments