-
Notifications
You must be signed in to change notification settings - Fork 10
151 lines (142 loc) · 4.31 KB
/
ci.yaml
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
name: CI
on: [push, pull_request]
jobs:
build_debian_based:
strategy:
fail-fast: false
matrix:
os:
[
"ubuntu:24.10",
"ubuntu:24.04",
"ubuntu:22.04",
"debian:12",
"linuxmintd/mint22-amd64",
"linuxmintd/mint21-amd64",
]
runs-on: ubuntu-latest
container: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt install -y pkg-config
apt install -y clang
apt install -y cmake extra-cmake-modules gettext libfmt-dev
apt install -y fcitx5 libfcitx5core-dev libfcitx5config-dev libfcitx5utils-dev fcitx5-modules-dev
apt install -y libjson-c-dev
- name: Install Build Essential
if: matrix.os == 'ubuntu:24.10'
run: |
apt install -y build-essential
- name: Build
run: |
mkdir -p build
cd build
cmake ../ -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug
make -j
cd ../
mkdir -p src/Engine/build
cd src/Engine/build
cmake ../
make -j
- name: Test
run: |
cd build
ctest --output-on-failure
build_debian_based_legacy:
strategy:
fail-fast: false
matrix:
os: ["ubuntu:20.04", "linuxmintd/mint20-amd64"]
runs-on: ubuntu-latest
container: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
export DEBIAN_FRONTEND=noninteractive
apt-get update
apt install -y pkg-config
apt install -y clang
apt install -y cmake extra-cmake-modules gettext libfmt-dev
apt install -y fcitx5 libfcitx5core-dev libfcitx5config-dev libfcitx5utils-dev fcitx5-modules-dev
apt install -y libicu-dev libjson-c-dev
- name: Build
run: |
mkdir -p build
cd build
cmake ../ -DCMAKE_INSTALL_PREFIX=/usr -DUSE_LEGACY_FCITX5_API=1 -DCMAKE_BUILD_TYPE=Debug
make -j
- name: Test
run: |
cd build
ctest --output-on-failure
build_archlinux:
runs-on: ubuntu-latest
container: ghcr.io/xatier/arch-dev:latest
steps:
- name: Checkout
run: |
export HOME=/home/xatier
cd /home/xatier
echo "cloning $GITHUB_SERVER_URL/$GITHUB_REPOSITORY into $PWD $GITHUB_SHA"
git clone "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY"
cd /home/xatier/fcitx5-mcbopomofo
git fetch origin "$GITHUB_REF" ||:
git checkout "$GITHUB_SHA"
- name: Build
run: |
export HOME=/home/xatier
cd /home/xatier/fcitx5-mcbopomofo/distro/archlinux/
sudo pacman -Syy
makepkg -s --noconfirm
build_fedora:
strategy:
fail-fast: false
matrix:
os: ["fedora:42", "fedora:41", "fedora:40", "fedora:39"]
runs-on: ubuntu-latest
container: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
dnf -y install gcc g++
dnf -y install fcitx5 fcitx5-configtool fcitx5-devel \
cmake extra-cmake-modules gettext fmt-devel \
libicu-devel json-c-devel
- name: Build
run: |
mkdir -p build
cd build
cmake ../ -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug
make
- name: Test
run: |
cd build
ctest --output-on-failure
build_manjaro:
# strategy:
# fail-fast: false
# matrix:
# os: ["fedora:42", "fedora:41", "fedora:40", "fedora:39"]
runs-on: ubuntu-latest
container: manjarolinux/base:latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
pacman -S --noconfirm gcc cmake make pkg-config extra-cmake-modules fmt fcitx5 fcitx5-chinese-addons fcitx5-gtk fcitx5-qt
- name: Build
run: |
mkdir -p build
cd build
cmake ../ -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Debug
make
- name: Test
run: |
cd build
ctest --output-on-failure