|
1 |
| -name: "Unix build" |
| 1 | +name: "CI" |
2 | 2 |
|
3 | 3 | on: [push, pull_request]
|
4 | 4 |
|
5 | 5 | jobs:
|
6 |
| - test: |
| 6 | + unix: |
7 | 7 | strategy:
|
8 | 8 | fail-fast: false
|
9 | 9 | matrix:
|
|
44 | 44 | - name: Busted tests
|
45 | 45 | run: |
|
46 | 46 | make test
|
| 47 | +
|
| 48 | +
|
| 49 | + windows: |
| 50 | + strategy: |
| 51 | + fail-fast: false |
| 52 | + matrix: |
| 53 | + lua: [ |
| 54 | + #{name: "lua51", exe: "lua5.1", version: 5.1, incdir: "/mingw64/include/lua5.1/"}, #(two tests are failing) |
| 55 | + {name: "lua53", exe: "lua5.3", version: 5.3, incdir: "/mingw64/include/lua5.3/"}, |
| 56 | + {name: "lua", exe: "lua", version: 5.4, incdir: "/mingw64/include/"}, |
| 57 | + {name: "luajit", exe: "luajit", version: 5.1, incdir: "/mingw64/include/luajit-2.1/"} |
| 58 | + ] |
| 59 | + |
| 60 | + runs-on: windows-latest |
| 61 | + defaults: |
| 62 | + run: |
| 63 | + shell: msys2 {0} |
| 64 | + steps: |
| 65 | + - uses: actions/checkout@v4 |
| 66 | + - uses: msys2/setup-msys2@v2 |
| 67 | + with: |
| 68 | + msystem: MINGW64 |
| 69 | + update: true |
| 70 | + install: git |
| 71 | + make |
| 72 | + mingw-w64-x86_64-toolchain |
| 73 | + mingw-w64-x86_64-libvips |
| 74 | + mingw-w64-x86_64-openslide |
| 75 | + mingw-w64-x86_64-libheif |
| 76 | + mingw-w64-x86_64-libjxl |
| 77 | + mingw-w64-x86_64-imagemagick |
| 78 | + mingw-w64-x86_64-poppler |
| 79 | + mingw-w64-x86_64-lua-luarocks |
| 80 | + mingw-w64-x86_64-${{ matrix.lua.name }} |
| 81 | + |
| 82 | + - if: matrix.lua.name == 'lua51' |
| 83 | + name: Install bitop |
| 84 | + run: | |
| 85 | + pacman --noconfirm -S mingw-w64-x86_64-lua51-bitop |
| 86 | +
|
| 87 | + - name: Lua dependencies |
| 88 | + run: | |
| 89 | + if [[ ${{ matrix.lua.exe }} == lua5.3 ]]; then |
| 90 | + cp /mingw64/etc/luarocks/config-5.{4,3}.lua |
| 91 | + fi |
| 92 | + luarocks config --scope system lua_version ${{ matrix.lua.version }} |
| 93 | + luarocks config --scope system lua_interpreter ${{ matrix.lua.exe }}.exe |
| 94 | + luarocks config --scope system variables.LUA_DIR /mingw64/bin |
| 95 | + luarocks config --scope system variables.LUA_INCDIR ${{ matrix.lua.incdir }} |
| 96 | + make dev |
| 97 | + if [[ ${{ matrix.lua.exe }} != luajit ]]; then make ffi; fi |
| 98 | +
|
| 99 | + - name: Add to PATH |
| 100 | + run: | |
| 101 | + echo $RUNNER_TEMP/msys64/mingw64/bin:$HOME/.luarocks/bin >> $GITHUB_PATH |
| 102 | +
|
| 103 | + - name: Lint with luacheck |
| 104 | + run: | |
| 105 | + make lint |
| 106 | +
|
| 107 | + - name: Busted tests |
| 108 | + run: | |
| 109 | + busted.bat --lua=${{ matrix.lua.exe }} -o gtest -v . |
0 commit comments