forked from dtolnay/linkme
-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (77 loc) · 2.32 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: CI
on:
push:
pull_request:
schedule: [cron: "40 1 * * *"]
env:
RUSTFLAGS: '-Dwarnings'
jobs:
test:
name: ${{matrix.name || format('Rust {0}', matrix.rust)}}
runs-on: ${{matrix.os}}-latest
strategy:
fail-fast: false
matrix:
rust: [nightly, beta, stable, 1.36.0]
os: [ubuntu]
include:
- name: macOS
os: macos
rust: nightly
- name: Windows (gnu)
os: windows
rust: nightly-x86_64-pc-windows-gnu
- name: Windows (msvc)
os: windows
rust: nightly-x86_64-pc-windows-msvc
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{matrix.rust}}
- run: cargo check --manifest-path tests/crate/Cargo.toml
- run: cargo test
# macos: https://github.com/dtolnay/linkme/issues/41
# windows-gnu: https://github.com/dtolnay/linkme/issues/25
continue-on-error: ${{matrix.os == 'macos' || matrix.rust == 'nightly-x86_64-pc-windows-gnu'}}
- run: cargo test --release
continue-on-error: ${{matrix.os == 'macos' || matrix.rust == 'nightly-x86_64-pc-windows-gnu'}}
msrv:
name: Rust 1.31.0
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@1.31.0
- run: cargo check
cortex:
name: Cortex-M
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@nightly
with:
target: thumbv7m-none-eabi
- name: Install QEMU
run: |
sudo apt-get update
sudo apt-get install -y qemu-system-arm
- run: cargo run --release
working-directory: tests/cortex
# https://github.com/dtolnay/linkme/issues/40
continue-on-error: true
clippy:
name: Clippy
runs-on: ubuntu-latest
if: github.event_name != 'pull_request'
steps:
- uses: actions/checkout@v2
- uses: dtolnay/rust-toolchain@clippy
- run: cargo clippy --tests -- -Dclippy::all -Dclippy::pedantic
outdated:
name: Outdated
runs-on: ubuntu-latest
if: github.event_name != 'pull_request'
steps:
- uses: actions/checkout@v2
- uses: dtolnay/install@cargo-outdated
- run: cargo outdated --exit-code 1