File tree 1 file changed +22
-5
lines changed
1 file changed +22
-5
lines changed Original file line number Diff line number Diff line change @@ -10,18 +10,35 @@ jobs:
10
10
steps :
11
11
- name : Checkout
12
12
uses : actions/checkout@v3
13
- - name : Install Lua 5.1
14
- uses :
leafo/gh- actions[email protected]
13
+ - name : Download LuaJIT
14
+ uses : actions/checkout@v3
15
15
with :
16
- luaVersion : " 5.1.5"
16
+ repository : LuaJIT/LuaJIT
17
+ ref : v2.1
18
+ path : LuaJIT
19
+ - name : Compile universal LuaJIT
20
+ working-directory : ./LuaJIT
21
+ run : |
22
+ TARGET_FLAGS="-arch x86_64" make
23
+ cp ./src/libluajit.so ./src/libluajit_x64.dylib
24
+ cp ./src/luajit ./src/luajit_x64
25
+
26
+ make clean
27
+
28
+ TARGET_FLAGS="-arch arm64" make
29
+ cp ./src/libluajit.so ./src/libluajit_arm.dylib
30
+ cp ./src/luajit ./src/luajit_arm
31
+
32
+ lipo -create -output ./src/libluajit.dylib ./src/libluajit_x64.dylib ./src/libluajit_arm.dylib
33
+ lipo -create -output ./src/luajit ./src/luajit_x64 ./src/luajit_arm
17
34
- name : Configure
18
- run : cmake -Bbuild -S. -G Xcode -DLUA_INCLUDE_DIR=$PWD/.lua/include -DLUA_LIBRARIES=$PWD/.lua/lib/liblua.a
35
+ run : cmake -Bbuild -S. -G Xcode -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" - DLUA_INCLUDE_DIR=$PWD/LuaJIT/src -DLUA_LIBRARIES=$PWD/LuaJIT/src/lua
19
36
- name : Build
20
37
working-directory : build
21
38
run : xcodebuild -configuration Release -scheme https
22
39
- name : Test
23
40
working-directory : ./build/src/Release
24
- run : lua -l "https" ../../../example/test.lua
41
+ run : ../../../LuaJIT/src/luajit -l "https" ../../../example/test.lua
25
42
- name : Artifact
26
43
if : always()
27
44
uses : actions/upload-artifact@v3
You can’t perform that action at this time.
0 commit comments