-
Notifications
You must be signed in to change notification settings - Fork 1
90 lines (80 loc) · 2.72 KB
/
static_check.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
85
86
87
88
89
90
name: Static code checks
on:
push:
branches:
- "**" # target all branches
pull_request:
branches:
- master
env:
CARGO_TERM_COLOR: always
RUST_LOG: debug
RUST_BACKTRACE: full
jobs:
static_checks_ubuntu:
runs-on: ubuntu-latest
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v2
with:
submodules: recursive
- name: Update local dependency repositories
run: sudo apt-get update
- name: Install dependencies
run: sudo apt-get install -yqq build-essential python3 python3-toml podman pkg-config libssl-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
- name: Install rust clippy
run: rustup component add clippy
- name: Install cargo-deny
run: cargo install cargo-deny --locked
- name: Make do_checks.sh executable
run: chmod +x ./src-tauri/do_checks.sh
- name: Run checks
run: cd src-tauri && ./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 repository and submodules
uses: actions/checkout@v2
with:
submodules: recursive
- name: Install python toml package
run: python3 -m pip install toml
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
- name: Install rust clippy
run: rustup component add clippy
- name: Install cargo-deny
run: cargo install cargo-deny --locked
- name: Make do_checks.sh executable
run: chmod +x ./src-tauri/do_checks.sh
- name: Run checks
shell: bash
run: cd src-tauri && ./do_checks.sh
static_checks_macos:
runs-on: macos-latest
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v2
with:
submodules: recursive
- name: Install python toml package
run: python3 -m pip install toml --break-system-packages --user
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
targets: "aarch64-apple-darwin, x86_64-apple-darwin"
- name: Install rust clippy
run: rustup component add clippy
- name: Install cargo-deny
run: cargo install cargo-deny --locked
- name: Make do_checks.sh executable
run: chmod +x ./src-tauri/do_checks.sh
- name: Run checks
run: cd src-tauri && ./do_checks.sh