-
-
Notifications
You must be signed in to change notification settings - Fork 17
77 lines (65 loc) · 1.83 KB
/
clippy_build_test.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
name: Build and Test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule: # Build every day at 5PM UTC
- cron: '0 17 * * *'
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-11, macos-12, macos-13 ]
rust: [stable, beta]
experimental: [false]
include:
- os: ubuntu-latest
rust: nightly
experimental: true
- os: macos-11
rust: nightly
experimental: true
- os: macos-12
rust: nightly
experimental: true
- os: macos-13
rust: nightly
experimental: true
continue-on-error: ${{ matrix.experimental }}
steps:
- uses: actions/checkout@v2
- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
components: clippy
- name: Clippy
run: make clippy
- name: Compile check on redox
if: runner.os == 'Linux'
run: |
rustup target add x86_64-unknown-redox
cargo +nightly check --target x86_64-unknown-redox
- name: ConfigureCoverage
if: matrix.rust == 'nightly'
run: |
cargo install grcov
rustup component add llvm-tools-preview
echo RUSTFLAGS="-C instrument-coverage" >> "$GITHUB_ENV"
echo LLVM_PROFILE_FILE="libproc-%p-%m.profraw" >> "$GITHUB_ENV"
- name: Run Tests on Linux
if: runner.os == 'Linux'
run: env "PATH=$PATH" cargo test
- name: Run Tests as Root on Mac
if: runner.os == 'macOS'
run: sudo env "PATH=$PATH" cargo test
- name: UploadCoverage
if: matrix.rust == 'nightly'
run: make upload-coverage