@@ -10,82 +10,82 @@ jobs:
10
10
rustfmt :
11
11
runs-on : ubuntu-latest
12
12
steps :
13
- - name : Checking out fvm
13
+ - name : Checking out
14
14
uses : actions/checkout@v2
15
- - name : Installing Rust
16
- uses : actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7
17
- with :
18
- profile : minimal
19
- override : true
20
- components : rustfmt
21
- - name : Running fmt
22
- uses : actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1.0.3
15
+ - name : Running rustfmt
16
+ uses : ./.github/actions/rust-cargo-run
17
+ env :
18
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
23
19
with :
24
20
command : fmt
25
21
args : -- --check
26
- cargo :
22
+ components : rustfmt
23
+
24
+ check-clippy :
25
+ runs-on : ubuntu-latest
26
+ steps :
27
+ - name : Checking out
28
+ uses : actions/checkout@v2
29
+ - name : Running clippy
30
+ uses : ./.github/actions/rust-cargo-run
31
+ env :
32
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
33
+ with :
34
+ command : clippy
35
+ args : --all --all-targets
36
+ components : clippy
37
+
38
+ test :
39
+ runs-on : ubuntu-latest
40
+ steps :
41
+ - name : Checking out
42
+ uses : actions/checkout@v2
43
+ - name : Running tests
44
+ uses : ./.github/actions/rust-cargo-run
45
+ env :
46
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
47
+ with :
48
+ command : test
49
+ args : --all
50
+
51
+ build :
27
52
runs-on : ubuntu-latest
28
- strategy :
29
- matrix :
30
- include :
31
- - name : check-clippy
32
- command : clippy
33
- args : --all --all-targets
34
- components : clippy
35
- - name : test
36
- command : test
37
- args : --all
38
- - name : build
39
- command : build
40
- push : true
41
53
env :
42
- SCCACHE_CACHE_SIZE : 2G
43
- SCCACHE_DIR : ${{ github.workspace }}/.cache/sccache
44
54
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
45
55
CARGO_INCREMENTAL : 0
46
56
CACHE_SKIP_SAVE : ${{ matrix.push == '' || matrix.push == 'false' }}
47
- name : ${{ matrix.name }}
57
+ strategy :
58
+ matrix :
59
+ network : [ 'mainnet', 'caterpillarnet', 'butterflynet', 'calibrationnet', 'devnet' ]
48
60
steps :
49
- - name : Checking out builtin-actors
61
+ - name : Checking out
50
62
uses : actions/checkout@v2
63
+ - name : Install Rust toolchain
64
+ uses : ./.github/actions/rust-cargo-run
65
+ env :
66
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
51
67
with :
52
- submodules : ${{ matrix.submodules }}
53
- - name : Installing Rust
54
- uses : actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7
55
- with :
56
- profile : minimal
57
- target : wasm32-unknown-unknown
58
- override : true
59
- components : ${{ matrix.components }}
60
- # we don't check the lockfile in; this is needed for cache restoration/saving
61
- - name : Generating Cargo.lock
62
- uses : actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1.0.3
63
- with :
64
- command : generate-lockfile
65
- - name : Setting up cache
66
- uses : ./.github/actions/rust-sccache
67
- with :
68
- version : v0.2.15
69
- # change this to invalidate sccache for this job
70
- shared-key : v1
71
- - name : Running ${{ matrix.command }}
72
- uses : actions-rs/cargo@844f36862e911db73fe0815f00a4a2602c279505 # v1.0.3
73
- with :
74
- command : ${{ matrix.command }}
75
- args : ${{ matrix.args }}
76
- - name : make bundle
77
- if : ${{ matrix.command == 'build' }}
68
+ command : version
69
+ - name : Making bundle
70
+ env :
71
+ BUILD_FIL_NETWORK : ${{ matrix.network }}
78
72
run : ./build-bundle.sh
79
- - name : upload bundle
80
- if : ${{ matrix.command == 'build' }}
73
+ - name : Uploading bundle to Estuary
81
74
env :
82
75
ESTUARY_TOKEN : ${{ secrets.ESTUARY_TOKEN }}
83
- run : ./upload-bundle.sh
84
- - name : Publishing build artifacts to github
85
- if : ${{ matrix.command == 'build' }}
76
+ run : |
77
+ BUNDLE_PATH="output/builtin-actors.car"
78
+ UPLOAD_AS="builtin-actors-${{ matrix.network }}.car"
79
+ curl -k -X POST -F "data=@${BUNDLE_PATH};type=application/octet-stream;filename=\"${UPLOAD_AS}\"" \
80
+ -H "Authorization: Bearer $ESTUARY_TOKEN" \
81
+ -H "Content-Type: multipart/form-data" \
82
+ https://shuttle-4.estuary.tech/content/add > output/upload.json
83
+ cat output/upload.json
84
+ shasum -a 256 "$BUNDLE_PATH" > "$BUNDLE_PATH".sha256sum
85
+ - name : Publishing build artifacts to GitHub
86
86
uses : actions/upload-artifact@v2
87
87
with :
88
- name : bundle
88
+ name : bundle-${{ matrix.network }}
89
89
path : |
90
90
output/builtin-actors.car
91
91
output/builtin-actors.car.sha256sum
0 commit comments