-
Notifications
You must be signed in to change notification settings - Fork 2
52 lines (45 loc) · 1.27 KB
/
ci.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
name: ci
on:
push:
branches:
- master
pull_request:
jobs:
build:
runs-on: ubuntu-latest
container: ubuntu:24.10
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
apt update
apt install -y ninja-build \
cmake \
clang \
pkg-config \
clang-format \
extra-cmake-modules \
gettext \
fcitx5-modules-dev \
libfcitx5core-dev \
libfcitx5utils-dev \
libfmt-dev \
libjson-c-dev \
marisa \
libmarisa-dev
- name: Lint
run: |
find src test -name '*.cpp' -o -name '*.h' | xargs clang-format -Werror --dry-run || { echo Please lint your code by '"'"find src test -name '*.cpp' -o -name '*.h' | xargs clang-format -i"'"'.; false; }
- name: Build
run: |
cmake -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DFCITX_INSTALL_USE_FCITX_SYS_PATHS=ON
cmake --build build
cmake --install build
- name: Test
run:
ctest --output-on-failure --test-dir build
- name: Setup tmate session
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3