diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b1f40bb..6cf5d9e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,11 +13,22 @@ jobs: - os: "macos-latest" lua-version: "5.4" libflag: "-bundle -undefined dynamic_lookup -all_load --coverage" + - os: "windows-latest" + toolchain: "msvc" + lua-version: "5.4" + - os: "windows-latest" + lua-version: "luajit" runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@master + - name: Setup MSVC + # 'luarocks/gh-actions-lua' step requires msvc to build PUC-Rio Lua + # versions on Windows (LuaJIT will be built using MinGW/gcc). + if: ${{ matrix.toolchain == 'msvc' }} + uses: ilammy/msvc-dev-cmd@v1 + - uses: luarocks/gh-actions-lua@master with: luaVersion: ${{ matrix.lua-version }} @@ -33,15 +44,24 @@ jobs: # install luacov-coveralls, but avoid installing luafilesystem luarocks install luacov-coveralls --server=https://luarocks.org/dev --deps-mode=none - - name: Build + - name: Unix Build + if: ${{ matrix.os != 'windows-latest' }} run: | luarocks make CFLAGS="-O2 -fPIC -ftest-coverage -fprofile-arcs" LIBFLAG="${{ matrix.libflag }}" + - name: Windows Build + # TODO Windows coverage + if: ${{ matrix.os == 'windows-latest' }} + run: | + luarocks make + - name: Test run: | lua -lluacov tests/test.lua - name: Coverage + # TODO Windows coverage + if: ${{ matrix.os != 'windows-latest' }} run: | export MY_PYTHON_VER=$(python -c 'import sys; print(".".join(sys.version.split(".")[0:2]))') export PATH="/Users/runner/Library/Python/$MY_PYTHON_VER/bin:$PATH"