-
Notifications
You must be signed in to change notification settings - Fork 2
104 lines (90 loc) · 2.68 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
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
name: ci
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
jobs:
build-fcitx5:
runs-on: windows-2025
strategy:
fail-fast: false
matrix:
env: [msys, clang64]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Lint
if: ${{ matrix.env == 'clang64' }}
run: ./win32/scripts/lint.ps1
- name: Install dependencies (msys)
if: ${{ matrix.env == 'msys' }}
run: |
C:/msys64/usr/bin/pacman -Syu --noconfirm
C:/msys64/usr/bin/pacman -S --noconfirm `
mingw-w64-clang-x86_64-extra-cmake-modules `
cmake `
fmt `
gcc `
gettext-devel `
libuv-devel `
msys2-runtime-devel `
ninja
cp -r its C:/msys64/usr/share/gettext
Add-Content $env:GITHUB_PATH "C:/msys64/usr/bin"
- name: Install dependencies (clang)
if: ${{ matrix.env == 'clang64' }}
run: |
C:/msys64/usr/bin/pacman -Syu --noconfirm
C:/msys64/usr/bin/pacman -S --noconfirm `
mingw-w64-clang-x86_64-extra-cmake-modules `
mingw-w64-clang-x86_64-clang `
mingw-w64-clang-x86_64-cmake `
mingw-w64-clang-x86_64-dlfcn `
mingw-w64-clang-x86_64-fmt `
mingw-w64-clang-x86_64-libuv `
mingw-w64-clang-x86_64-pkgconf `
gettext `
ninja
mkdir -p C:/msys64/usr/share/gettext
cp -r its C:/msys64/usr/share/gettext
Add-Content $env:GITHUB_PATH "C:/msys64/clang64/bin"
git apply --directory=fcitx5 patches/fcitx5.patch
- name: Build
run: |
cmake -B build -G Ninja `
-DCMAKE_BUILD_TYPE=Release
cmake --build build
- name: Package
if: ${{ matrix.env == 'clang64' }}
env:
DESTDIR: dist
run: |
cmake --install build
- name: Setup tmate session
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3
build-win32:
runs-on: windows-2025
defaults:
run:
working-directory: win32
steps:
- name: Disable CRLF
working-directory: .
run: git config --global core.autocrlf false
- uses: actions/checkout@v4
- name: Build
run: |
cmake -B build -G Ninja `
-DCMAKE_BUILD_TYPE=Release
cmake --build build
- name: Test
run: ctest --test-dir build --output-on-failure
- name: Check validity
run: md5sum -c checksum
- name: Setup tmate session
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3