Add iOS build to CI
This commit is contained in:
parent
38fa7d7cf6
commit
bb674c0c3b
2 changed files with 36 additions and 22 deletions
12
.github/workflows/ci.yml
vendored
12
.github/workflows/ci.yml
vendored
|
@ -597,3 +597,15 @@ jobs:
|
|||
run: |
|
||||
$ANDROID_HOME/cmake/3.22.1/bin/cmake --build build --target qjs
|
||||
ls -lh build
|
||||
|
||||
ios:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: configure
|
||||
run: |
|
||||
cmake -B build -GXcode -DCMAKE_SYSTEM_NAME:STRING=iOS -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED:BOOL=NO -DBUILD_QJS_LIBC=ON
|
||||
- name: build
|
||||
run: |
|
||||
cmake --build build --config Release --target qjs
|
||||
ls -lh build
|
||||
|
|
|
@ -27,7 +27,7 @@ macro(xcheck_add_c_compiler_flag FLAG)
|
|||
endmacro()
|
||||
|
||||
xcheck_add_c_compiler_flag(-Wall)
|
||||
if(NOT MSVC)
|
||||
if(NOT MSVC AND NOT IOS)
|
||||
xcheck_add_c_compiler_flag(-Werror)
|
||||
xcheck_add_c_compiler_flag(-Wextra)
|
||||
endif()
|
||||
|
@ -328,6 +328,7 @@ endif()
|
|||
# Install target
|
||||
#
|
||||
|
||||
if(NOT IOS)
|
||||
file(STRINGS quickjs.h quickjs_h REGEX QJS_VERSION)
|
||||
string(REGEX MATCHALL "([0-9])" QJS_VERSION "${quickjs_h}")
|
||||
list(GET QJS_VERSION 0 QJS_VERSION_MAJOR)
|
||||
|
@ -349,3 +350,4 @@ install(TARGETS qjs EXPORT qjsConfig
|
|||
install(EXPORT qjsConfig DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/quickjs)
|
||||
install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_DOCDIR})
|
||||
install(DIRECTORY examples DESTINATION ${CMAKE_INSTALL_DOCDIR})
|
||||
endif()
|
||||
|
|
Loading…
Reference in a new issue