-
Notifications
You must be signed in to change notification settings - Fork 0
113 lines (94 loc) · 2.88 KB
/
Copy pathci.yml
File metadata and controls
113 lines (94 loc) · 2.88 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
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
name: CI
on:
push:
branches:
- main
pull_request:
permissions:
contents: read
jobs:
hygiene:
runs-on: ubuntu-24.04
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Run release hygiene checks
run: bash scripts/check-release-hygiene.sh
build-test:
runs-on: ubuntu-24.04
needs: hygiene
container:
image: debian:trixie
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Install build dependencies
run: |
apt-get update
apt-get install -y --no-install-recommends \
ca-certificates \
cmake \
doxygen \
g++ \
git \
ninja-build \
pkg-config \
libgl-dev \
libopengl-dev \
qt6-base-dev \
qt6-base-dev-tools \
qt6-multimedia-dev \
libkf6globalaccel-dev \
libkf6guiaddons-dev
- name: Configure
run: cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug
- name: Build
run: cmake --build build
- name: Generate API docs
run: cmake --build build --target docs
- name: Run tests
run: ctest --test-dir build --output-on-failure
- name: Validate install tree
run: |
INSTALL_DIR="$(mktemp -d)"
cmake --install build --prefix "$INSTALL_DIR"
test -x "$INSTALL_DIR/bin/mutterkey"
test -x "$INSTALL_DIR/bin/mutterkey-tray"
- name: Validate headless CLI startup
run: QT_QPA_PLATFORM=offscreen ./build/mutterkey --help
- name: Validate headless tray startup
run: |
if timeout 2s env QT_QPA_PLATFORM=offscreen ./build/mutterkey-tray; then
exit 0
else
status=$?
test "$status" -eq 124
fi
- name: Upload GitHub Pages artifact
# PRs still build docs for validation, but only the default branch
# publishes the generated site.
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v3
with:
path: build/docs/doxygen/html
deploy-docs:
runs-on: ubuntu-24.04
needs: build-test
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
permissions:
# GitHub Pages deployment needs these extra permissions; keep them scoped
# to the deploy job rather than granting them to the whole workflow.
pages: write
id-token: write
concurrency:
group: github-pages
cancel-in-progress: true
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Configure GitHub Pages
uses: actions/configure-pages@v5
- name: Deploy GitHub Pages
id: deployment
uses: actions/deploy-pages@v4