@@ -55,10 +55,14 @@ jobs:
55
55
# - name: Run cargo fmt
56
56
# run: cargo fmt --all -- --check
57
57
58
- test_release :
58
+ proof-params :
59
59
needs : set-msrv
60
60
runs-on : ubuntu-latest
61
- name : Build and test
61
+ name : Generate proof parameters and cache them
62
+ strategy :
63
+ matrix :
64
+ size : [2048, 4096]
65
+
62
66
steps :
63
67
- uses : actions/checkout@v4
64
68
- uses : dtolnay/rust-toolchain@master
@@ -67,17 +71,61 @@ jobs:
67
71
- name : Install required packages
68
72
run : sudo apt install --no-install-recommends --yes ocl-icd-opencl-dev libhwloc-dev
69
73
74
+ - name : Generate proof parameters
75
+ run : cargo run --release --no-default-features --bin paramcache -- --sector-sizes=${{ matrix.size }}
76
+
70
77
- name : Cache proof parameters
71
78
id : cache-parameters
72
- uses : actions/cache@v4
79
+ uses : actions/cache/save@v4
80
+ with :
81
+ path : /var/tmp/filecoin-proof-parameters/
82
+ key : proof-params-v28-n-${{ matrix.size }}-${{ hashFiles('filecoin-proofs/parameters.json') }}
83
+
84
+
85
+ test_release :
86
+ needs : [set-msrv, proof-params]
87
+ runs-on : ubuntu-latest
88
+ name : Test in release mode
89
+ steps :
90
+ - uses : actions/checkout@v4
91
+ - uses : dtolnay/rust-toolchain@master
92
+ with :
93
+ toolchain : ${{needs.set-msrv.outputs.msrv}}
94
+ - name : Install required packages
95
+ run : sudo apt install --no-install-recommends --yes ocl-icd-opencl-dev libhwloc-dev
96
+
97
+ # - name: Cache proof parameters
98
+ # id: cache-parameters
99
+ # uses: actions/cache@v4
100
+ # with:
101
+ # path: /var/tmp/filecoin-proof-parameters/
102
+ # #key: proof-params-v28-n-${{ runner.os }}-${{ hashFiles('filecoin-proofs/parameters.json') }}
103
+ # key: proof-params-v28-n-${{ hashFiles('filecoin-proofs/parameters.json') }}
104
+ # - name: Generate proof parameters
105
+ # if: steps.cache-parameters.outputs.cache-hit != 'true'
106
+ # #run: cargo build --release --no-default-features --bin paramcache --sector-sizes='2048,4096,16384,32768'
107
+ # run: cargo run --release --no-default-features --bin paramcache -- --sector-sizes='2048'
108
+
109
+ - name : Restore proof parameters cache 2KiB
110
+ id : cache-parameters
111
+ uses : actions/cache/restore@v4
73
112
with :
74
113
path : /var/tmp/filecoin-proof-parameters/
75
114
# key: proof-params-v28-n-${{ runner.os }}-${{ hashFiles('filecoin-proofs/parameters.json') }}
76
- key : proof-params-v28-n-${{ hashFiles('filecoin-proofs/parameters.json') }}
77
- - name : Generate proof parameters
78
- if : steps.cache-parameters.outputs.cache-hit != 'true'
79
- # run: cargo build --release --no-default-features --bin paramcache --sector-sizes='2048,4096,16384,32768'
80
- run : cargo run --release --no-default-features --bin paramcache -- --sector-sizes='2048'
115
+ key : proof-params-v28-n-2048-${{ hashFiles('filecoin-proofs/parameters.json') }}
116
+
117
+ - name : List parameter files:
118
+ run : ls -al /var/tmp/filecoin-proof-parameters/
119
+
120
+ - name : Restore proof parameters cache 4KiB
121
+ id : cache-parameters
122
+ uses : actions/cache/restore@v4
123
+ with :
124
+ path : /var/tmp/filecoin-proof-parameters/
125
+ key : proof-params-v28-n-4096-${{ hashFiles('filecoin-proofs/parameters.json') }}
126
+
127
+ - name : List parameter files:
128
+ run : ls -al /var/tmp/filecoin-proof-parameters/
81
129
82
130
- name : Test in release profile
83
131
run : cargo test --verbose --release --workspace --all-targets
0 commit comments