Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: actions/upload-artifact, gradle low heapmem, msvc sdk not found for release action #267

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ jobs:
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 }}
name: ${{ env.PROJECT_NAME }}-Server-${{ matrix.config }}-${{ matrix.platform }}
path: ${{ env.SOLUTION_DIR }}\${{ matrix.config }}\${{ matrix.platform }}

Build_APK:
name: Build Android APK
Expand Down Expand Up @@ -201,35 +201,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/
Expand Down Expand Up @@ -451,7 +451,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
Expand Down
36 changes: 26 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
with:
vs-version: '17'

- name: Restore NuGet packages
working-directory: ${{env.GITHUB_WORKSPACE}}
Expand All @@ -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 }}
Expand Down Expand Up @@ -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/
Expand Down
2 changes: 1 addition & 1 deletion code/mobile/android/PhoneVR/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ dependencies {

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'
Expand Down
2 changes: 1 addition & 1 deletion code/mobile/android/PhoneVR/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading