CI #14
Workflow file for this run
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
# copy of https://github.com/actions-rs/meta/blob/master/recipes/quickstart.md | |
on: | |
push: | |
branches: [main] | |
pull_request_review: | |
types: [submitted] | |
name: CI | |
jobs: | |
fmt: | |
name: cargo fmt | |
runs-on: ubuntu-latest | |
container: | |
image: rust:latest | |
steps: | |
- uses: actions/checkout@v3 | |
- run: | | |
rustup component add rustfmt | |
cargo fmt --all -- --check | |
clippy: | |
name: cargo clippy | |
runs-on: ubuntu-latest | |
container: | |
image: rust:latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-clippy | |
- run: | | |
rustup component add clippy | |
# Temporarily allowing dead-code, while denying all other warnings | |
cargo clippy --all-features --all-targets -- -A dead-code -D warnings | |
check: | |
name: Check | |
if: github.event.review.state == 'approved' | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
toolchain: stable-x86_64-unknown-linux-gnu | |
- os: macos-latest | |
toolchain: stable-x86_64-apple-darwin | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Checkout submodules | |
run: git submodule update --init --recursive | |
- uses: actions/setup-go@v4 # we need go to build go-waku | |
with: | |
go-version: '1.19' | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: ${{ matrix.toolchain }} | |
default: true | |
override: true | |
- uses: actions-rs/cargo@v1 | |
continue-on-error: false | |
with: | |
command: check | |
test: | |
name: Test Suite | |
if: github.event.review.state == 'approved' | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-latest | |
toolchain: stable-x86_64-unknown-linux-gnu | |
- os: macos-latest | |
toolchain: stable-x86_64-apple-darwin | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Checkout submodules | |
run: git submodule update --init --recursive | |
- uses: actions/setup-go@v4 # we need go to build go-waku | |
with: | |
go-version: '1.19' | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: ${{ matrix.toolchain }} | |
default: true | |
override: true | |
- uses: actions-rs/cargo@v1 | |
continue-on-error: false | |
with: | |
command: build | |
- uses: actions-rs/cargo@v1 | |
continue-on-error: false | |
with: | |
command: test |