diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0850d615..06800f76 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -36,7 +36,11 @@ jobs: fail-fast: false matrix: config: [Release, Debug] - platform: [x64, x86] + platform: + - name: x64 + msvc-platform-name: x64 + - name: x86 + msvc-platform-name: Win32 runs-on: windows-latest steps: @@ -83,7 +87,7 @@ jobs: with: vs-version: '17' - - name: Building ${{matrix.platform}}-${{matrix.config}} + - name: Building ${{matrix.platform.name}}-${{matrix.config}} working-directory: ${{env.GITHUB_WORKSPACE}} # Add additional options to the MSBuild command line here (like platform or verbosity level). # See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference @@ -94,13 +98,13 @@ jobs: env - msbuild /m /p:Configuration=${{matrix.config}} /p:Platform=${{matrix.platform}} ${{env.SOLUTION_FILE_PATH}} + msbuild /m /p:Configuration=${{matrix.config}} /p:Platform=${{matrix.platform.name}} ${{env.SOLUTION_FILE_PATH}} - name: Upload Build outputs - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: - name: ${{ env.PROJECT_NAME }}-Server-${{ matrix.config }} - path: ${{ env.SOLUTION_DIR }}\${{ matrix.config }} + name: ${{ env.PROJECT_NAME }}-Server-${{ matrix.config }}-${{ matrix.platform.name }} + path: ${{ env.SOLUTION_DIR }}\${{ matrix.config }}\${{ matrix.platform.msvc-platform-name }} Build_APK: name: Build Android APK @@ -201,35 +205,35 @@ jobs: # Upload Artifact Build # Noted For Output [MAIN_PROJECT_MODULE]/build/outputs/apk/gvr/debug/ - name: Upload APK Debug - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: - name: ${{ env.PROJECT_NAME }}-debug-${{ steps.vars.outputs.sha_short }}-${{ env.date_today }} APK + name: ${{ env.PROJECT_NAME }}-debug-${{ steps.vars.outputs.sha_short }}-${{ env.date_today }}-gvr-debug APK path: ${{env.GRADLE_DIR}}/${{ env.MAIN_PROJECT_MODULE }}/build/outputs/apk/gvr/debug/ # Noted For Output [MAIN_PROJECT_MODULE]/build/outputs/apk/gvr/release/ - name: Upload APK Release - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: - name: ${{ env.PROJECT_NAME }}-${{ steps.vars.outputs.sha_short }}-${{ env.date_today }} APK + name: ${{ env.PROJECT_NAME }}-${{ steps.vars.outputs.sha_short }}-${{ env.date_today }}-gvr-release APK path: ${{env.GRADLE_DIR}}/${{ env.MAIN_PROJECT_MODULE }}/build/outputs/apk/gvr/release/ # Noted For Output [MAIN_PROJECT_MODULE]/build/outputs/apk/noGvr/debug/ - name: Upload APK Debug - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: - name: ${{ env.PROJECT_NAME }}-debug-${{ steps.vars.outputs.sha_short }}-${{ env.date_today }} APK + name: ${{ env.PROJECT_NAME }}-debug-${{ steps.vars.outputs.sha_short }}-${{ env.date_today }}-nogvr-debug APK path: ${{env.GRADLE_DIR}}/${{ env.MAIN_PROJECT_MODULE }}/build/outputs/apk/noGvr/debug/ # Noted For Output [MAIN_PROJECT_MODULE]/build/outputs/apk/noGvr/release/ - name: Upload APK Release - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: - name: ${{ env.PROJECT_NAME }}-${{ steps.vars.outputs.sha_short }}-${{ env.date_today }} APK + name: ${{ env.PROJECT_NAME }}-${{ steps.vars.outputs.sha_short }}-${{ env.date_today }}-nogvr-release APK path: ${{env.GRADLE_DIR}}/${{ env.MAIN_PROJECT_MODULE }}/build/outputs/apk/noGvr/release/ - name: Upload Build outputs on failure if: failure() - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: build-files path: ${{ env.GRADLE_DIR }}/app/.cxx/ @@ -451,7 +455,7 @@ jobs: cat log.txt # build/outputs/connected_android_test_additional_output/gvrDebugAndroidTest/connected/GPlay_Pixel_2_API_30(AVD) - 11/ALVRActivityTest_saveDeviceScreenBitmap.png - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: always() with: name: Test results diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 482b25cf..f492aa44 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -98,19 +98,28 @@ jobs: run: make format-check # https://github.com/actions/runner-images/issues/842#issuecomment-1495115166 - - name: Install MSVC 2015 (v140) and Windows 8.1 SDK + - name: Install MSVC 2017 (v141) and Windows 8.1 SDK for MSVS2022 shell: powershell run: | + env + $VS_BTOOLS_EXE="vs_buildtools.exe" - $VS_BTOOLS_URI="https://aka.ms/vs/15/release/vs_buildtools.exe" + $VS_BTOOLS_URI="https://aka.ms/vs/17/release/vs_buildtools.exe" Invoke-WebRequest -Uri $VS_BTOOLS_URI -OutFile $VS_BTOOLS_EXE Start-Process -FilePath ./vs_BuildTools.exe -ArgumentList ` - "--add", "Microsoft.VisualStudio.Component.VC.140", ` - "--add", "Microsoft.VisualStudio.Component.Windows81SDK", ` - "--quiet", "--norestart", "--force", "--wait" -Wait -PassThru + "--add", "Microsoft.VisualStudio.Component.VC.v141.x86.x64", ` + "--quiet", "--norestart", "--force", "--wait" -Wait -PassThru -nonewwindow + + # 8.1 SDK is no longer available in latest github-runners and MSVS2022/2019 build tools + # have to download it manually like https://stackoverflow.com/a/77947878 + + Invoke-WebRequest -Uri https://go.microsoft.com/fwlink/p/?LinkId=323507 -OutFile sdk81setup.exe + Start-Process -FilePath ./sdk81setup.exe -ArgumentList "/features +", "/q", "/norestart" -Wait -PassThru -nonewwindow - name: Add MSBuild to PATH uses: microsoft/setup-msbuild@v2.0.0 + with: + vs-version: '17' - name: Restore NuGet packages working-directory: ${{env.GITHUB_WORKSPACE}} @@ -120,10 +129,17 @@ jobs: working-directory: ${{env.GITHUB_WORKSPACE}} # Add additional options to the MSBuild command line here (like platform or verbosity level). # See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference - run: msbuild /m /p:Configuration=${{matrix.config}} /p:Platform=${{matrix.platform}} ${{env.SOLUTION_FILE_PATH}} + run: | + env + + $env:VCTargetsPath="C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\" + + env + + msbuild /m /p:Configuration=${{matrix.config}} /p:Platform=${{matrix.platform}} ${{env.SOLUTION_FILE_PATH}} - name: Upload Build outputs - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: ${{ env.PROJECT_NAME }}-Server-${{ matrix.config }} path: ${{ env.SOLUTION_DIR }}\${{ matrix.config }} @@ -206,21 +222,21 @@ jobs: # Upload Artifact Build # Noted For Output eg. [MAIN_PROJECT_MODULE]/build/outputs/apk/gvr/debug/ - name: Upload Debug APKs - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: ${{ env.PROJECT_NAME }}-debug-${{ steps.vars.outputs.sha_short }}-${{ env.date_today }} APK path: ${{env.GRADLE_DIR}}/${{ env.MAIN_PROJECT_MODULE }}/build/outputs/apk/**/debug/ # Noted For Output eg. [MAIN_PROJECT_MODULE]/build/outputs/apk/gvr/release/ - name: Upload Release APKs - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: ${{ env.PROJECT_NAME }}-${{ steps.vars.outputs.sha_short }}-${{ env.date_today }} APK path: ${{env.GRADLE_DIR}}/${{ env.MAIN_PROJECT_MODULE }}/build/outputs/apk/**/release/ - name: Upload Build outputs on failure if: failure() - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: build-files path: ${{ env.GRADLE_DIR }}/app/.cxx/ diff --git a/code/mobile/android/PhoneVR/app/build.gradle b/code/mobile/android/PhoneVR/app/build.gradle index 3b239e8b..399bcf30 100644 --- a/code/mobile/android/PhoneVR/app/build.gradle +++ b/code/mobile/android/PhoneVR/app/build.gradle @@ -159,16 +159,15 @@ dependencies { implementation "androidx.tracing:tracing:1.1.0" testImplementation 'junit:junit:4.13.2' - testImplementation 'junit:junit:4.12' androidTestImplementation "androidx.test.ext:junit-ktx:$extJUnitVersion" androidTestImplementation "androidx.test.espresso:espresso-core:$espressoVersion" - androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0' + androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.3.0' androidTestImplementation "androidx.test:rules:$androidXTestVersion" androidTestUtil "androidx.test.services:test-services:$servicesVersion" gvrImplementation 'com.google.vr:sdk-base:1.200.0@aar' implementation 'com.google.cardboard.sdk:cardboard-sdk:1.17.0@aar' - implementation 'io.github.zxing-cpp:android:2.2.0-SNAPSHOT' + implementation 'io.github.zxing-cpp:android:2.3.0-SNAPSHOT' implementation 'com.google.protobuf:protobuf-javalite:3.19.4' implementation 'androidx.camera:camera-core:1.3.4' implementation 'androidx.camera:camera-view:1.3.4' diff --git a/code/mobile/android/PhoneVR/app/src/androidTest/java/viritualisres/phonevr/ALVRActivityTest.kt b/code/mobile/android/PhoneVR/app/src/androidTest/java/viritualisres/phonevr/ALVRActivityTest.kt index 5b8975b2..2f70f45e 100644 --- a/code/mobile/android/PhoneVR/app/src/androidTest/java/viritualisres/phonevr/ALVRActivityTest.kt +++ b/code/mobile/android/PhoneVR/app/src/androidTest/java/viritualisres/phonevr/ALVRActivityTest.kt @@ -6,7 +6,6 @@ import android.util.Log import androidx.test.core.app.takeScreenshot import androidx.test.core.graphics.writeToTestStorage import androidx.test.espresso.Espresso.onView -import androidx.test.espresso.NoMatchingViewException import androidx.test.espresso.action.ViewActions.click import androidx.test.espresso.action.ViewActions.pressBack import androidx.test.espresso.matcher.ViewMatchers.isRoot @@ -173,7 +172,8 @@ class ALVRActivityTest : PVRInstrumentationBase() { try { // Cardboard initial load asks to scan for QR onView(withText("SKIP")).perform(click()) - } catch (e: NoMatchingViewException) { + } catch (e: Exception) { + Log.d(TAG, "saveDeviceScreenBitmap: ${e.message} - 'SKIP' not found ${e.stackTrace}") // View is not in hierarchy - which is okay } @@ -190,7 +190,8 @@ class ALVRActivityTest : PVRInstrumentationBase() { // First time going into VR mode android shows an annoying "You are in fullscreen // dialog" onView(withText("Got it")).perform(click()) - } catch (e: NoMatchingViewException) { + } catch (e: Exception) { + Log.d(TAG, "saveDeviceScreenBitmap: ${e.message} - 'Got it' not found ${e.stackTrace}") // View is not in hierarchy - which is okay } takeScreenshot().writeToTestStorage("${javaClass.simpleName}_${nameRule.methodName}") diff --git a/code/mobile/android/PhoneVR/build.gradle b/code/mobile/android/PhoneVR/build.gradle index 3f710bfb..e0d02cf4 100644 --- a/code/mobile/android/PhoneVR/build.gradle +++ b/code/mobile/android/PhoneVR/build.gradle @@ -2,10 +2,10 @@ buildscript { ext.kotlin_version = '1.9.0' - ext.extJUnitVersion = "1.2.0-alpha01" - ext.espressoVersion = "3.6.0-alpha01" + ext.extJUnitVersion = "1.2.1" + ext.espressoVersion = "3.6.1" ext.servicesVersion = "1.5.0-alpha01" - ext.androidXTestVersion = '1.4.0' + ext.androidXTestVersion = '1.6.1' repositories { google() diff --git a/code/mobile/android/PhoneVR/gradle.properties b/code/mobile/android/PhoneVR/gradle.properties index efa05a11..f63d0f17 100644 --- a/code/mobile/android/PhoneVR/gradle.properties +++ b/code/mobile/android/PhoneVR/gradle.properties @@ -11,7 +11,7 @@ # The setting is particularly useful for tweaking memory settings. android.enableJetifier=false android.useAndroidX=true -org.gradle.jvmargs=-Xmx1536m +org.gradle.jvmargs=-Xmx3g # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit