-
Notifications
You must be signed in to change notification settings - Fork 2
66 lines (54 loc) · 1.83 KB
/
test.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
name: test
on: [push, workflow_dispatch]
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
luaVersion: ["5.1", "5.2", "5.3", "5.4", "luajit"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@master
- uses: leafo/gh-actions-lua@master
with:
luaVersion: ${{ matrix.luaVersion }}
- uses: leafo/gh-actions-luarocks@master
- name: setup linux
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get install xvfb libglu1-mesa-dev freeglut3-dev mesa-common-dev x11-utils
Xvfb :19 -screen 0 1024x768x16 &
echo "DISPLAY=:19" >> $GITHUB_ENV
sleep 1
export DISPLAY=":19"
xwininfo -root
- name: setup macos
if: matrix.os == 'macos-latest'
run: |
brew install cairo glew glfw
- name: setup common
run: |
luarocks install lpath
luarocks install oocairo
luarocks --server=https://luarocks.org/dev install lpugl
luarocks --server=https://luarocks.org/dev install lpugl_cairo
luarocks --server=https://luarocks.org/dev install lpugl_opengl
luarocks make lwtk-scm-0.rockspec
- name: alltests
run: |
set -e
lua -v
echo "-----------------------------------------------------------"
lua src/alltests.lua src/tests
echo "-----------------------------------------------------------"
- name: doctest
run: |
set -e
lua -v
cd src
export LUA_PATH='./?.lua;./?/init.lua;'"$(lua -e 'print(package.path)')"
lua -e 'print("package.path =", package.path)'
echo "-----------------------------------------------------------"
lua doctest.lua
echo "-----------------------------------------------------------"