@@ -13,35 +13,60 @@ jobs:
1313 - os : " macos-latest"
1414 lua-version : " 5.4"
1515 libflag : " -bundle -undefined dynamic_lookup -all_load --coverage"
16+ - os : " windows-latest"
17+ toolchain : " msvc"
18+ lua-version : " 5.4"
19+ - os : " windows-latest"
20+ lua-version : " luajit"
1621 runs-on : ${{ matrix.os }}
1722
1823 steps :
1924 - uses : actions/checkout@master
2025
26+ - name : Setup MSVC
27+ # 'luarocks/gh-actions-lua' step requires msvc to build PUC-Rio Lua
28+ # versions on Windows (LuaJIT will be built using MinGW/gcc).
29+ if : ${{ matrix.toolchain == 'msvc' }}
30+ uses : ilammy/msvc-dev-cmd@v1
31+
2132 - uses : luarocks/gh-actions-lua@master
2233 with :
2334 luaVersion : ${{ matrix.lua-version }}
2435
2536 - uses : luarocks/gh-actions-luarocks@master
2637
27- - name : Prep
38+ - name : Prep luacov
39+ run : |
40+ luarocks install luacov
41+
42+ - name : Prep luacov-coveralls
43+ # TODO Windows coverage
44+ if : ${{ matrix.os != 'windows-latest' }}
2845 run : |
2946 pip install --user cpp-coveralls
47+ # install luacov-coveralls, but avoid installing luafilesystem
3048 luarocks install lua-path
3149 luarocks install dkjson
32- luarocks install luacov
33- # install luacov-coveralls, but avoid installing luafilesystem
3450 luarocks install luacov-coveralls --server=https://luarocks.org/dev --deps-mode=none
3551
36- - name : Build
52+ - name : Unix Build
53+ if : ${{ matrix.os != 'windows-latest' }}
3754 run : |
3855 luarocks make CFLAGS="-O2 -fPIC -ftest-coverage -fprofile-arcs" LIBFLAG="${{ matrix.libflag }}"
3956
57+ - name : Windows Build
58+ # TODO Windows coverage
59+ if : ${{ matrix.os == 'windows-latest' }}
60+ run : |
61+ luarocks make
62+
4063 - name : Test
4164 run : |
4265 lua -lluacov tests/test.lua
4366
4467 - name : Coverage
68+ # TODO Windows coverage
69+ if : ${{ matrix.os != 'windows-latest' }}
4570 run : |
4671 export MY_PYTHON_VER=$(python -c 'import sys; print(".".join(sys.version.split(".")[0:2]))')
4772 export PATH="/Users/runner/Library/Python/$MY_PYTHON_VER/bin:$PATH"
0 commit comments