aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2024-10-28 14:41:59 -0300
committerHisham Muhammad <hisham@gobolinux.org>2024-10-28 14:49:36 -0300
commitb6abbb63b1d615150786b81dbc74291b020324f3 (patch)
treeb6e40b3ea37838ceb49807b43479ed5517ae483d
parent71ae24046c87d6e51f371c8f0f3b968e219f6543 (diff)
downloadluafilesystem-b6abbb63b1d615150786b81dbc74291b020324f3.tar.gz
luafilesystem-b6abbb63b1d615150786b81dbc74291b020324f3.tar.bz2
luafilesystem-b6abbb63b1d615150786b81dbc74291b020324f3.zip
CI: add Windows run
-rw-r--r--.github/workflows/ci.yml33
1 files changed, 29 insertions, 4 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index b1f40bb..a89b76b 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -13,35 +13,60 @@ jobs:
13 - os: "macos-latest" 13 - os: "macos-latest"
14 lua-version: "5.4" 14 lua-version: "5.4"
15 libflag: "-bundle -undefined dynamic_lookup -all_load --coverage" 15 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"
16 runs-on: ${{ matrix.os }} 21 runs-on: ${{ matrix.os }}
17 22
18 steps: 23 steps:
19 - uses: actions/checkout@master 24 - uses: actions/checkout@master
20 25
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
21 - uses: luarocks/gh-actions-lua@master 32 - uses: luarocks/gh-actions-lua@master
22 with: 33 with:
23 luaVersion: ${{ matrix.lua-version }} 34 luaVersion: ${{ matrix.lua-version }}
24 35
25 - uses: luarocks/gh-actions-luarocks@master 36 - uses: luarocks/gh-actions-luarocks@master
26 37
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' }}
28 run: | 45 run: |
29 pip install --user cpp-coveralls 46 pip install --user cpp-coveralls
47 # install luacov-coveralls, but avoid installing luafilesystem
30 luarocks install lua-path 48 luarocks install lua-path
31 luarocks install dkjson 49 luarocks install dkjson
32 luarocks install luacov
33 # install luacov-coveralls, but avoid installing luafilesystem
34 luarocks install luacov-coveralls --server=https://luarocks.org/dev --deps-mode=none 50 luarocks install luacov-coveralls --server=https://luarocks.org/dev --deps-mode=none
35 51
36 - name: Build 52 - name: Unix Build
53 if: ${{ matrix.os != 'windows-latest' }}
37 run: | 54 run: |
38 luarocks make CFLAGS="-O2 -fPIC -ftest-coverage -fprofile-arcs" LIBFLAG="${{ matrix.libflag }}" 55 luarocks make CFLAGS="-O2 -fPIC -ftest-coverage -fprofile-arcs" LIBFLAG="${{ matrix.libflag }}"
39 56
57 - name: Windows Build
58 # TODO Windows coverage
59 if: ${{ matrix.os == 'windows-latest' }}
60 run: |
61 luarocks make
62
40 - name: Test 63 - name: Test
41 run: | 64 run: |
42 lua -lluacov tests/test.lua 65 lua -lluacov tests/test.lua
43 66
44 - name: Coverage 67 - name: Coverage
68 # TODO Windows coverage
69 if: ${{ matrix.os != 'windows-latest' }}
45 run: | 70 run: |
46 export MY_PYTHON_VER=$(python -c 'import sys; print(".".join(sys.version.split(".")[0:2]))') 71 export MY_PYTHON_VER=$(python -c 'import sys; print(".".join(sys.version.split(".")[0:2]))')
47 export PATH="/Users/runner/Library/Python/$MY_PYTHON_VER/bin:$PATH" 72 export PATH="/Users/runner/Library/Python/$MY_PYTHON_VER/bin:$PATH"