-
Notifications
You must be signed in to change notification settings - Fork 52
58 lines (54 loc) · 1.66 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
49
50
51
52
53
54
55
56
57
58
name: CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
name: "Check OS"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
env:
CLIPPY_LINTS: >-
-D clippy::all
-D deprecated-safe
-D future-incompatible
-D keyword-idents
-D let-underscore
-D nonstandard-style
-D refining-impl-trait
-D rust-2018-compatibility
-D rust-2018-idioms
-D rust-2021-compatibility
-D rust-2024-compatibility
-D unused
-D unsafe_code
-D unreachable-pub
-D missing-docs
steps:
- uses: actions/checkout@v3
- name: Build
run: cargo build --verbose
- name: Install cargo-expand
run: cargo install cargo-expand
- name: Run tests
run: cargo test --verbose
- name: Clippy
run: cargo clippy --examples --bins --all -- ${{ env.CLIPPY_LINTS }}
- name: Clippy (all features)
run: rustup toolchain add nightly && rustup component add clippy --toolchain nightly && cargo +nightly clippy --all-features --examples --bins --all -- ${{ env.CLIPPY_LINTS }}
- name: Build with static CRT
if: matrix.os == 'ubuntu-latest'
run: RUSTFLAGS="-C target-feature=+crt-static" cargo run --example example --target x86_64-unknown-linux-gnu --verbose
- name: Install wasm-pack
if: matrix.os == 'ubuntu-latest'
run: cargo install wasm-pack
- name: Build Wasm tests
if: matrix.os == 'ubuntu-latest'
run: wasm-pack build --target web tests/wasm/