Repository navigation
45 lines (41 loc) · 1.41 KB
/
Copy pathci.yml
File metadata and controls
45 lines (41 loc) · 1.41 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
name: CI
on:
push:
branches: [main]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
rust:
name: Service, CLI and protocol
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Install system libraries
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends libudev-dev pkg-config
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- run: cargo fmt --all --check
- run: cargo clippy --workspace --all-targets --locked -- -D warnings
- run: cargo test --workspace --locked
build:
name: Full build (Arch Linux, Qt 6)
runs-on: ubuntu-latest
container: archlinux:latest
steps:
- name: Install dependencies
run: |
pacman -Syu --noconfirm --needed base-devel git cmake rust qt6-base qt6-declarative qt6-svg
- uses: actions/checkout@v7
- name: Build
run: |
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
cmake --build build -j"$(nproc)"
- name: Install into a staging directory
run: DESTDIR="$PWD/stage" cmake --install build && find stage -type f | sort
- name: Lint QML
run: |
/usr/lib/qt6/bin/qmllint -I build/app --bare app/qml/*.qml app/qml/*/*.qml || true