-
Notifications
You must be signed in to change notification settings - Fork 55
89 lines (88 loc) · 2.74 KB
/
watchdogs.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
name: Watchdogs
on: [push, pull_request]
env:
TERM: xterm
CARGO_TERM_COLOR: always
RUSTFLAGS: -D warnings
RUST_BACKTRACE: 1
defaults:
run:
working-directory: v2
jobs:
unit-test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest, macos-13]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2
with:
workspaces: v2 -> v2/target
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: npm
cache-dependency-path: v2/package-lock.json
- run: sudo bash ./scripts/install_apt_deps.bash
if: ${{ matrix.os == 'ubuntu-latest' }}
- run: npm ci
- run: npm run bundle
- run: cargo clippy --all --all-features --benches --tests -- -D warnings
- run: cargo test
- run: cargo clippy -- -D warnings
working-directory: v2/fuzz
sanity-test:
needs: unit-test
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest, macos-13]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
workspaces: v2 -> v2/target
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: npm
cache-dependency-path: v2/package-lock.json
- run: sudo bash ./scripts/install_apt_deps.bash
if: ${{ matrix.os == 'ubuntu-latest' }}
- run: npm ci
- run: make release
- run: xvfb-run cargo run --release --features=__sanity -- --debug
if: ${{ matrix.os == 'ubuntu-latest' }}
- run: cargo run --release --features=__sanity -- --debug
if: ${{ matrix.os != 'ubuntu-latest' }}
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Clippy runs on each platforms in `test` job
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- uses: Swatinem/rust-cache@v2
with:
workspaces: v2 -> v2/target
- uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: npm
cache-dependency-path: v2/package-lock.json
- uses: actions/setup-python@v5
with:
python-version: '3'
- run: pip install yamllint
- run: sudo bash ./scripts/install_apt_deps.bash
- run: npm ci
- run: npm run lint:web
- run: cargo fmt --all --check
- run: shellcheck ./scripts/gen_macos_app.bash ./scripts/gen_macos_dmg.bash ./scripts/install_apt_deps.bash
- run: yamllint --strict ./src/assets/default_config.yml