build with clang64 #40
This file contains 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: | |
workflow_dispatch: | |
jobs: | |
build-fcitx5: | |
runs-on: windows-2025 | |
strategy: | |
fail-fast: false | |
matrix: | |
env: [msys, clang64] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Install dependencies (msys) | |
if: ${{ matrix.env == 'msys' }} | |
run: | | |
C:/msys64/usr/bin/pacman -Syu --noconfirm | |
C:/msys64/usr/bin/pacman -S --noconfirm ` | |
mingw-w64-clang-x86_64-extra-cmake-modules ` | |
cmake ` | |
fmt ` | |
gcc ` | |
gettext-devel ` | |
libuv-devel ` | |
msys2-runtime-devel ` | |
ninja | |
cp -r its C:/msys64/usr/share/gettext | |
Add-Content $env:GITHUB_PATH "C:/msys64/usr/bin" | |
- name: Install dependencies (clang) | |
if: ${{ matrix.env == 'clang64' }} | |
run: | | |
C:/msys64/usr/bin/pacman -Syu --noconfirm | |
C:/msys64/usr/bin/pacman -S --noconfirm ` | |
mingw-w64-clang-x86_64-extra-cmake-modules ` | |
mingw-w64-clang-x86_64-clang ` | |
mingw-w64-clang-x86_64-cmake ` | |
mingw-w64-clang-x86_64-dlfcn ` | |
mingw-w64-clang-x86_64-fmt ` | |
mingw-w64-clang-x86_64-libuv ` | |
mingw-w64-clang-x86_64-pkgconf ` | |
gettext ` | |
ninja | |
mkdir -p C:/msys64/usr/share/gettext | |
cp -r its C:/msys64/usr/share/gettext | |
Add-Content $env:GITHUB_PATH "C:/msys64/clang64/bin" | |
git apply --directory=fcitx5 patches/fcitx5.patch | |
- name: Build | |
run: | | |
cmake -B build -G Ninja ` | |
-DCMAKE_BUILD_TYPE=Release | |
cmake --build build | |
- name: Package | |
if: ${{ matrix.env == 'clang64' }} | |
env: | |
DESTDIR: dist | |
run: | | |
cmake --install build | |
- name: Setup tmate session | |
if: ${{ failure() }} | |
uses: mxschmitt/action-tmate@v3 | |
build-win32: | |
runs-on: windows-2025 | |
defaults: | |
run: | |
working-directory: win32 | |
steps: | |
- name: Disable CRLF | |
working-directory: . | |
run: git config --global core.autocrlf false | |
- uses: actions/checkout@v4 | |
- name: Lint | |
run: ./scripts/lint.ps1 | |
- name: Build | |
run: | | |
cmake -B build -G Ninja ` | |
-DCMAKE_BUILD_TYPE=Release | |
cmake --build build | |
- name: Test | |
run: ctest --test-dir build --output-on-failure | |
- name: Check validity | |
run: md5sum -c checksum | |
- name: Setup tmate session | |
if: ${{ failure() }} | |
uses: mxschmitt/action-tmate@v3 |