use FcitxProtocol to decouple UI (#10) #28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ci | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| jobs: | |
| lint: | |
| runs-on: macos-14 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: brew install clang-format swift-format | |
| - name: Lint | |
| run: | | |
| find src keyboard iosfrontend uipanel -name '*.cpp' -o -name '*.h' | xargs clang-format -Werror --dry-run | |
| swift-format lint -rs src keyboard iosfrontend uipanel | |
| build: | |
| needs: lint | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [macos-14, macos-13] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install dependencies | |
| run: | | |
| brew install \ | |
| extra-cmake-modules | |
| IOS_PLATFORM=SIMULATOR ./install-deps.sh | |
| wget https://github.com/fcitx-contrib/fcitx5-macos-prebuilder/releases/download/latest/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/fcitx5-hallelujah patches/hallelujah.patch | |
| PKG_CONFIG_PATH=build/sysroot/usr/lib/pkgconfig cmake -B build -G Xcode \ | |
| -DENGINE=hallelujah \ | |
| -DCMAKE_TOOLCHAIN_FILE=cmake/ios.cmake \ | |
| -DIOS_PLATFORM=SIMULATOR | |
| cmake --build build --config Release | |
| - name: Check validity | |
| run: | | |
| ./check-validity.sh | |
| - name: Install | |
| run: | | |
| xcrun simctl boot "iPhone 15" | |
| 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 |