Skip to content

Commit

Permalink
add ci
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaozg committed Dec 17, 2023
1 parent 79f6aaf commit 94561ec
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 4 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: CI

on:
push:
branches: [ "master", "ci" ]
tags:
- v?[0-9].[0-9]+.[0-9]+-[0-9]+
pull_request:
# The branches below must be a subset of the branches above
branches: [ "master" ]

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# os: [macos-latest, ubuntu-latest]
os: [macos-latest]
env:
MACOSX_DEPLOYMENT_TARGET: 10.12

steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Setup
run: |
brew install luajit
brew install luarocks
wget https://github.com/rime/librime/releases/download/latest/rime-de12d6a-macOS.tar.bz2
luarocks --lua-dir=/usr/local/opt/luajit install busted
tar xjvf rime-de12d6a-macOS.tar.bz2
ln -s dist/lib
git clone https://github.com/zhaozg/rime_simp.git var
- name: Test
run:
~/.luarocks/bin/busted
14 changes: 11 additions & 3 deletions profile.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,22 @@ local ffi = require'ffi'
if (ffi.os == 'OSX') then
traits = {
runtimePath = 'lib/librime.1.dylib',
dataPath = os.getenv('HOME') ..
'/Library/Input Methods/Squirrel.app/Contents/SharedSupport',
dataPath = 'var',
userPath = 'var/rime',
name= "rime-lua",
code_name = 'rime-lua',
version = '0.0.0'
}
else
elseif ffi.os == 'Linux' then
traits = {
runtimePath = 'lib/librime.1.so',
dataPath = 'var',
userPath = 'var/rime',
name= "rime-lua",
code_name = 'rime-lua',
version = '0.0.0'
}
elseif ffi.os == 'Windows' then
traits = {
runtimePath = [[e:\Totalcmd\Tools\RIME\weasel-0.9.30\rime.dll]],
dataPath = [[e:\Totalcmd\Tools\RIME\weasel-0.9.30\data]],
Expand Down
1 change: 0 additions & 1 deletion spec/config_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ describe("config test", function()
teardown(function()
_ref = _ref - 1
if _ref == 0 then
print('yyy', _ref)
rime:finalize()
rime = nil
end
Expand Down

0 comments on commit 94561ec

Please sign in to comment.