-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (60 loc) · 1.71 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: ci
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-24.04
env:
EMSCRIPTEN_VERSION: '3.1.71'
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-node@v4
with:
node-version: 22.x
- name: Install dependencies
run: |
sudo apt install -y clang-format \
ninja-build \
gettext
npm i -g pnpm
pnpm i
pnpm --prefix=fcitx5-webview i
- name: Lint
run: ./scripts/lint.sh
- name: Install emsdk
run: |
git clone https://github.com/emscripten-core/emsdk
cd emsdk
./emsdk install ${{ env.EMSCRIPTEN_VERSION }}
./emsdk activate ${{ env.EMSCRIPTEN_VERSION }}
- name: Build
run: |
./scripts/install-deps.sh
. emsdk/emsdk_env.sh
export EMCC_FORCE_STDLIBS=libc++
export FCITX_DISTRIBUTION=fcitx5-js
emcmake cmake -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release
cmake --build build
npm pack
cd build/sysroot/usr && tar cjvf ../../../fcitx5-js-dev.tar.bz2 include lib
- name: Setup tmate session
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3
- name: 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-js-*.tgz
fcitx5-js-dev.tar.bz2