forked from rime/weasel
-
Notifications
You must be signed in to change notification settings - Fork 22
89 lines (79 loc) · 2.51 KB
/
commit-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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: Commit CI
on:
workflow_dispatch:
push:
branches:
- '*'
tags:
- '![0-9]+.*'
paths:
- '**/**'
- '!*.md'
- '!.gitignore'
pull_request:
jobs:
build:
runs-on: windows-2022
env:
boost_version: 1.83.0
BOOST_ROOT: ${{ github.workspace }}\deps\boost_1_83_0
steps:
- name: Checkout last commit
uses: actions/checkout@v3
with:
submodules: recursive
- name: Configure build environment
run: |
copy env.vs2022.bat env.bat
$git_ref_name = git describe --always
echo "git_ref_name=$git_ref_name" >> $env:GITHUB_ENV
- name: Cache Boost
id: cache-boost
uses: actions/cache@v3
with:
path: |
${{ env.BOOST_ROOT }}
key: ${{ runner.os }}-boost-${{ env.boost_version }}
- name: Install Boost
if: steps.cache-boost.outputs.cache-hit != 'true'
run: .\install_boost.bat
- name: Add msbuild to PATH
uses: microsoft/[email protected]
- name: build librime
if: ${{ success() }}
run: |
# load plugins
pushd librime\plugins\
# wait for hchunhui/librime-lua#310 merged
git clone -v --depth=1 https://github.com/hchunhui/librime-lua.git
git clone -v --depth=1 -b thirdparty https://github.com/hchunhui/librime-lua.git librime-lua\thirdparty
git clone -v --depth=1 https://github.com/rime/librime-predict.git
git clone -v --depth=1 https://github.com/lotem/librime-octagram.git
popd
.\build.bat librime
#if not exist output\data\opencc mkdir output\data\opencc
#rmdir /S output\data\opencc
#mkdir output\data\opencc
#copy /Y librime\share\opencc\*.* .\output\data\opencc\
#.\github.install.bat
- name: Build Weasel
id: build_weasel
run: |
.\build.bat opencc
.\build.bat data
.\build.bat hant
.\build.bat installer
if: ${{ success() }}
- name: Compress Debug Symbols
shell: pwsh
run: |
Compress-Archive -Path output\*.pdb -CompressionLevel Optimal -DestinationPath .\output\archives\symbols.zip
if: ${{ success() }}
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
if-no-files-found: error
path: |
.\output\archives\weasel*.exe
.\output\archives\symbols.zip
if: ${{ success() }}