Skip to content

Commit e2bedb7

Browse files
committed
initial workflow
1 parent 483ac62 commit e2bedb7

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

.github/workflows/prebuild.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: prebuild
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
prebuild:
8+
runs-on: ubuntu-latest
9+
container: archlinux:latest
10+
steps:
11+
- name: Install dependencies
12+
run: |
13+
pacman -Syu --noconfirm git python python-marisa
14+
15+
- uses: actions/checkout@v6
16+
with:
17+
submodules: true
18+
19+
- name: Download arpa
20+
run: |
21+
curl -LO https://github.com/fcitx-contrib/libkkc-data/releases/download/data/data.arpa.tar.bz2
22+
mkdir data/models/text3
23+
tar xf data.arpa.tar.bz2 -C data/models/text3
24+
25+
- name: Build model
26+
run: |
27+
python tools/sortlm.py data/models/text3/data.arpa sorted3/data
28+
python tools/genfilter.py sorted3/data.2gram sorted3/data.2gram.filter 12
29+
python tools/genfilter.py sorted3/data.3gram sorted3/data.3gram.filter 10
30+
31+
- name: Build data
32+
working-directory: libkkc
33+
run: |
34+
./autogen.sh
35+
./configure --prefix=/usr
36+
make -j8
37+
DESTDIR=$(pwd) make install
38+
39+
- name: Package
40+
working-directory: libkkc/usr
41+
run: |
42+
tar cjf ../../libkkc-data.tar.bz2 share
43+
44+
- name: Release data
45+
uses: 'marvinpinto/action-automatic-releases@latest'
46+
with:
47+
repo_token: ${{ secrets.GITHUB_TOKEN }}
48+
automatic_release_tag: latest
49+
prerelease: true
50+
title: "Nightly Build"
51+
files: |
52+
libkkc-data.tar.bz2
53+
54+
- name: Setup tmate session
55+
if: ${{ failure() }}
56+
uses: mxschmitt/action-tmate@v3

0 commit comments

Comments
 (0)