diff options
| author | leaf corcoran <leafot@gmail.com> | 2019-09-22 09:50:09 -0700 |
|---|---|---|
| committer | leaf <leafot@gmail.com> | 2020-04-25 14:24:18 -0700 |
| commit | 206cb297178ff46b4c5e5de38744cd648dac4f22 (patch) | |
| tree | a14cee341909cc530a8270bf04eff4dee2716ea8 | |
| parent | 701fda3ed4dccd6dd7e535986567d4e0235c6d02 (diff) | |
| download | lua-cjson-206cb297178ff46b4c5e5de38744cd648dac4f22.tar.gz lua-cjson-206cb297178ff46b4c5e5de38744cd648dac4f22.tar.bz2 lua-cjson-206cb297178ff46b4c5e5de38744cd648dac4f22.zip | |
cmake doesn't support finding luajit, so skip it
| -rw-r--r-- | .github/workflows/test.yml | 8 | ||||
| -rwxr-xr-x | runtests.sh | 24 |
2 files changed, 20 insertions, 12 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 395e380..c0fd8ee 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml | |||
| @@ -10,9 +10,11 @@ jobs: | |||
| 10 | luaVersion: ["5.1", "5.2", "5.3", "luajit", "luajit-openresty"] | 10 | luaVersion: ["5.1", "5.2", "5.3", "luajit", "luajit-openresty"] |
| 11 | include: | 11 | include: |
| 12 | - luaVersion: "luajit" | 12 | - luaVersion: "luajit" |
| 13 | luaIncludeDir: "LUA_INCLUDE_DIR=.lua/include/luajit-2.1" | 13 | runtestArgs: "LUA_INCLUDE_DIR=.lua/include/luajit-2.1" |
| 14 | runtestEnv: "SKIP_CMAKE=1" | ||
| 14 | - luaVersion: "luajit-openresty" | 15 | - luaVersion: "luajit-openresty" |
| 15 | luaIncludeDir: "LUA_INCLUDE_DIR=.lua/include/luajit-2.1" | 16 | runtestArgs: "LUA_INCLUDE_DIR=.lua/include/luajit-2.1" |
| 17 | runtestEnv: "SKIP_CMAKE=1" | ||
| 16 | 18 | ||
| 17 | runs-on: ubuntu-latest | 19 | runs-on: ubuntu-latest |
| 18 | 20 | ||
| @@ -27,7 +29,7 @@ jobs: | |||
| 27 | 29 | ||
| 28 | - name: test | 30 | - name: test |
| 29 | run: | | 31 | run: | |
| 30 | LUA_DIR=.lua ./runtests.sh PREFIX=.lua ${{ matrix.luaIncludeDir }} | 32 | LUA_DIR=.lua ${{ matrix.runtestEnv }} ./runtests.sh PREFIX=.lua ${{ matrix.runtestArgs }} |
| 31 | 33 | ||
| 32 | - name: build | 34 | - name: build |
| 33 | run: | | 35 | run: | |
diff --git a/runtests.sh b/runtests.sh index bfb01d9..fe606fa 100755 --- a/runtests.sh +++ b/runtests.sh | |||
| @@ -56,14 +56,20 @@ do_tests | |||
| 56 | make clean | 56 | make clean |
| 57 | rm -rf tests/cjson{,.so} | 57 | rm -rf tests/cjson{,.so} |
| 58 | 58 | ||
| 59 | echo "===== Testing Cmake build =====" | 59 | |
| 60 | mkdir build | 60 | if [ -z "$SKIP_CMAKE" ]; then |
| 61 | cd build | 61 | echo "===== Testing Cmake build =====" |
| 62 | cmake .. | 62 | mkdir build |
| 63 | make | 63 | cd build |
| 64 | cd .. | 64 | cmake .. |
| 65 | cp -r lua/cjson build/cjson.so tests | 65 | make |
| 66 | do_tests | 66 | cd .. |
| 67 | rm -rf build tests/cjson{,.so} | 67 | cp -r lua/cjson build/cjson.so tests |
| 68 | do_tests | ||
| 69 | rm -rf build tests/cjson{,.so} | ||
| 70 | else | ||
| 71 | echo "===== Skipping Cmake build =====" | ||
| 72 | fi | ||
| 73 | |||
| 68 | 74 | ||
| 69 | # vi:ai et sw=4 ts=4: | 75 | # vi:ai et sw=4 ts=4: |
