-
Notifications
You must be signed in to change notification settings - Fork 10
102 lines (85 loc) · 3 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: "CI"
on: [push, pull_request]
jobs:
unix:
strategy:
fail-fast: false
matrix:
luaVersion: ["5.1", "5.2", "5.3", "5.4", "luajit-2.1.0-beta3", "luajit-openresty"]
os: ["ubuntu-latest", "macos-latest"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: leafo/gh-actions-lua@v9
with:
luaVersion: ${{ matrix.luaVersion }}
- uses: leafo/gh-actions-luarocks@v4
- name: Install libvips
run: |
if [[ ${{ matrix.os }} == macos* ]]; then
brew install vips
elif [[ ${{ matrix.os }} == ubuntu* ]]; then
sudo apt update
sudo apt install --no-install-recommends libvips-dev
fi
- name: Lua dependencies
run: |
make dev
if [[ ${{ matrix.luaVersion }} == 5.* ]]; then make ffi; fi
- name: Lint with luacheck
run: |
luacheck -q .
- name: Busted tests
run: |
busted -o gtest -v spec
windows:
strategy:
fail-fast: false
matrix:
lua: [
#{name: "lua51", exe: "lua5.1", version: 5.1, incdir: "/mingw64/include/lua5.1/"}, #(two tests are failing)
{name: "lua53", exe: "lua5.3", version: 5.3, incdir: "/mingw64/include/lua5.3/"},
{name: "lua", exe: "lua", version: 5.4, incdir: "/mingw64/include/"},
{name: "luajit", exe: "luajit", version: 5.1, incdir: "/mingw64/include/luajit-2.1/"}
]
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v4
- uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: git
make
mingw-w64-x86_64-toolchain
mingw-w64-x86_64-libvips
mingw-w64-x86_64-openslide
mingw-w64-x86_64-libheif
mingw-w64-x86_64-libjxl
mingw-w64-x86_64-imagemagick
mingw-w64-x86_64-poppler
mingw-w64-x86_64-lua-luarocks
mingw-w64-x86_64-${{ matrix.lua.name }}
- name: Lua dependencies
run: |
if [[ ${{ matrix.lua.exe }} == lua5.3 ]]; then
cp /mingw64/etc/luarocks/config-5.{4,3}.lua
fi
luarocks config --scope system lua_version ${{ matrix.lua.version }}
luarocks config --scope system lua_interpreter ${{ matrix.lua.exe }}.exe
luarocks config --scope system variables.LUA_DIR /mingw64/bin
luarocks config --scope system variables.LUA_INCDIR ${{ matrix.lua.incdir }}
make dev
if [[ ${{ matrix.lua.exe }} != luajit ]]; then make ffi; fi
- name: Add to PATH
run: |
echo $RUNNER_TEMP/msys64/mingw64/bin:$HOME/.luarocks/bin >> $GITHUB_PATH
- name: Lint with luacheck
run: |
luacheck.bat -q .
- name: Busted tests
run: |
busted.bat --lua=${{ matrix.lua.exe }} -o gtest -v spec