candidate tab action column (#110) #357
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-26 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install dependencies | |
| run: | | |
| brew install clang-format swift-format | |
| pip install ruff | |
| - 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: Clean | |
| run: zip -d /tmp/deploy-schema/artifact.zip build/.gitkeep || true | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| archive: true # false makes it auto unzip on download-artifact, since it's a zip itself. | |
| name: artifact.zip | |
| path: | | |
| /tmp/deploy-schema/artifact.zip | |
| build: | |
| needs: [lint, data] | |
| runs-on: macos-26 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - { platform: SIMULATORARM64 } | |
| - { platform: SIMULATOR64 } | |
| - { platform: OS64 } | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: 26.4 | |
| - name: Install dependencies | |
| run: | | |
| brew install librsvg | |
| ./scripts/install-deps.sh ${{ matrix.platform }} | |
| curl -fsSLO https://github.com/fcitx-contrib/fcitx5-prebuilder/releases/download/macos/marisa-arm64.tar.bz2 | |
| sudo tar xf marisa-arm64.tar.bz2 -C /usr/local bin/marisa-build | |
| - name: Build | |
| run: | | |
| ./scripts/patch.sh | |
| cmake -B build/${{ matrix.platform }} -G Ninja \ | |
| -DPLATFORM=${{ matrix.platform }} \ | |
| -DCMAKE_BUILD_TYPE=Release | |
| cmake --build build/${{ matrix.platform }} | |
| if [[ "${{ matrix.platform }}" != "OS64" ]]; then | |
| ./scripts/code-sign.sh ${{ matrix.platform }} | |
| fi | |
| - name: Check validity | |
| run: | | |
| ./scripts/check-validity.sh ${{ matrix.platform }} | |
| - name: Install | |
| if: ${{ matrix.platform == 'SIMULATORARM64' }} | |
| run: | | |
| xcrun simctl boot "iPhone 17" | |
| xcrun simctl install booted build/${{ matrix.platform }}/src/Fcitx5.app | |
| xcrun simctl launch booted org.fcitx.Fcitx5 | |
| - name: Download artifact | |
| if: ${{ matrix.platform == 'OS64' }} | |
| uses: actions/download-artifact@v8 | |
| with: | |
| merge-multiple: true | |
| - name: Pack IPA | |
| if: ${{ matrix.platform == 'OS64' }} | |
| working-directory: build/OS64/src | |
| 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@v7 | |
| with: | |
| archive: false | |
| name: Fcitx5.ipa | |
| path: | | |
| build/OS64/src/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/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 |