-
Notifications
You must be signed in to change notification settings - Fork 31
122 lines (96 loc) · 3.29 KB
/
code_checks.yml
File metadata and controls
122 lines (96 loc) · 3.29 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
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
name: Static code checks
on:
push:
branches:
- master
pull_request:
branches:
- "**" # target all branches
schedule:
- cron: "15 0 * * *" # every day at 00:15 UTC
env:
CARGO_TERM_COLOR: always
RUST_LOG: debug
RUST_BACKTRACE: full
jobs:
static_checks_ubuntu:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v5
with:
submodules: recursive
- name: Update the list of available system packages
run: sudo apt-get update
- name: Install build dependencies
run: sudo apt-get install -yqq --no-install-recommends build-essential libdbus-1-dev libusb-1.0-0-dev
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version-file: "./build-tools/.python-version"
- name: Install Rust
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y \
--default-toolchain $(python ./build-tools/cargo-info-extractor/extract.py --rust-version)
- name: Install Clippy
run: rustup component add clippy
- name: Install cargo-deny
run: cargo install cargo-deny --locked
- name: Install cargo-vet
run: cargo install cargo-vet --locked
- name: Run checks
run: ./do_checks.sh
static_checks_windows:
runs-on: windows-latest
steps:
# This prevents git from changing line-endings to crlf, which messes cargo fmt checks
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout the repository
uses: actions/checkout@v5
with:
submodules: recursive
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version-file: "./build-tools/.python-version"
- name: Install Rust
# Use bash to be able to escape the newline via '\'.
shell: bash
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y \
--default-toolchain $(python ./build-tools/cargo-info-extractor/extract.py --rust-version)
- name: Install Clippy
run: rustup component add clippy
- name: Install cargo-deny
run: cargo install cargo-deny --locked
- name: Install cargo-vet
run: cargo install cargo-vet --locked
- name: Run checks
shell: bash
run: ./do_checks.sh
static_checks_macos:
runs-on: macos-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v5
with:
submodules: recursive
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version-file: "./build-tools/.python-version"
- name: Install Rust
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y \
--default-toolchain $(python ./build-tools/cargo-info-extractor/extract.py --rust-version)
- name: Install Clippy
run: rustup component add clippy
- name: Install cargo-deny
run: cargo install cargo-deny --locked
- name: Install cargo-vet
run: cargo install cargo-vet --locked
- name: Run checks
run: bash ./do_checks.sh