-
-
Notifications
You must be signed in to change notification settings - Fork 8
76 lines (67 loc) · 2.03 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
name: CI
on:
pull_request:
branches: [main]
schedule:
# runs 1 min after 2 or 1 AM (summer/winter) berlin time
- cron: "1 0 * * *"
merge_group:
env:
CARGO_TERM_COLOR: always
CORE_TARGET: thumbv7em-none-eabi # needed by `core`
jobs:
test:
strategy:
matrix:
os:
- ubuntu-latest
- macOS-latest
- windows-latest
runs-on: ${{ matrix.os }}
timeout-minutes: 20
steps:
- uses: actions/checkout@v3
# install Rust
- name: Use the latest stable release
run: |
rustup update stable --no-self-update
rustup default stable
- name: Install Rust target for cross-compilation
run: rustup target add ${{ env.CORE_TARGET }}
# caching
- name: make rustc version available to cache keys
id: rustc
run: echo "::set-output name=version::$(rustc -V)"
- name: cache Cargo registry
uses: actions/cache@v3
with:
path: |
~/.cargo/registry/cache
~/.cargo/registry/index
key: cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
cargo-registry-
- name: cache Cargo build artifacts
uses: actions/cache@v3
with:
path: target
key: cargo-target-${{ runner.os }}-${{ steps.rustc.outputs.version }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
cargo-target-${{ runner.os }}-${{ steps.rustc.outputs.version }}-
# run tests
- name: Run testsuite
run: cargo xtest
static-checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# install Rust
- name: Use the latest stable release
run: rustup update stable && rustup default stable
# run tests
- run: cargo fmt -- --check
- run: cargo fmt -- --check
working-directory: test-flip-link-app/
- run: cargo clippy -- --deny warnings
- run: cargo clippy -- --deny warnings
working-directory: test-flip-link-app/