macOS debug build #18
Workflow file for this run
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: macOS debug build | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: macos-26 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| arch: [arm64, x86_64] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install dependencies | |
| env: | |
| HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1 | |
| run: | | |
| brew install \ | |
| extra-cmake-modules \ | |
| ninja | |
| ./scripts/install-deps.sh macos ${{ matrix.arch }} | |
| rm cache/macos/librime-${{ matrix.arch }}.tar.bz2 # wget will append .1 if file already exists. | |
| wget -P cache/macos https://github.com/fcitx-contrib/fcitx5-prebuilder/releases/download/debug/librime-${{ matrix.arch }}.tar.bz2 | |
| tar xf cache/macos/librime-${{ matrix.arch }}.tar.bz2 -C build/macos-${{ matrix.arch }}/usr | |
| - name: Install Fcitx5 dev package | |
| run: | | |
| wget https://github.com/fcitx-contrib/fcitx5-macos/releases/download/latest/Fcitx5-${{ matrix.arch }}-dev.tar.bz2 | |
| sudo tar xf Fcitx5-${{ matrix.arch }}-dev.tar.bz2 -C "/Library/Input Methods" | |
| - name: Build | |
| run: | | |
| git submodule update --init fcitx5-rime | |
| cmake -B build/macos-${{ matrix.arch }} -G Ninja -DCMAKE_BUILD_TYPE=Debug \ | |
| -DCMAKE_OSX_ARCHITECTURES=${{ matrix.arch }} \ | |
| -DANTHY=OFF -DBAMBOO=OFF -DCHEWING=OFF -DCHINESE_ADDONS=OFF -DCSKK=OFF -DHALLELUJAH=OFF -DHANGUL=OFF -DJYUTPING=OFF -DKEYMAN=OFF -DKKC=OFF -DM17N=OFF -DMOZC=OFF -DSAYURA=OFF -DSKK=OFF -DTABLE_EXTRA=OFF -DTHAI=OFF -DUNIKEY=OFF -DZHUYIN=OFF | |
| cmake --build build/macos-${{ matrix.arch }} --target rime | |
| wget -P cache https://github.com/fcitx-contrib/fcitx5-plugins/releases/download/macos-latest/rime-${{ matrix.arch }}.tar.bz2 | |
| mkdir build/rime | |
| tar xf cache/rime-${{ matrix.arch }}.tar.bz2 -C build/rime | |
| mv build/macos-${{ matrix.arch }}/bin/librime.so build/rime/lib/fcitx5 | |
| cd build/rime | |
| tar cjf ../../rime-${{ matrix.arch }}.tar.bz2 --no-xattrs * | |
| - name: Upload arch-specific artifact | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: artifact-rime-${{ matrix.arch }} | |
| path: | | |
| rime-${{ matrix.arch }}.tar.bz2 | |
| - name: Setup tmate session | |
| if: ${{ failure() }} | |
| uses: mxschmitt/action-tmate@v3 | |
| release: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download artifact | |
| uses: actions/download-artifact@v7 | |
| with: | |
| pattern: artifact-rime* | |
| merge-multiple: true | |
| - name: Release | |
| uses: 'marvinpinto/action-automatic-releases@latest' | |
| with: | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| automatic_release_tag: debug | |
| prerelease: true | |
| title: "Debug Build" | |
| files: | | |
| *.tar.bz2 |