Skip to content

Commit a58fb2b

Browse files
committed
ci: run lints and test compile on arch
1 parent 9b409c0 commit a58fb2b

File tree

4 files changed

+81
-24
lines changed

4 files changed

+81
-24
lines changed

.github/workflows/build.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Build
2+
on: [push, pull_request]
3+
4+
jobs:
5+
nix:
6+
name: Nix
7+
strategy:
8+
matrix:
9+
qtver: [qt6.8.0, qt6.7.3, qt6.7.2, qt6.7.1, qt6.7.0, qt6.6.3, qt6.6.2, qt6.6.1, qt6.6.0]
10+
compiler: [clang, gcc]
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
# Use cachix action over detsys for testing with act.
15+
# - uses: cachix/install-nix-action@v27
16+
- uses: DeterminateSystems/nix-installer-action@main
17+
18+
- name: Download Dependencies
19+
run: nix-build --no-out-link --expr '((import ./ci/matrix.nix) { qtver = "${{ matrix.qtver }}"; compiler = "${{ matrix.compiler }}"; }).inputDerivation'
20+
21+
- name: Build
22+
run: nix-build --no-out-link --expr '(import ./ci/matrix.nix) { qtver = "${{ matrix.qtver }}"; compiler = "${{ matrix.compiler }}"; }'
23+
24+
archlinux:
25+
name: Archlinux
26+
runs-on: ubuntu-latest
27+
container: archlinux
28+
steps:
29+
- uses: actions/checkout@v4
30+
31+
- name: Download Dependencies
32+
run: |
33+
pacman --noconfirm --noprogressbar -Syyu
34+
pacman --noconfirm --noprogressbar -Sy \
35+
base-devel \
36+
cmake \
37+
ninja \
38+
pkgconf \
39+
qt6-base \
40+
qt6-declarative \
41+
qt6-svg \
42+
qt6-wayland \
43+
qt6-shadertools \
44+
wayland-protocols \
45+
wayland \
46+
libxcb \
47+
libpipewire \
48+
cli11 \
49+
jemalloc
50+
51+
- name: Build
52+
# breakpad is annoying to build in ci due to makepkg not running as root
53+
run: |
54+
cmake -GNinja -B build -DCRASH_REPORTER=OFF
55+
cmake --build build

.github/workflows/lint.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Lint
2+
on: [push, pull_request]
3+
4+
jobs:
5+
lint:
6+
name: Lint
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
# Use cachix action over detsys for testing with act.
11+
- uses: cachix/install-nix-action@v27
12+
# - uses: DeterminateSystems/nix-installer-action@main
13+
- uses: nicknovitski/nix-develop@v1
14+
15+
- name: Check formatting
16+
run: clang-format -Werror --dry-run src/**/*.{cpp,hpp}
17+
18+
# required for lint
19+
- name: Build
20+
run: |
21+
just configure debug -DNO_PCH=ON -DBUILD_TESTING=ON
22+
just build
23+
24+
- name: Run lints
25+
run: clang-tidy --load=$TIDYFOX src/**/*.cpp

.github/workflows/nix-build.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

src/core/model.hpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,7 @@ class ObjectModel: public UntypedObjectModel {
8585
public:
8686
explicit ObjectModel(QObject* parent): UntypedObjectModel(parent) {}
8787

88-
[[nodiscard]] QVector<T*>& valueList() {
89-
return *std::bit_cast<QVector<T*>*>(&this->valuesList);
90-
}
88+
[[nodiscard]] QVector<T*>& valueList() { return *std::bit_cast<QVector<T*>*>(&this->valuesList); }
9189

9290
[[nodiscard]] const QVector<T*>& valueList() const {
9391
return *std::bit_cast<const QVector<T*>*>(&this->valuesList);

0 commit comments

Comments
 (0)