Curl #204
Workflow file for this run
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: | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: sudo apt install -y clang-format | |
- name: Lint | |
run: | | |
find include preview src -name '*.mm' -o -name '*.hpp' -o -name '*.cpp' | xargs clang-format -Werror --dry-run | |
build: | |
needs: lint | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-14, macos-13, ubuntu-24.04] | |
include: | |
- { os: macos-14, arch: arm64 } | |
- { os: macos-13, arch: x86_64 } | |
- { os: ubuntu-24.04, arch: x86_64 } | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20.x | |
- name: Install node dependencies | |
run: | | |
npm i -g pnpm | |
pnpm i | |
- name: Lint and Check type | |
if: startsWith(matrix.os, 'ubuntu') | |
run: | | |
pnpm run lint | |
pnpm run check | |
- name: Install dependencies (macOS) | |
if: startsWith(matrix.os, 'macos') | |
run: | | |
brew install ninja | |
./install-deps.sh ${{ matrix.arch }} | |
- name: Install dependencies (Ubuntu) | |
if: startsWith(matrix.os, 'ubuntu') | |
run: | | |
sudo apt install -y ninja-build \ | |
nlohmann-json3-dev \ | |
libwebkit2gtk-4.1-dev | |
# npx playwright install-deps | |
- name: Configure (macOS) | |
if: startsWith(matrix.os, 'macos') | |
run: | | |
PKG_CONFIG_PATH=/tmp/fcitx5/lib/pkgconfig cmake -B build -G Ninja \ | |
-DWKWEBVIEW_PROTOCOL="fcitx" \ | |
-DWEBVIEW_WWW_PATH=".local/share/fcitx5/www" \ | |
-DCMAKE_OSX_ARCHITECTURES=${{ matrix.arch }} \ | |
-DCMAKE_BUILD_TYPE=Release | |
- name: Configure (Ubuntu) | |
if: startsWith(matrix.os, 'ubuntu') | |
run: | | |
cmake -B build -G Ninja \ | |
-DCMAKE_BUILD_TYPE=Release | |
- name: Build | |
run: cmake --build build | |
- name: Test | |
if: startsWith(matrix.os, 'macos') # Ubuntu fails Set layout for 1px | |
run: | | |
npx playwright install webkit | |
pnpm run test | |
- name: Setup tmate session | |
if: ${{ failure() }} | |
uses: mxschmitt/action-tmate@v3 |