Skip to content

update lua

update lua #229

Workflow file for this run

name: Windows
on:
pull_request:
push:
release:
types: [published]
jobs:
build:
strategy:
matrix:
os: [windows-latest]
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: ilammy/msvc-dev-cmd@v1
- uses: leafo/gh-actions-lua@v10
with:
luaVersion: ${{ matrix.luaVersion }}
- uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: branch@dev
- name: Tests
run: |
git clone https://github.com/xmake-io/xmake.git --recurse-submodules -b dev xmakesrc
cd xmakesrc/core
xmake
cd ../..
Copy-Item ./xmakesrc/core/build/xmake.exe ./xmakesrc/xmake
$Env:XMAKE_PROGRAM_DIR = $(Resolve-Path ./xmakesrc/xmake)
Set-Item -Path Env:Path -Value ($Env:XMAKE_PROGRAM_DIR + ";" + $Env:Path)
xmake --version
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
xmake l os.files "C:/Users/runneradmin/AppData/Roaming/luarocks/**"
#$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.4/example1/hello.dll)
lua -e "print(require('example1.hello'))"
./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.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.4/example2/hello.dll)
lua -e "print(require('example2.hello'))"