| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Note: You must use version 8 or greater as GitHub has deprecated older versions of the actions core libraries.
Builds and installs Lua into the .lua/ directory in the working directory. Adds the .lua/bin to the PATH environment variable so lua can be called directly in workflows.
Other Lua GitHub actions:
Install Lua: (Will typically default to the latest release, 5.5.0 as of this readme)
- uses: leafo/gh-actions-lua@v13Install specific version of Lua:
- uses: leafo/gh-actions-lua@v13
with:
luaVersion: "5.1.5"Install specific version of LuaJIT:
- uses: leafo/gh-actions-lua@v13
with:
luaVersion: "luajit-2.1"When using Windows the following prerequisite action must be run before building Lua: step-security/msvc-dev-cmd@v1. It is safe to include this line on non-Windows platforms, as the action will do nothing in those cases.
- uses: step-security/msvc-dev-cmd@v1
- uses: leafo/gh-actions-lua@v13Default: "5.5"
Specifies the version of Lua to install. The version name instructs the action where to download the source from.
Examples of versions:
The version specifies where the source is downloaded from:
Version aliases
You can use shorthand 5.1, 5.2, 5.3, 5.4, 5.5, luajit version aliases to point to the latest (or recent) version of Lua for that version.
Default: ""
Additional flags to pass to make when building Lua.
Example value:
- uses: leafo/gh-actions-lua@master
with:
luaVersion: 5.3
luaCompileFlags: LUA_CFLAGS="-DLUA_INT_TYPE=LUA_INT_INT"Note that compile flags may work differently across Lua and LuaJIT.
This example is for running tests on a Lua module that uses LuaRocks for dependencies and busted for a test suite.
Create .github/workflows/test.yml in your repository:
name: test
on: [push]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: leafo/gh-actions-lua@v13
with:
luaVersion: "5.1.5"
- uses: leafo/gh-actions-luarocks@v6
- name: build
run: |
luarocks install busted
luarocks make
- name: test
run: |
busted -o utfTerminalThis example:
View the documentation for the individual actions (linked above) to learn more about how they work.
You can test against multiple versions of Lua using a matrix strategy:
jobs:
test:
strategy:
matrix:
luaVersion: ["5.1.5", "5.2.4", "luajit-2.1"]
steps:
- uses: actions/checkout@v7
- uses: leafo/gh-actions-lua@v13
with:
luaVersion: ${{ matrix.luaVersion }}
# ...| Back | FazBrowse Home | New Git URL |