refactor: absolute layout for keys #232
  
    
      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-15 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install dependencies | |
| run: brew install clang-format swift-format | |
| - name: Lint | |
| run: ./scripts/lint.sh | |
| data: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Build rime-ice | |
| uses: rimeinn/deploy-schema@master | |
| with: | |
| user-recipe-list: |- | |
| iDvel/rime-ice:others/recipes/full | |
| shared-recipe-list: | |
| package-items: |- | |
| build | |
| lua | |
| opencc | |
| custom_phrase.txt | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: artifact.zip | |
| path: | | |
| /tmp/deploy-schema/artifact.zip | |
| build: | |
| needs: [lint, data] | |
| runs-on: macos-15 | |
| env: | |
| MOZC_SHA: 88b1dcae03a0a16192586dca3da157dad64f0e2f | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - { platform: SIMULATORARM64 } | |
| - { platform: SIMULATOR64 } | |
| - { platform: OS64 } | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| submodules: recursive | |
| - uses: actions/checkout@v5 | |
| with: | |
| submodules: recursive | |
| repository: google/mozc | |
| path: engines/fcitx5-mozc/mozc | |
| ref: ${{ env.MOZC_SHA }} | |
| - uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: 16.4 | |
| - name: Install dependencies | |
| run: | | |
| brew install librsvg | |
| ./scripts/install-deps.sh ${{ matrix.platform }} | |
| 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 | |
| # For developer test period use xiaohe by default. | |
| git apply --directory=engines/fcitx5-chinese-addons patches/chinese-addons.patch | |
| git apply --directory=engines/fcitx5-hallelujah patches/hallelujah.patch | |
| git apply --directory=engines/fcitx5-rime patches/rime.patch | |
| if [[ "${{ matrix.platform }}" == "OS64" ]]; then | |
| cmake -B build/${{ matrix.platform }} -G Xcode \ | |
| -DPLATFORM=${{ matrix.platform }} | |
| cmake --build build/${{ matrix.platform }} --config Release -- CODE_SIGNING_ALLOWED=NO | |
| else | |
| cmake -B build/${{ matrix.platform }} -G Xcode \ | |
| -DPLATFORM=${{ matrix.platform }} | |
| cmake --build build/${{ matrix.platform }} --config Release | |
| fi | |
| - name: Check validity | |
| run: | | |
| ./scripts/check-validity.sh ${{ matrix.platform }} | |
| - name: Install | |
| if: ${{ matrix.platform == 'SIMULATORARM64' }} | |
| run: | | |
| xcrun simctl boot "iPhone 16" | |
| xcrun simctl install booted build/${{ matrix.platform }}/src/Release-iphonesimulator/Fcitx5.app | |
| xcrun simctl launch booted org.fcitx.Fcitx5 | |
| - name: Download artifact | |
| if: ${{ matrix.platform == 'OS64' }} | |
| uses: actions/download-artifact@v4 | |
| with: | |
| merge-multiple: true | |
| - name: Pack IPA | |
| if: ${{ matrix.platform == 'OS64' }} | |
| working-directory: build/OS64/src/Release-iphoneos | |
| run: | | |
| # For developer test period use rime-ice. | |
| mv Fcitx5.app/PlugIns/Rime.appex/share/rime-data/opencc . | |
| rm -rf Fcitx5.app/PlugIns/Rime.appex/share/rime-data/* | |
| mv opencc Fcitx5.app/PlugIns/Rime.appex/share/rime-data | |
| tar xf ../../../../artifact.zip -C Fcitx5.app/PlugIns/Rime.appex/share/rime-data | |
| mkdir Payload | |
| cp -r Fcitx5.app Payload | |
| zip -r Fcitx5.ipa Payload | |
| - name: Upload artifact | |
| if: ${{ github.ref != 'refs/heads/master' && matrix.platform == 'OS64' }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Fcitx5.ipa | |
| path: | | |
| build/OS64/src/Release-iphoneos/Fcitx5.ipa | |
| - name: Create Nightly release | |
| if: ${{ github.ref == 'refs/heads/master' && matrix.platform == 'OS64' }} | |
| uses: 'marvinpinto/action-automatic-releases@latest' | |
| with: | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| automatic_release_tag: latest | |
| prerelease: true | |
| title: "Nightly Build" | |
| files: | | |
| build/OS64/src/Release-iphoneos/Fcitx5.ipa | |
| - name: Setup tmate session | |
| if: ${{ failure() }} | |
| uses: mxschmitt/action-tmate@v3 | |
| compare: | |
| if: ${{ github.event_name == 'pull_request' }} | |
| needs: build | |
| uses: ./.github/workflows/compare.yml |