aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorPhilipp Janda <siffiejoe@gmx.net>2020-11-11 15:26:31 +0100
committerGitHub <noreply@github.com>2020-11-11 15:26:31 +0100
commite00fd0a415694dc15687593e355441af6dfa30bd (patch)
treefb7a462acdeb3be364a83ed36d49f57053e5b3ec /.github
parent09d8705ecec2347c16b93ef90125a037fa4ff743 (diff)
downloadlua-compat-5.3-e00fd0a415694dc15687593e355441af6dfa30bd.tar.gz
lua-compat-5.3-e00fd0a415694dc15687593e355441af6dfa30bd.tar.bz2
lua-compat-5.3-e00fd0a415694dc15687593e355441af6dfa30bd.zip
GitHub Actions (#51)
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/compat53-tests.yml65
1 files changed, 65 insertions, 0 deletions
diff --git a/.github/workflows/compat53-tests.yml b/.github/workflows/compat53-tests.yml
new file mode 100644
index 0000000..d0dd3d4
--- /dev/null
+++ b/.github/workflows/compat53-tests.yml
@@ -0,0 +1,65 @@
1name: compat53-tests
2on:
3 push:
4 branches: ["master"]
5 pull_request:
6jobs:
7 compat53-test:
8 runs-on: ubuntu-latest
9 strategy:
10 fail-fast: false
11 matrix:
12 include:
13 - luaVersion: "lua=5.1"
14 compiler: gcc
15 external: false
16 - luaVersion: "lua=5.1"
17 compiler: gcc
18 external: true
19 - luaVersion: "lua=5.1"
20 compiler: g++
21 external: true
22 - luaVersion: "luajit=@v2.1 --compat=none"
23 compiler: gcc
24 external: false
25 - luaVersion: "luajit=@v2.1 --compat=none"
26 compiler: gcc
27 external: true
28 - luaVersion: "luajit=@v2.1 --compat=all"
29 compiler: gcc
30 external: false
31 - luaVersion: "luajit=@v2.1 --compat=all"
32 compiler: gcc
33 external: true
34 - luaVersion: "lua=5.2"
35 compiler: gcc
36 external: false
37 - luaVersion: "lua=5.2"
38 compiler: gcc
39 external: true
40 - luaVersion: "lua=5.2"
41 compiler: g++
42 external: true
43 steps:
44 - uses: actions/checkout@v2
45 - name: install Lua
46 run: |
47 pip3 install --user hererocks
48 ~/.local/bin/hererocks old --${{ matrix.luaVersion }}
49 test -e old/bin/lua || (cd old/bin && ln -s luajit* lua)
50 ~/.local/bin/hererocks new --lua=5.3
51 - name: compile C modules
52 run: |
53 export CC=${{ matrix.compiler }} CFLAGS="-Wall -Wextra -Ic-api -O2 -fPIC"
54 export DEF="" SRC=""
55 if [ "${{ matrix.external }}" = true ]; then DEF="-DCOMPAT53_PREFIX=compat53" SRC="c-api/compat-5.3.c"; fi
56 ${CC} ${CFLAGS} -Iold/include ${DEF} -shared -o old/testmod.so tests/testmod.c ${SRC}
57 ${CC} ${CFLAGS} -Inew/include ${DEF} -shared -o new/testmod.so tests/testmod.c ${SRC}
58 gcc ${CFLAGS} -Iold/include ${DEF} -shared -o old/compat53.so ltablib.c lutf8lib.c lstrlib.c ${SRC}
59 - name: run test scripts
60 run: |
61 (cd old && bin/lua ../tests/test.lua) > old.txt
62 (cd new && bin/lua ../tests/test.lua) > new.txt
63 - name: compare script output
64 run: diff old.txt new.txt || true
65