Skip to content

Commit fb1225b

Browse files
authored
Merge pull request #224 from filecoin-project/galargh/ci-speedup
ci: port CircleCI workflow to GitHub Actions
2 parents 9d65e3f + 23676ee commit fb1225b

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed

.github/workflows/ci.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Continuous integration
2+
3+
on:
4+
push:
5+
6+
jobs:
7+
rustfmt:
8+
runs-on: ubuntu-18.04
9+
steps:
10+
- uses: actions/[email protected]
11+
- uses: actions-rs/[email protected]
12+
with:
13+
profile: minimal
14+
override: true
15+
components: rustfmt
16+
- name: Check formatting
17+
run: cargo fmt -- --check
18+
check-clippy:
19+
runs-on: ubuntu-18.04
20+
steps:
21+
- uses: actions/[email protected]
22+
- uses: actions-rs/[email protected]
23+
with:
24+
profile: minimal
25+
target: wasm32-unknown-unknown
26+
override: true
27+
components: clippy
28+
# we don't check the lockfile in; this is needed for cache restoration/saving
29+
- uses: actions-rs/[email protected]
30+
with:
31+
command: generate-lockfile
32+
- uses: Swatinem/[email protected]
33+
with:
34+
# change this to invalidate cache for this job
35+
key: v0
36+
# otherwise the include_bytes! macro fails because this file hasn't been generated
37+
- run: touch examples/fvm/fvm_example_actor.wasm
38+
shell: bash
39+
- name: Run cargo clippy
40+
run: cargo clippy --all --all-targets
41+
shell: bash
42+
build:
43+
runs-on: ubuntu-18.04
44+
steps:
45+
- uses: actions/[email protected]
46+
- uses: actions/setup-go@v2
47+
with:
48+
go-version: 1.17.3
49+
- uses: actions-rs/[email protected]
50+
with:
51+
target: wasm32-unknown-unknown
52+
override: true
53+
# we don't check the lockfile in; this is needed for cache restoration/saving
54+
- uses: actions-rs/[email protected]
55+
with:
56+
command: generate-lockfile
57+
- uses: protocol/cache-go-action@v1
58+
- uses: Swatinem/[email protected]
59+
with:
60+
# change this to invalidate cache for this job
61+
key: v0
62+
- uses: actions-rs/[email protected]
63+
with:
64+
command: install
65+
args: cbindgen
66+
- name: Build on wasm32-unknown-unknown
67+
run: make RUSTFLAGS="-D warnings"
68+
shell: bash

0 commit comments

Comments
 (0)