-
Notifications
You must be signed in to change notification settings - Fork 143
72 lines (72 loc) · 1.74 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Rust CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
strategy:
fail-fast: false
matrix:
rust: ["1.57.0", stable, beta, nightly]
os: [ubuntu-latest, windows-latest, macos-latest]
features: [""]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
- if: ${{ matrix.rust == '1.57.0' }}
run: mv Cargo.lock.msrv Cargo.lock
- name: build
run: |
cargo build --verbose
feature_check:
strategy:
matrix:
features: ["", "benchmarks"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- name: check
run: |
cargo check --tests --no-default-features --features="$FEATURES"
env:
FEATURES: ${{ matrix.features }}
mips_cross:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: add_cross_target
run: |
rustup target add mips64-unknown-linux-gnuabi64
cargo build --all-features --target mips64-unknown-linux-gnuabi64
test_all:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: rustup default stable
- name: test
run: >
cargo test -v --all-targets
rustfmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt
- name: Run rustfmt check
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check