diff --git a/.github/workflows/build-android.yml b/.github/workflows/build-android.yml index 9dd3a354..97b1690d 100644 --- a/.github/workflows/build-android.yml +++ b/.github/workflows/build-android.yml @@ -15,13 +15,20 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 30 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - uses: actions/setup-java@v4 with: distribution: temurin java-version: '17' + - name: Install NDK + run: echo "y" | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager "ndk;${{ env.NDK_VERSION }}" + + - name: Build JS test bundle + working-directory: Tests + run: npm install + - name: Enable KVM run: | echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules @@ -34,13 +41,8 @@ jobs: api-level: 33 target: google_apis arch: x86_64 - script: | - cd Tests/UnitTests/Android - chmod +x gradlew - ./gradlew connectedAndroidTest \ - -PabiFilters=x86_64 \ - -PjsEngine=${{ inputs['js-engine'] }} \ - -PndkVersion=${{ env.NDK_VERSION }} + emulator-options: -no-snapshot -no-window -no-boot-anim -no-audio + script: chmod +x Tests/UnitTests/Android/gradlew && Tests/UnitTests/Android/gradlew -p Tests/UnitTests/Android connectedAndroidTest -PabiFilters=x86_64 -PjsEngine=${{ inputs.js-engine }} -PndkVersion=${{ env.NDK_VERSION }} - name: Dump Test Results if: always() @@ -55,6 +57,6 @@ jobs: if: always() uses: actions/upload-artifact@v4 with: - name: AndroidTestResults_${{ inputs['js-engine'] }} + name: AndroidTestResults_${{ inputs.js-engine }} path: Tests/UnitTests/Android/app/build/outputs/androidTest-results/connected if-no-files-found: ignore diff --git a/.github/workflows/build-ios.yml b/.github/workflows/build-ios.yml index 76df92d1..bb197722 100644 --- a/.github/workflows/build-ios.yml +++ b/.github/workflows/build-ios.yml @@ -19,7 +19,7 @@ jobs: runs-on: ${{ inputs.runs-on }} timeout-minutes: 30 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Select Xcode ${{ inputs.xcode-version }} run: sudo xcode-select --switch /Applications/Xcode_${{ inputs.xcode-version }}.app/Contents/Developer diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml index f8433225..49cd44a4 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux.yml @@ -28,7 +28,7 @@ jobs: CC: ${{ inputs.cc }} CXX: ${{ inputs.cxx }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Install packages run: | diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index fe5879db..24a6af91 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -24,7 +24,7 @@ jobs: runs-on: ${{ inputs.runs-on }} timeout-minutes: 15 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Select Xcode ${{ inputs.xcode-version }} run: sudo xcode-select --switch /Applications/Xcode_${{ inputs.xcode-version }}.app/Contents/Developer diff --git a/.github/workflows/build-uwp.yml b/.github/workflows/build-uwp.yml index cc534947..c07157a2 100644 --- a/.github/workflows/build-uwp.yml +++ b/.github/workflows/build-uwp.yml @@ -15,7 +15,7 @@ jobs: runs-on: windows-latest timeout-minutes: 15 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Configure CMake run: > diff --git a/.github/workflows/build-win32.yml b/.github/workflows/build-win32.yml index d3bc0363..4fa03e85 100644 --- a/.github/workflows/build-win32.yml +++ b/.github/workflows/build-win32.yml @@ -15,7 +15,7 @@ jobs: runs-on: windows-latest timeout-minutes: 15 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Configure CMake run: cmake -B Build/Win32 -A ${{ inputs.platform }} -D NAPI_JAVASCRIPT_ENGINE=${{ inputs.js-engine }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7355d66d..752cda09 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -58,16 +58,15 @@ jobs: js-engine: V8 # ── Android ─────────────────────────────────────────────────── - # TODO: Re-enable when Android emulator works reliably on GitHub Actions runners. - # Android_JSC: - # uses: ./.github/workflows/build-android.yml - # with: - # js-engine: JavaScriptCore - - # Android_V8: - # uses: ./.github/workflows/build-android.yml - # with: - # js-engine: V8 + Android_JSC: + uses: ./.github/workflows/build-android.yml + with: + js-engine: JavaScriptCore + + Android_V8: + uses: ./.github/workflows/build-android.yml + with: + js-engine: V8 # ── macOS ───────────────────────────────────────────────────── macOS_Xcode164: diff --git a/CMakeLists.txt b/CMakeLists.txt index 782efa22..f0335704 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,7 @@ include(FetchContent) # -------------------------------------------------- FetchContent_Declare(AndroidExtensions GIT_REPOSITORY https://github.com/BabylonJS/AndroidExtensions.git - GIT_TAG 2e85a8d43b89246c460112c9e5546ad54b6e87b4 + GIT_TAG 5fe60c8634dd9a5df76888e73e69202875e894f0 EXCLUDE_FROM_ALL) FetchContent_Declare(arcana.cpp GIT_REPOSITORY https://github.com/microsoft/arcana.cpp.git diff --git a/Tests/UnitTests/Android/app/src/main/cpp/JNI.cpp b/Tests/UnitTests/Android/app/src/main/cpp/JNI.cpp index fe243eb5..4415ce87 100644 --- a/Tests/UnitTests/Android/app/src/main/cpp/JNI.cpp +++ b/Tests/UnitTests/Android/app/src/main/cpp/JNI.cpp @@ -1,5 +1,5 @@ #include -#include +#include #include #include #include diff --git a/Tests/UnitTests/Scripts/tests.ts b/Tests/UnitTests/Scripts/tests.ts index 5728d4fa..764c838b 100644 --- a/Tests/UnitTests/Scripts/tests.ts +++ b/Tests/UnitTests/Scripts/tests.ts @@ -449,6 +449,7 @@ if (hostPlatform !== "Unix") { }); it("should connect correctly with multiple websocket connections", function (done) { + this.timeout(10000); const testMessage1 = "testMessage1"; const testMessage2 = "testMessage2"; let error: unknown;