Skip to content

Commit

Permalink
update ci
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaozg committed Feb 24, 2024
1 parent 7bd05b6 commit 2b70498
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
UBSAN_OPTIONS: print_stacktrace=1
BUILD_TYPE: Debug
WITH_LUA_ENGINE: Lua
LUABIN: build/lua
CC: clang
CXX: clang++
steps:
Expand All @@ -40,6 +41,7 @@ jobs:
env:
BUILD_TYPE: Debug
WITH_LUA_ENGINE: Lua
LUABIN: build/lua
CC: clang
CXX: clang++
steps:
Expand Down Expand Up @@ -76,6 +78,7 @@ jobs:
runs-on: ubuntu-latest
env:
WITH_LUA_ENGINE: Lua
LUABIN: build/lua
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -87,6 +90,7 @@ jobs:
env:
WITH_LUA_ENGINE: Lua
WITH_SHARED_LIBUV: On
LUABIN: build/lua
steps:
- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -116,6 +120,7 @@ jobs:
LUAROCKS: ${{ matrix.luarocks_version }}
LUA: ${{ matrix.lua_version }}
WITH_LUA_ENGINE: ${{ matrix.lua_engine }}
LUABIN: build/lua

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ BUILD_DIR ?= build
# options: Release, Debug, RelWithDebInfo, MinSizeRel
BUILD_TYPE ?= RelWithDebInfo

ifeq ($(LUABIN),)
ifeq ($(WITH_LUA_ENGINE), LuaJIT)
LUABIN=luajit
else
LUABIN=lua
endif
endif

CMAKE_OPTIONS += \
-DBUILD_MODULE=$(BUILD_MODULE) \
Expand Down
7 changes: 4 additions & 3 deletions deps/luajit.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -385,17 +385,18 @@ ELSE()
SET_TARGET_PROPERTIES(luajit PROPERTIES ENABLE_EXPORTS ON)
ENDIF()

add_library(luajit-header INTERFACE)
target_include_directories(luajit-header INTERFACE ${includeDir})

set(luajit_headers
${LUAJIT_DIR}/src/lauxlib.h
${LUAJIT_DIR}/src/lua.h
${LUAJIT_DIR}/src/luaconf.h
${LUAJIT_DIR}/src/lualib.h
${LUAJIT_DIR}/src/luajit.h)

set(includeDir ${CMAKE_CURRENT_BINARY_DIR}/include)
file(COPY ${luajit_headers} DESTINATION ${includeDir})
add_library(luajit-header INTERFACE)
target_include_directories(luajit-header INTERFACE ${includeDir})

add_library(luajit::lib ALIAS luajit-5.1)
add_library(luajit::header ALIAS luajit-header)
add_executable(luajit:lua ALIAS luajit)
Expand Down

0 comments on commit 2b70498

Please sign in to comment.