-
Notifications
You must be signed in to change notification settings - Fork 21
49 lines (45 loc) · 1.33 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
features: ["atomic", "atomic,fallback-coarse"]
rust: [stable]
env:
RUST_BACKTRACE: 1
steps:
- uses: actions/checkout@v2
- name: Set up toolchains
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
components: rustfmt, clippy
- name: Check format
run: cargo fmt --all -- --check
- name: Build
run: cargo build --workspace --all-targets --features ${{ matrix.features }}
- name: Clippy
run: cargo clippy --workspace --all-targets --features ${{ matrix.features }} -- -D warnings
- name: Run tests
run: cargo test --workspace --all-targets --features ${{ matrix.features }} -- --nocapture
- name: Run benches
run: cargo bench --workspace --all-targets --features ${{ matrix.features }}
build-wasm:
runs-on: ubuntu-latest
env:
RUST_BACKTRACE: 1
steps:
- uses: actions/checkout@v2
- name: Set up toolchains
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- run: wasm-pack test --node