Skip to content

Commit 5714cca

Browse files
authored
Add clang format to action (#5)
1 parent 447652a commit 5714cca

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

.github/workflows/check.yml

+16-11
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,26 @@
11
name: CI
2-
32
on:
43
push:
54
branches:
65
- master
76
pull_request:
87
branches:
98
- master
10-
119
jobs:
10+
clang-format:
11+
name: Check clang-format
12+
runs-on: ubuntu-latest
13+
container: archlinux:latest
14+
steps:
15+
- name: Install dependencies
16+
run: |
17+
pacman -Syu --noconfirm git clang diffutils
18+
git config --global --add safe.directory $GITHUB_WORKSPACE
19+
- uses: actions/checkout@v4
20+
- uses: fcitx/github-actions@clang-format
1221
check:
1322
name: Build and test
23+
needs: clang-format
1424
runs-on: ubuntu-latest
1525
container: archlinux:latest
1626
strategy:
@@ -37,20 +47,15 @@ jobs:
3747
uses: actions/cache@v4
3848
with:
3949
path: 'fcitx5/**/*.tar.*'
40-
key: ${{ runner.os }}-${{ hashFiles('fcitx5/src/modules/spell/CMakeLists.txt') }}
50+
key: ${{ runner.os }}-${{ hashFiles('fcitx5/src/modules/spell/CMakeLists.txt')
51+
}}
4152
- name: Build and Install fcitx5
4253
uses: fcitx/github-actions@cmake
4354
with:
4455
path: fcitx5
4556
cmake-option: >-
46-
-DENABLE_KEYBOARD=Off
47-
-DENABLE_X11=Off
48-
-DENABLE_WAYLAND=Off
49-
-DENABLE_ENCHANT=Off
50-
-DENABLE_DBUS=Off
51-
-DENABLE_SERVER=Off
52-
-DENABLE_EMOJI=Off
53-
-DUSE_SYSTEMD=Off
57+
-DENABLE_KEYBOARD=Off -DENABLE_X11=Off -DENABLE_WAYLAND=Off -DENABLE_ENCHANT=Off
58+
-DENABLE_DBUS=Off -DENABLE_SERVER=Off -DENABLE_EMOJI=Off -DUSE_SYSTEMD=Off
5459
- uses: actions/checkout@v4
5560
with:
5661
path: fcitx5-m17n

0 commit comments

Comments
 (0)