-
Notifications
You must be signed in to change notification settings - Fork 1
70 lines (59 loc) · 1.87 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
name: ci
on:
push:
branches:
- master
pull_request:
jobs:
lint:
runs-on: macos-15
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: brew install clang-format swift-format
- name: Lint
run: ./scripts/lint.sh
build:
needs: lint
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-15, macos-13]
include:
- { os: macos-15, simulator: "iPhone 16" }
- { os: macos-13, simulator: "iPhone 15" }
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install dependencies
run: |
brew install \
nlohmann-json \
extra-cmake-modules
IOS_PLATFORM=SIMULATOR ./scripts/install-deps.sh
wget https://github.com/fcitx-contrib/fcitx5-prebuilder/releases/download/macos/marisa-$(uname -m).tar.bz2
sudo tar xjvf marisa-$(uname -m).tar.bz2 -C /usr/local bin/marisa-build
- name: Build
run: |
git apply --directory=fcitx5 patches/fcitx5.patch
git apply --directory=engines/libime/src/libime/core/kenlm patches/kenlm.patch
git apply --directory=engines/fcitx5-rime patches/rime.patch
cmake -B build -G Xcode \
-DURL_SCHEME=fcitx \
-DHALLELUJAH=ON \
-DRIME=ON \
-DIOS_PLATFORM=SIMULATOR
cmake --build build --config Release
- name: Check validity
run: |
./scripts/check-validity.sh
- name: Install
run: |
xcrun simctl boot "${{ matrix.simulator }}"
xcrun simctl install booted build/src/Release-iphonesimulator/Fcitx5.app
xcrun simctl launch booted org.fcitx.Fcitx5
- name: Setup tmate session
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3