Skip to content

Commit 86a042f

Browse files
committed
chore: use action instead of a workflow
1 parent 38dd051 commit 86a042f

File tree

2 files changed

+47
-4
lines changed

2 files changed

+47
-4
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Download proof params
2+
3+
on: workflow_call
4+
workflow_call:
5+
inputs:
6+
# The hash of the parameters.json file.
7+
parameters-json-hash:
8+
required: true
9+
type: string
10+
#secrets:
11+
# token:
12+
# required: true
13+
14+
jobs:
15+
download:
16+
runs-on: ubuntu-latest
17+
name: Download proof params
18+
steps:
19+
#- uses: actions/checkout@v4
20+
- name: Get run-id from latest proof-params workflow run
21+
uses: octokit/[email protected]
22+
id: latest-proof-params
23+
with:
24+
route: GET /repos/filecoin-project/rust-fil-proofs/actions/workflows/proof-params.yml/runs?per_page=1
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
- name: Download all Artifacts from proof-params workflow
28+
uses: actions/download-artifact@v4
29+
with:
30+
pattern: proof-params-v28-n-${{ inputs.parameters-json-hash }}-*
31+
path: /var/tmp/filecoin-proof-parameters/
32+
merge-multiple: true
33+
run-id: ${{ fromJson(steps.latest-proof-params.outputs.data).workflow_runs[0].id }}
34+
github-token: ${{ secrets.GITHUB_TOKEN }}
35+
- name: Obtain Filecoin IPP parameter file
36+
# paramfetch is using `ipget` which currently always times out on
37+
# CI, hence get this file via HTTP instead.
38+
#cargo run --release --bin paramfetch -- -a -j srs-inner-product.json
39+
# `--insecure` is needed due to an outdated base systems.
40+
run: curl --insecure https://proofs.filecoin.io/v28-fil-inner-product-v1.srs --output /var/tmp/filecoin-proof-parameters/
41+
v28-fil-inner-product-v1.srs
42+
- name: List parameter files
43+
run: ls -al /var/tmp/filecoin-proof-parameters/

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,10 @@ jobs:
196196
#- name: List parameter files
197197
# run: ls -al /var/tmp/filecoin-proof-parameters/
198198

199-
#- name: Download the proof params
200-
# uses: ./.github/workflows/proof-params-download.yml
201-
# with:
202-
# parameters-json-hash: ${{ hashFiles('filecoin-proofs/parameters.json') }}
199+
- name: Download the proof params
200+
uses: ./.github/actions/proof-params-download.yml
201+
#with:
202+
# parameters-json-hash: ${{ hashFiles('filecoin-proofs/parameters.json') }}
203203

204204
- name: Test in release profile
205205
run: cargo test --verbose --release --workspace --all-targets

0 commit comments

Comments
 (0)