mirror of
https://github.com/wgh136/flutter_qjs.git
synced 2025-09-27 13:27:24 +00:00
linux test
This commit is contained in:
23
.github/workflows/test.yml
vendored
Normal file
23
.github/workflows/test.yml
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
name: Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [macos-latest, ubuntu-latest, windows-latest]
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Flutter action
|
||||
uses: subosito/flutter-action@v1.1.1
|
||||
with:
|
||||
channel: "stable"
|
||||
flutter-version: "1.12.x"
|
||||
- run: flutter pub get
|
||||
- run: flutter test test/flutter_qjs_test.dart
|
@@ -81,6 +81,7 @@ add_custom_command(
|
||||
${FLUTTER_TOOL_ENVIRONMENT}
|
||||
"${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh"
|
||||
linux-x64 ${CMAKE_BUILD_TYPE}
|
||||
VERBATIM
|
||||
)
|
||||
add_custom_target(flutter_assemble DEPENDS
|
||||
"${FLUTTER_LIBRARY}"
|
||||
|
@@ -54,7 +54,7 @@ final DynamicLibrary qjsLib = Platform.environment['FLUTTER_TEST'] == 'true'
|
||||
? DynamicLibrary.open("test/build/Debug/ffiquickjs.dll")
|
||||
: Platform.isMacOS
|
||||
? DynamicLibrary.open("test/build/libffiquickjs.dylib")
|
||||
: DynamicLibrary.process())
|
||||
: DynamicLibrary.open("test/build/libffiquickjs.so"))
|
||||
: (Platform.isWindows
|
||||
? DynamicLibrary.open("flutter_qjs_plugin.dll")
|
||||
: Platform.isAndroid
|
||||
|
@@ -3,6 +3,10 @@ project(ffiquickjs LANGUAGES CXX)
|
||||
|
||||
include("${CMAKE_CURRENT_SOURCE_DIR}/../cxx/quickjs.cmake")
|
||||
|
||||
IF (CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
target_compile_options(quickjs PRIVATE "-fPIC")
|
||||
ENDIF ()
|
||||
|
||||
add_library(ffiquickjs SHARED ${CXX_LIB_DIR}/ffi.cpp)
|
||||
target_compile_features(ffiquickjs PUBLIC cxx_std_17)
|
||||
target_link_libraries(ffiquickjs PRIVATE quickjs)
|
Reference in New Issue
Block a user