-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #224 from filecoin-project/galargh/ci-speedup
ci: port CircleCI workflow to GitHub Actions
- Loading branch information
Showing
1 changed file
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: Continuous integration | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
rustfmt: | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v2.4.0 | ||
- uses: actions-rs/toolchain@v1.0.7 | ||
with: | ||
profile: minimal | ||
override: true | ||
components: rustfmt | ||
- name: Check formatting | ||
run: cargo fmt -- --check | ||
check-clippy: | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v2.4.0 | ||
- uses: actions-rs/toolchain@v1.0.7 | ||
with: | ||
profile: minimal | ||
target: wasm32-unknown-unknown | ||
override: true | ||
components: clippy | ||
# we don't check the lockfile in; this is needed for cache restoration/saving | ||
- uses: actions-rs/cargo@v1.0.3 | ||
with: | ||
command: generate-lockfile | ||
- uses: Swatinem/rust-cache@v1.3.0 | ||
with: | ||
# change this to invalidate cache for this job | ||
key: v0 | ||
# otherwise the include_bytes! macro fails because this file hasn't been generated | ||
- run: touch examples/fvm/fvm_example_actor.wasm | ||
shell: bash | ||
- name: Run cargo clippy | ||
run: cargo clippy --all --all-targets | ||
shell: bash | ||
build: | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@v2.4.0 | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.17.3 | ||
- uses: actions-rs/toolchain@v1.0.7 | ||
with: | ||
target: wasm32-unknown-unknown | ||
override: true | ||
# we don't check the lockfile in; this is needed for cache restoration/saving | ||
- uses: actions-rs/cargo@v1.0.3 | ||
with: | ||
command: generate-lockfile | ||
- uses: protocol/cache-go-action@v1 | ||
- uses: Swatinem/rust-cache@v1.3.0 | ||
with: | ||
# change this to invalidate cache for this job | ||
key: v0 | ||
- uses: actions-rs/cargo@v1.0.3 | ||
with: | ||
command: install | ||
args: cbindgen | ||
- name: Build on wasm32-unknown-unknown | ||
run: make RUSTFLAGS="-D warnings" | ||
shell: bash |