Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: port CircleCI workflow to GitHub Actions #224

Merged
merged 6 commits into from
Jan 5, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions .github/workflows/ci.yml
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/[email protected]
- uses: actions-rs/[email protected]
with:
profile: minimal
override: true
components: rustfmt
- name: Check formatting
run: cargo fmt -- --check
check-clippy:
runs-on: ubuntu-18.04
steps:
- uses: actions/[email protected]
- uses: actions-rs/[email protected]
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/[email protected]
with:
command: generate-lockfile
- uses: Swatinem/[email protected]
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/[email protected]
- uses: actions/setup-go@v2
with:
go-version: 1.17.3
- uses: actions-rs/[email protected]
with:
target: wasm32-unknown-unknown
override: true
# we don't check the lockfile in; this is needed for cache restoration/saving
- uses: actions-rs/[email protected]
with:
command: generate-lockfile
- uses: protocol/cache-go-action@v1
- uses: Swatinem/[email protected]
with:
# change this to invalidate cache for this job
key: v0
- uses: actions-rs/[email protected]
with:
command: install
args: cbindgen
- name: Build on wasm32-unknown-unknown
run: make RUSTFLAGS="-D warnings"
shell: bash