diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f6f786781..4526531e1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,6 +3,29 @@ name: Build J2V8 on: [push] jobs: + j2v8_macos: + name: Build J2V8 for macOS + runs-on: macos-latest + + steps: + - name: Checkout + uses: actions/checkout@v1 + + - name: Download monolithic libraries and extract to v8.out directory + run: | + curl -O https://download.eclipsesource.com/j2v8/v8/libv8_7.4.288_monolith.zip + mkdir -p v8.out + unzip libv8_7.4.288_monolith.zip -d v8.out + + # start j2v8 build + python build.py -t macos -a x64 j2v8cmake j2v8jni j2v8cpp j2v8optimize j2v8java j2v8test + + - name: Archive J2V8 macOS x86_64 jar + uses: actions/upload-artifact@v1.0.0 + with: + name: j2v8-macos-x86_64 + path: build.out/j2v8_macos_x86_64-6.0.0.jar + generate_j2v8_archives: name: Create J2V8 Linux jar and Android aar archive files runs-on: ubuntu-latest diff --git a/build_system/config_macos.py b/build_system/config_macos.py index fb33f86fd..081beb995 100644 --- a/build_system/config_macos.py +++ b/build_system/config_macos.py @@ -43,6 +43,7 @@ def build_node_js(config): #----------------------------------------------------------------------- def build_j2v8_cmake(config): cmake_vars = cmu.setAllVars(config) + V8_monolith_library_dir = config.platform + "." + config.arch # NOTE: uses Python string interpolation (see: https://stackoverflow.com/a/4450610) return \ @@ -50,10 +51,11 @@ def build_j2v8_cmake(config): ["cd " + u.cmake_out_dir] + \ u.rm("CMakeCache.txt CMakeFiles/") + \ ["""cmake \ + -DJ2V8_MONOLITH_LIB_DIR={0} \ -DCMAKE_BUILD_TYPE=Release \ %(cmake_vars)s \ ../../ \ - """ + """.format(V8_monolith_library_dir) % locals()] macos_config.build_step(c.build_j2v8_cmake, build_j2v8_cmake)