-
Notifications
You must be signed in to change notification settings - Fork 127
48 lines (45 loc) · 1.44 KB
/
rust.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
name: Build and Test Spartan
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install
run: rustup default stable
- name: Install rustfmt Components
run: rustup component add rustfmt
- name: Install clippy
run: rustup component add clippy
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Build examples
run: cargo build --examples --verbose
- name: Check Rustfmt Code Style
run: cargo fmt --all -- --check
- name: Check clippy warnings
run: cargo clippy --all-targets --all-features -- -D warnings
build_wasm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install
run: rustup default stable
- name: Build without std
run: cargo build --no-default-features --verbose
- name: Run tests without std
run: cargo test --no-default-features --verbose
- name: Build examples without std
run: cargo build --examples --no-default-features --verbose
- name: Install wasm32-wasi target
run: rustup target add wasm32-wasi
- name: Install wasm32-unknown-unknown target
run: rustup target add wasm32-unknown-unknown
- name: Build for target wasm-wasi
run: RUSTFLAGS="" cargo build --target=wasm32-wasi --no-default-features --verbose