Skip to content

Commit

Permalink
update lua
Browse files Browse the repository at this point in the history
  • Loading branch information
waruqi committed Nov 21, 2024
1 parent e9382cf commit 9b24945
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 9 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
luaVersion: ["5.4.1", "5.1.5", "luajit-2.1.0-beta3"]
luaVersion: ["5.4.1", "5.1.5", "luajit-openresty"]
luarocksVersion: ["3.5.0", "3.0.1"]
runs-on: ${{ matrix.os }}

concurrency:
group: ${{ github.ref }}-${{ github.base_ref }}-${{ github.head_ref }}-Linux-${{ matrix.luaVersion }}-${{ matrix.luarocksVersion }}
cancel-in-progress: true

steps:
- uses: actions/checkout@v2
- uses: leafo/gh-actions-lua@v8
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@ jobs:
strategy:
matrix:
os: [macos-latest]
luaVersion: ["5.4.1", "5.1.5", "luajit-2.1.0-beta3"]
luaVersion: ["5.4.1", "5.1.5", "luajit-openresty"]
luarocksVersion: ["3.5.0", "3.0.1"]
runs-on: ${{ matrix.os }}

concurrency:
group: ${{ github.ref }}-${{ github.base_ref }}-${{ github.head_ref }}-MacOS-${{ matrix.luaVersion }}-${{ matrix.luarocksVersion }}
cancel-in-progress: true

steps:
- uses: actions/checkout@v2
- uses: leafo/gh-actions-lua@v8
Expand Down
19 changes: 12 additions & 7 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,14 @@ jobs:
luaVersion: ["5.4.1"]
runs-on: ${{ matrix.os }}

concurrency:
group: ${{ github.ref }}-${{ github.base_ref }}-${{ github.head_ref }}-Windows-${{ matrix.luaVersion }}
cancel-in-progress: true

steps:
- uses: actions/checkout@v2
- uses: leafo/gh-actions-lua@v8
- uses: ilammy/msvc-dev-cmd@v1
- uses: leafo/gh-actions-lua@v10
with:
luaVersion: ${{ matrix.luaVersion }}

Expand All @@ -37,16 +42,16 @@ jobs:
Invoke-WebRequest "https://luarocks.github.io/luarocks/releases/luarocks-3.11.1-windows-64.zip" -UseBasicParsing -OutFile ./luarocks.zip
Expand-Archive ./luarocks.zip -DestinationPath ./luarocks
Push-Location ./luarocks/luarocks-3.11.1-windows-64
./luarocks.exe install --local --verbose ../rockspecs/example1-1.0-1.rockspec
./luarocks.exe install --local --verbose ../../rockspecs/example1-1.0-1.rockspec
xmake l os.files "C:/Users/runneradmin/AppData/Roaming/luarocks/**"
#$Env:LUA_PATH = $(Resolve-Path C:/Users/runneradmin/AppData/Roaming/luarocks/share/lua/5.3/example1/test.lua)
#$Env:LUA_PATH = $(Resolve-Path C:/Users/runneradmin/AppData/Roaming/luarocks/share/lua/5.4/example1/test.lua)
#./bin/lua -e "print(require('example1.test'))"
$Env:LUA_CPATH = $(Resolve-Path C:/Users/runneradmin/AppData/Roaming/luarocks/lib/lua/5.3/example1/hello.dll)
$Env:LUA_CPATH = $(Resolve-Path C:/Users/runneradmin/AppData/Roaming/luarocks/lib/lua/5.4/example1/hello.dll)
lua -e "print(require('example1.hello'))"
./luarocks install --local ../rockspecs/example2-1.0-1.rockspec
./luarocks install --local ../../rockspecs/example2-1.0-1.rockspec
xmake l os.files "C:/Users/runneradmin/AppData/Roaming/luarocks/**"
#$Env:LUA_PATH = $(Resolve-Path C:/Users/runneradmin/AppData/Roaming/luarocks/share/lua/5.3/example2/test.lua)
#$Env:LUA_PATH = $(Resolve-Path C:/Users/runneradmin/AppData/Roaming/luarocks/share/lua/5.4/example2/test.lua)
#./bin/lua -e "print(require('example2.test'))"
$Env:LUA_CPATH = $(Resolve-Path C:/Users/runneradmin/AppData/Roaming/luarocks/lib/lua/5.3/example2/hello.dll)
$Env:LUA_CPATH = $(Resolve-Path C:/Users/runneradmin/AppData/Roaming/luarocks/lib/lua/5.4/example2/hello.dll)
lua -e "print(require('example2.hello'))"

0 comments on commit 9b24945

Please sign in to comment.