Fix Windows CI #114
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "CI" | |
| on: [push, pull_request] | |
| jobs: | |
| unix: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| luaVersion: ["5.1", "5.2", "5.3", "5.4", "luajit-openresty"] | |
| os: ["ubuntu-latest", "macos-latest"] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: leafo/gh-actions-lua@v12 | |
| with: | |
| luaVersion: ${{ matrix.luaVersion }} | |
| - uses: leafo/gh-actions-luarocks@v6 | |
| - name: Install Ubuntu dependencies | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install --no-install-recommends libvips-dev | |
| - name: Install macOS dependencies | |
| if: runner.os == 'macOS' | |
| run: | | |
| brew install vips | |
| echo "DYLD_LIBRARY_PATH=$(brew --prefix vips)/lib:$DYLD_LIBRARY_PATH" >> $GITHUB_ENV | |
| - name: Prepare LuaJIT environment | |
| if: startsWith(matrix.luaVersion, 'luajit') | |
| run: luarocks config --scope system rocks_provided.luaffi-tkl 2.1-1 | |
| - name: Install lua-vips | |
| run: luarocks make | |
| - name: Lint with luacheck | |
| run: | | |
| luarocks install luacheck | |
| luacheck -q . | |
| - name: Busted tests | |
| run: luarocks test spec/ -- -o gtest -v spec | |
| windows: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # Two tests are failing | |
| #- lua: { version: "5.1", msys2-name: "lua51", exe: "lua5.1" } | |
| - lua: { version: "5.3", msys2-name: "lua53", exe: "lua5.3" } | |
| - lua: { version: "5.4", msys2-name: "lua", exe: "lua" } | |
| - lua: { version: "5.1", msys2-name: "luajit", exe: "luajit" } | |
| runs-on: windows-latest | |
| defaults: | |
| run: | |
| shell: msys2 {0} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: msys2/setup-msys2@v2 | |
| with: | |
| msystem: mingw64 | |
| update: true | |
| install: >- | |
| git | |
| make | |
| mingw-w64-x86_64-toolchain | |
| mingw-w64-x86_64-libvips | |
| mingw-w64-x86_64-openslide | |
| mingw-w64-x86_64-libheif | |
| mingw-w64-x86_64-libjxl | |
| mingw-w64-x86_64-imagemagick | |
| mingw-w64-x86_64-poppler | |
| mingw-w64-x86_64-lua-luarocks | |
| mingw-w64-x86_64-${{ matrix.lua.msys2-name }} | |
| - name: Prepare LuaRocks config for Lua 5.3 | |
| if: matrix.lua.exe == 'lua5.3' | |
| run: cp /mingw64/etc/luarocks/config-5.{4,3}.lua | |
| - name: Prepare LuaRocks | |
| run: | | |
| luarocks config --scope system lua_version ${{ matrix.lua.version }} | |
| luarocks config --scope system lua_interpreter ${{ matrix.lua.exe }}.exe | |
| luarocks config --scope system lua_dir /mingw64 | |
| - name: Prepare LuaJIT environment | |
| if: matrix.lua.exe == 'luajit' | |
| run: luarocks config --scope system rocks_provided.luaffi-tkl 2.1-1 | |
| - name: Add local LuaRocks bin to PATH | |
| run: echo "$HOME/.luarocks/bin" >> $GITHUB_PATH | |
| - name: Install lua-vips | |
| run: luarocks make | |
| - name: Lint with luacheck | |
| run: | | |
| luarocks install luacheck | |
| luacheck.bat -q . | |
| - name: Busted tests | |
| run: luarocks test spec -- --lua=${{ matrix.lua.exe }} -o gtest -v |