-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (43 loc) · 1.16 KB
/
Copy pathrust.yml
File metadata and controls
50 lines (43 loc) · 1.16 KB
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
name: Rust
on:
push:
branches: [ '**' ]
pull_request:
branches: [ "v*" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
# Simple Ubuntu image, we use rustup
runs-on: ubuntu-latest
# Matrix build, over stable vs nightly and features
strategy:
fail-fast: false
matrix:
rust: [stable, nightly]
features: ["--", "--all-features"]
exclude:
# excludes --all-features on stable, because some features require
# nightly Rust
- rust: stable
features: "--all-features"
# The actual build steps
steps:
# Getting the code
- uses: actions/checkout@v2
# Installing the selected Rust version
- name: Install Rust ${{ matrix.rust }}
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true
components: rustfmt
# The actual checks
- name: Build
run: cargo build --verbose ${{ matrix.features }}
- name: Run tests
run: cargo test --verbose
- name: Check formatting
if: ${{ matrix.rust == 'nightly' }}
run: cargo fmt --check