forked from libvips/lua-vips
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Github actions for installing Lua/Luarocks, check all Lua versions
- Loading branch information
Showing
2 changed files
with
29 additions
and
98 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,79 +1,41 @@ | ||
name: CI | ||
name: "Unix build" | ||
|
||
on: [ push, pull_request ] | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
CI-Linux-LuaJIT: | ||
name: "Linux x64 with LuaJIT" | ||
runs-on: ubuntu-22.04 | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install dependencies | ||
run: | | ||
# Use the official APT repositories from OpenResty to install LuaJIT | ||
curl -sSL "https://openresty.org/package/pubkey.gpg" | sudo gpg --dearmor -o /usr/share/keyrings/openresty.gpg | ||
echo "deb [signed-by=/usr/share/keyrings/openresty.gpg] https://openresty.org/package/ubuntu $(lsb_release -sc) main" | \ | ||
sudo tee /etc/apt/sources.list.d/openresty.list > /dev/null | ||
# Install dependencies | ||
sudo apt-get update | ||
sudo apt-get install --no-install-recommends openresty libvips-dev | ||
- name: Install LuaRocks | ||
env: | ||
LUAROCKS_VERSION: 3.9.2 | ||
run: | ||
.ci/install-luarocks.sh | ||
--with-lua=/usr/local/openresty/luajit/ | ||
--with-lua-include=/usr/local/openresty/luajit/include/luajit-2.1 | ||
|
||
- name: Prepare environment | ||
run: | | ||
echo "/usr/local/openresty/luajit/bin:$HOME/luarocks/bin" >> $GITHUB_PATH | ||
- name: Install Lua modules | ||
run: make dev | ||
|
||
- name: Lint with luacheck | ||
run: make lint | ||
|
||
- name: Test with busted | ||
run: make test | ||
|
||
CI-Linux-Lua-54: | ||
name: "Linux x64 with Lua 5.4" | ||
runs-on: ubuntu-22.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
luaVersion: ["5.1", "5.2", "5.3", "5.4", "luajit-2.1.0-beta3", "luajit-openresty"] | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install dependencies | ||
run: | | ||
sudo apt install lua5.4 liblua5.4-dev libvips-dev | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install LuaRocks | ||
env: | ||
LUAROCKS_VERSION: 3.9.2 | ||
run: | ||
.ci/install-luarocks.sh | ||
--with-lua=/usr/ | ||
--with-lua-include=/usr/include/lua5.4 | ||
- uses: leafo/gh-actions-lua@v9 | ||
with: | ||
luaVersion: ${{ matrix.luaVersion }} | ||
|
||
- name: Prepare environment | ||
run: | | ||
echo "/usr/bin:$HOME/luarocks/bin" >> $GITHUB_PATH | ||
- uses: leafo/gh-actions-luarocks@v4 | ||
|
||
- name: Install Lua modules | ||
run: make dev | ||
- name: Lua dependencies | ||
run: | | ||
luarocks install busted | ||
luarocks install luacheck | ||
luarocks install luacov-coveralls | ||
if [[ ${{ matrix.luaVersion }} == 5.* ]]; then luarocks install luaffi-tkl; fi | ||
- name: Install ffi | ||
run: make ffi | ||
- name: Install libvips | ||
run: | | ||
sudo apt install --no-install-recommends libvips-dev | ||
- name: Lint with luacheck | ||
run: make lint | ||
- name: build | ||
run: | | ||
luarocks make | ||
- name: Test with busted | ||
run: make test | ||
- name: Busted tests | ||
run: | | ||
busted --coverage | ||
luacheck . |