fix: make NSOpenPanel singleton #1158
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: ci | |
| on: | |
| push: | |
| branches: | |
| - master | |
| tags: | |
| - '[0-9]+.*' | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| lint: | |
| runs-on: macos-26 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: true # needs fcitx5/.clang-format | |
| - name: Install dependencies | |
| run: brew install clang-format swift-format | |
| - name: Lint | |
| run: ./scripts/lint.sh | |
| build: | |
| needs: lint | |
| runs-on: macos-26 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - { arch: arm64, type: Release, postfix: '' } | |
| - { arch: arm64, type: Debug, postfix: -debug } | |
| - { arch: x86_64, type: Release, postfix: '' } | |
| - { arch: x86_64, type: Debug, postfix: -debug } | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 # Need history for commit count since last tag. | |
| submodules: recursive | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24.x | |
| - uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: 26.4 | |
| - name: Install dependencies | |
| env: | |
| HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1 | |
| run: | | |
| brew update && brew upgrade || true | |
| brew install \ | |
| extra-cmake-modules \ | |
| librsvg \ | |
| md5sha1sum | |
| ./scripts/install-deps.sh ${{ matrix.arch }} | |
| npm i -g pnpm | |
| pnpm --prefix=fcitx5-webview i | |
| - name: Build | |
| run: | | |
| git fetch --tags -f # GitHub's bug that pushing a tag doesn't make it available during actions/checkout, even with fetch-depth: 0. | |
| git apply --directory=fcitx5 patches/* | |
| # Don't log key on any CI artifact. | |
| cmake -B build/${{ matrix.arch }} -G Ninja \ | |
| -DKEY_LOGGING=OFF \ | |
| -DCMAKE_OSX_ARCHITECTURES=${{ matrix.arch }} \ | |
| -DCMAKE_BUILD_TYPE=${{ matrix.type }} | |
| cmake --build build/${{ matrix.arch }} | |
| sudo cmake --install build/${{ matrix.arch }} | |
| - name: Package and remove dev files | |
| run: | | |
| if [[ ${{ matrix.type }} == "Release" ]]; then | |
| tar cjf Fcitx5-${{ matrix.arch }}-dev.tar.bz2 -C "/Library/Input Methods" Fcitx5.app/Contents/{include,lib} | |
| fi | |
| sudo rm -rf "/Library/Input Methods/Fcitx5.app/Contents"/{bin/fcitx5-{configtool,diagnose},include,lib/{cmake,pkgconfig},share/{applications,metainfo}} | |
| tar cjf Fcitx5-${{ matrix.arch }}${{ matrix.postfix }}.tar.bz2 -C "/Library/Input Methods" Fcitx5.app | |
| ./scripts/code-sign.sh # after tar to avoid local signature in tarball | |
| - name: Test | |
| run: | | |
| ICON_DIR=~/Library/fcitx5/share/icons/hicolor/48x48/apps | |
| mkdir -p $ICON_DIR && touch $ICON_DIR/fcitx_rime_deploy.png | |
| ctest --test-dir build/${{ matrix.arch }} --output-on-failure | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: Fcitx5-${{ matrix.arch }}${{ matrix.postfix }} | |
| path: | | |
| Fcitx5-${{ matrix.arch }}*.tar.bz2 | |
| - name: Check validity | |
| run: | | |
| ./scripts/check-validity.sh | |
| - name: Check reproducibility | |
| if: ${{ matrix.arch == 'arm64' && matrix.type == 'Release' }} | |
| run: | | |
| md5sum -c checksum | |
| - name: Generate version.json | |
| if: ${{ matrix.arch == 'arm64' && matrix.type == 'Release' }} | |
| run: python scripts/generate-version.py | |
| - name: Upload version.json | |
| if: ${{ matrix.arch == 'arm64' && matrix.type == 'Release' }} | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| archive: false | |
| name: version.json | |
| path: | | |
| version.json | |
| - 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 | |
| release: | |
| needs: build | |
| if: ${{ github.event_name != 'pull_request' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download artifact | |
| uses: actions/download-artifact@v8 | |
| with: | |
| merge-multiple: true | |
| - name: Create Nightly release | |
| if: ${{ github.ref == 'refs/heads/master' }} | |
| uses: 'marvinpinto/action-automatic-releases@latest' | |
| with: | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| automatic_release_tag: latest | |
| prerelease: true | |
| title: "Nightly Build" | |
| files: | | |
| Fcitx5-*.tar.bz2 | |
| version.json | |
| - name: Create Stable release | |
| if: ${{ github.ref != 'refs/heads/master' }} | |
| uses: 'marvinpinto/action-automatic-releases@latest' | |
| with: | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| draft: true | |
| prerelease: false | |
| title: ${{ github.ref_name }} | |
| files: | | |
| Fcitx5-*.tar.bz2 |