update workflow some more

This commit is contained in:
NoM0Re
2025-02-18 17:37:25 +01:00
parent 494665355f
commit a833fde276
2 changed files with 32 additions and 28 deletions
+16 -14
View File
@@ -21,7 +21,7 @@ jobs:
uses: actions/cache@v3 uses: actions/cache@v3
id: luacache id: luacache
with: with:
path: ~/.lua path: .lua
key: ${{ runner.os }}-lua-${{ env.LUA_VERSION }} key: ${{ runner.os }}-lua-${{ env.LUA_VERSION }}
restore-keys: | restore-keys: |
${{ runner.os }}-lua-${{ env.LUA_VERSION }} ${{ runner.os }}-lua-${{ env.LUA_VERSION }}
@@ -30,7 +30,7 @@ jobs:
uses: actions/cache@v3 uses: actions/cache@v3
id: luarockscache id: luarockscache
with: with:
path: ~/.luarocks path: .luarocks
key: ${{ runner.os }}-luarocks-${{ env.LUAROCKS_VERSION }} key: ${{ runner.os }}-luarocks-${{ env.LUAROCKS_VERSION }}
restore-keys: | restore-keys: |
${{ runner.os }}-luarocks-${{ env.LUAROCKS_VERSION }} ${{ runner.os }}-luarocks-${{ env.LUAROCKS_VERSION }}
@@ -38,23 +38,25 @@ jobs:
- name: Install Lua - name: Install Lua
if: steps.luacache.outputs.cache-hit != 'true' if: steps.luacache.outputs.cache-hit != 'true'
run: | run: |
sudo apt-get update sudo apt-get install libreadline-dev libncurses-dev
sudo apt-get install -y lua5.1 liblua5.1-0-dev wget https://www.lua.org/ftp/lua-${{ env.LUA_VERSION }}.tar.gz -O - | tar -xzf -
mkdir -p ~/.lua/bin cd lua-${{ env.LUA_VERSION }}
ln -s /usr/bin/lua5.1 ~/.lua/bin/lua make linux
make -j INSTALL_TOP=$GITHUB_WORKSPACE/.lua install
rm -rf $GITHUB_WORKSPACE/lua-${{ env.LUA_VERSION }}
- name: Install LuaRocks and Luacheck - name: Install LuaRocks and Luacheck
if: steps.luarockscache.outputs.cache-hit != 'true' if: steps.luarockscache.outputs.cache-hit != 'true'
run: | run: |
wget https://luarocks.org/releases/luarocks-${{ env.LUAROCKS_VERSION }}.tar.gz wget https://luarocks.org/releases/luarocks-${{ env.LUAROCKS_VERSION }}.tar.gz -O - | tar -xzf -
tar -xzf luarocks-${{ env.LUAROCKS_VERSION }}.tar.gz
cd luarocks-${{ env.LUAROCKS_VERSION }} cd luarocks-${{ env.LUAROCKS_VERSION }}
./configure --prefix=$HOME/.luarocks --with-lua-include=/usr/include/lua5.1 ./configure --with-lua-bin=$GITHUB_WORKSPACE/.lua/bin --prefix=$GITHUB_WORKSPACE/.luarocks
make make build
make install make install
echo "export PATH=\$HOME/.luarocks/bin:\$PATH" >> ~/.bashrc PATH=$PATH:$GITHUB_WORKSPACE/.luarocks/bin
source ~/.bashrc
luarocks install luacheck luarocks install luacheck
luarocks install lanes
rm -rf $GITHUB_WORKSPACE/luarocks-${{ env.LUAROCKS_VERSION }}
- name: Run Luacheck - name: Luacheck
run: ~/.luarocks/bin/luacheck . -q run: .luarocks/bin/luacheck . -q
+16 -14
View File
@@ -22,7 +22,7 @@ jobs:
uses: actions/cache@v3 uses: actions/cache@v3
id: luacache id: luacache
with: with:
path: ~/.lua path: .lua
key: ${{ runner.os }}-lua-${{ env.LUA_VERSION }} key: ${{ runner.os }}-lua-${{ env.LUA_VERSION }}
restore-keys: | restore-keys: |
${{ runner.os }}-lua-${{ env.LUA_VERSION }} ${{ runner.os }}-lua-${{ env.LUA_VERSION }}
@@ -31,7 +31,7 @@ jobs:
uses: actions/cache@v3 uses: actions/cache@v3
id: luarockscache id: luarockscache
with: with:
path: ~/.luarocks path: .luarocks
key: ${{ runner.os }}-luarocks-${{ env.LUAROCKS_VERSION }} key: ${{ runner.os }}-luarocks-${{ env.LUAROCKS_VERSION }}
restore-keys: | restore-keys: |
${{ runner.os }}-luarocks-${{ env.LUAROCKS_VERSION }} ${{ runner.os }}-luarocks-${{ env.LUAROCKS_VERSION }}
@@ -39,23 +39,25 @@ jobs:
- name: Install Lua - name: Install Lua
if: steps.luacache.outputs.cache-hit != 'true' if: steps.luacache.outputs.cache-hit != 'true'
run: | run: |
sudo apt-get update sudo apt-get install libreadline-dev libncurses-dev
sudo apt-get install -y lua5.1 liblua5.1-0-dev wget https://www.lua.org/ftp/lua-${{ env.LUA_VERSION }}.tar.gz -O - | tar -xzf -
mkdir -p ~/.lua/bin cd lua-${{ env.LUA_VERSION }}
ln -s /usr/bin/lua5.1 ~/.lua/bin/lua make linux
make -j INSTALL_TOP=$GITHUB_WORKSPACE/.lua install
rm -rf $GITHUB_WORKSPACE/lua-${{ env.LUA_VERSION }}
- name: Install LuaRocks and Luacheck - name: Install LuaRocks and Luacheck
if: steps.luarockscache.outputs.cache-hit != 'true' if: steps.luarockscache.outputs.cache-hit != 'true'
run: | run: |
wget https://luarocks.org/releases/luarocks-${{ env.LUAROCKS_VERSION }}.tar.gz wget https://luarocks.org/releases/luarocks-${{ env.LUAROCKS_VERSION }}.tar.gz -O - | tar -xzf -
tar -xzf luarocks-${{ env.LUAROCKS_VERSION }}.tar.gz
cd luarocks-${{ env.LUAROCKS_VERSION }} cd luarocks-${{ env.LUAROCKS_VERSION }}
./configure --prefix=$HOME/.luarocks --with-lua-include=/usr/include/lua5.1 ./configure --with-lua-bin=$GITHUB_WORKSPACE/.lua/bin --prefix=$GITHUB_WORKSPACE/.luarocks
make make build
make install make install
echo "export PATH=\$HOME/.luarocks/bin:\$PATH" >> ~/.bashrc PATH=$PATH:$GITHUB_WORKSPACE/.luarocks/bin
source ~/.bashrc
luarocks install luacheck luarocks install luacheck
luarocks install lanes
rm -rf $GITHUB_WORKSPACE/luarocks-${{ env.LUAROCKS_VERSION }}
- name: Run Luacheck - name: Luacheck
run: ~/.luarocks/bin/luacheck . -q run: .luarocks/bin/luacheck . -q