-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Since we have custom Lua & Luarocks now, we can't use the leafo actions.
- Loading branch information
Showing
1 changed file
with
43 additions
and
13 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -7,8 +7,6 @@ | |
# Useful reference: | ||
# - https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions | ||
# - https://github.com/actions/checkout | ||
# - https://github.com/leafo/gh-actions-lua | ||
# - https://github.com/leafo/gh-actions-luarocks | ||
|
||
name: Github Actions CI | ||
|
||
|
@@ -24,36 +22,68 @@ on: | |
pull_request: | ||
branches: [ master ] | ||
|
||
env: | ||
LUA_VERSION: 5.4.4 | ||
LUAROCKS_VERSION: 3.9.0 | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: leafo/[email protected] | ||
- uses: leafo/[email protected] | ||
|
||
- name: Install Lua | ||
run: | | ||
wget -O - https://github.com/pallene-lang/lua-internals/archive/refs/tags/${{env.LUA_VERSION}}.tar.gz | tar xzf - | ||
cd lua-internals-${{env.LUA_VERSION}} | ||
make linux | ||
sudo make install | ||
- name: Install Luarocks | ||
run: | | ||
wget -O - https://luarocks.org/releases/luarocks-${{env.LUAROCKS_VERSION}}.tar.gz | tar xzf - | ||
cd luarocks-${{env.LUAROCKS_VERSION}} | ||
./configure --with-lua=/usr/local | ||
make | ||
sudo make install | ||
- name: Install Luacheck | ||
run: luarocks install luacheck | ||
run: luarocks install --local luacheck | ||
|
||
- name: Run Luacheck | ||
run: ./run-lint | ||
run: | | ||
eval "$(luarocks path)" | ||
./run-lint | ||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: leafo/[email protected] | ||
- uses: leafo/[email protected] | ||
|
||
- name: Build | ||
- name: Install Lua | ||
run: | | ||
wget -O - https://github.com/pallene-lang/lua-internals/archive/refs/tags/${{env.LUA_VERSION}}.tar.gz | tar xzf - | ||
cd lua-internals-${{env.LUA_VERSION}} | ||
make linux | ||
sudo make install | ||
- name: Install Luarocks | ||
run: | | ||
luarocks make | ||
(cd vm && make linux) | ||
wget -O - https://luarocks.org/releases/luarocks-${{env.LUAROCKS_VERSION}}.tar.gz | tar xzf - | ||
cd luarocks-${{env.LUAROCKS_VERSION}} | ||
./configure --with-lua=/usr/local | ||
make | ||
sudo make install | ||
- name: Build | ||
run: luarocks --local make | ||
|
||
- name: Install Busted | ||
run: luarocks install busted | ||
run: luarocks --local install busted | ||
|
||
- name: Run Tests | ||
run: busted -o gtest -v ./spec | ||
run: | | ||
eval "$(luarocks path)" | ||
busted -o gtest -v ./spec |