Skip to content

replace mkdirP with mkdirTree #248

replace mkdirP with mkdirTree

replace mkdirP with mkdirTree #248

Workflow file for this run

name: ci
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
jobs:
lint:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
with:
submodules: recursive
- uses: actions/setup-node@v5
with:
node-version: 24.x
- name: Install dependencies
run: |
sudo apt install -y clang-format
npm i -g pnpm
pnpm --prefix=fcitx5-keyboard-web i
pnpm --prefix=fcitx5-keyboard-web run build
pnpm i
- name: Lint
run: ./scripts/lint.sh
build:
runs-on: ${{ matrix.os }}
needs: lint
env:
EMSCRIPTEN_VERSION: '4.0.15'
strategy:
fail-fast: false
matrix:
include:
- { os: ubuntu-24.04 }
- { os: ubuntu-24.04-arm }
- { os: macos-26 }
steps:
- uses: actions/checkout@v5
with:
submodules: recursive
- uses: actions/checkout@v5
with:
repository: emscripten-core/emsdk
path: emsdk
- uses: actions/setup-node@v5
with:
node-version: 24.x
- name: Install dependencies (Ubuntu)
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt install -y \
gettext
- name: Install node dependencies
run: |
npm i -g pnpm
pnpm --prefix=fcitx5-keyboard-web i
pnpm --prefix=fcitx5-keyboard-web run build
pnpm i
pnpm --prefix=fcitx5-webview i
- name: Install emsdk
working-directory: emsdk
run: |
./emsdk install ${{ env.EMSCRIPTEN_VERSION }}
./emsdk activate ${{ env.EMSCRIPTEN_VERSION }}
- name: Build
run: |
./scripts/install-deps.sh
. emsdk/emsdk_env.sh
emcmake cmake -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release
EMCC_FORCE_STDLIBS=libc++ FCITX_DISTRIBUTION=fcitx5-js cmake --build build
npm pack
- name: Package dev tarball
env:
LC_ALL: C
run: |
if [[ $(uname) == 'Darwin' ]]; then
tar=gtar
else
tar=tar
fi
cd build/destdir/usr && $tar cj \
--sort=name --mtime=@0 \
--numeric-owner --owner=0 --group=0 --mode=go+u,go-w \
-f ../../../fcitx5-js-dev.tar.bz2 include lib
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: artifact-${{ matrix.os }}
path: |
fcitx5-js.tgz
fcitx5-js-dev.tar.bz2
- name: Test
run: |
npx playwright install
npx playwright install-deps
pnpm run test
- name: Setup tmate session
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3
compare:
needs: build
if: ${{ github.ref != 'refs/heads/master' }}
uses: ./.github/workflows/compare.yml
release:
if: ${{ github.ref == 'refs/heads/master' }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Download artifact
uses: actions/download-artifact@v5
with:
pattern: artifact-ubuntu-24.04
merge-multiple: true
- name: Release
uses: 'marvinpinto/action-automatic-releases@latest'
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
automatic_release_tag: latest
prerelease: true
title: "Nightly Build"
files: |
fcitx5-js.tgz
fcitx5-js-dev.tar.bz2