forge
Explore
Log in

Don't you dare go Hollow

75c75c93e1d574a33f0367ca2074441fab634296Ivan MolodetskikhParent: 7460737
Surely this will work first try
.github/workflows/ci.ymladded+94 -0
@@ -0,0 +1,94 @@
1+name: CI
2+
3+on:
4+ push:
5+ pull_request:
6+ workflow_dispatch:
7+ schedule:
8+ - cron: '0 0 1 * *' # Monthly
9+
10+jobs:
11+ build:
12+ strategy:
13+ fail-fast: false
14+
15+ matrix:
16+ configuration: [debug, release]
17+
18+ include:
19+ - configuration: release
20+ release-flag: '--release'
21+
22+ name: test - ${{ matrix.configuration }}
23+ runs-on: ubuntu-22.04
24+
25+ steps:
26+ - uses: actions/checkout@v4
27+ with:
28+ show-progress: false
29+
30+ - name: Install dependencies
31+ run: |
32+ sudo apt-get update -y
33+ sudo apt-get install -y libudev-dev libgbm-dev libxkbcommon-dev libegl1-mesa-dev libwayland-dev libinput-dev libdbus-1-dev libsystemd-dev libseat-dev
34+
35+ - name: Install Rust
36+ run: |
37+ rustup set auto-self-update check-only
38+ rustup toolchain install stable --profile minimal
39+
40+ - uses: Swatinem/rust-cache@v2
41+ with:
42+ key: ${{ matrix.configuration }}
43+
44+ - name: Build
45+ run: cargo build ${{ matrix.release-flag }}
46+
47+ - name: Build Tests
48+ run: cargo test --no-run --all ${{ matrix.release-flag }}
49+
50+ - name: Test
51+ run: cargo test --all ${{ matrix.release-flag }} -- --nocapture
52+
53+ clippy:
54+ strategy:
55+ fail-fast: false
56+
57+ name: clippy
58+ runs-on: ubuntu-22.04
59+
60+ steps:
61+ - uses: actions/checkout@v4
62+ with:
63+ show-progress: false
64+
65+ - name: Install dependencies
66+ run: |
67+ sudo apt-get update -y
68+ sudo apt-get install -y libudev-dev libgbm-dev libxkbcommon-dev libegl1-mesa-dev libwayland-dev libinput-dev libdbus-1-dev libsystemd-dev libseat-dev
69+
70+ - name: Install Rust
71+ run: |
72+ rustup set auto-self-update check-only
73+ rustup toolchain install stable --profile minimal --component clippy
74+
75+ - uses: Swatinem/rust-cache@v2
76+
77+ - name: Run clippy
78+ run: cargo clippy --all --all-targets
79+
80+ rustfmt:
81+ runs-on: ubuntu-22.04
82+
83+ steps:
84+ - uses: actions/checkout@v3
85+
86+ - name: Install Rust
87+ run: |
88+ rustup set auto-self-update check-only
89+ rustup toolchain install nightly --profile minimal --component rustfmt
90+ rustup override set nightly
91+
92+ - name: Run rustfmt
93+ run: cargo fmt --all -- --check
94+