chore: update to Unity 2022.3.51f1 #6091
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
paths-ignore: | |
- "**.md" | |
- "**.txt" | |
workflow_dispatch: # e.g. to manually trigger on foreign PRs | |
env: | |
LOWEST_SUPPORTED_UNITY_VERSION: 2019 | |
DOTNET_CLI_TELEMETRY_OPTOUT: 1 | |
DOTNET_NOLOGO: 1 | |
defaults: | |
run: | |
shell: pwsh | |
jobs: | |
cancel-previous-workflow: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Cancel Previous Runs | |
uses: styfle/cancel-workflow-action@b173b6ec0100793626c2d9e6b90435061f4fc3e5 # pin@0.11.0 | |
with: | |
access_token: ${{ github.token }} | |
sdk: | |
strategy: | |
matrix: | |
include: | |
- target: Android | |
host: ubuntu-latest | |
- target: Linux | |
# Build using older Linux version to preserve sdk compatibility with old GLIBC | |
# See discussion in https://github.com/getsentry/sentry-unity/issues/1730 for more details | |
host: ubuntu-20.04 | |
- target: Windows | |
host: windows-latest | |
uses: ./.github/workflows/sdk.yml | |
with: | |
target: ${{ matrix.target }} | |
runsOn: ${{ matrix.host }} | |
build: | |
name: Build - ${{ matrix.unity-version }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
# Building the SDK with Unity 2022 and newer requires ns2.1 - skipping for now | |
unity-version: ["2019", "2020", "2021"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Checkout submodules | |
run: git submodule update --init --recursive src/sentry-dotnet | |
- name: Load env | |
id: env | |
run: echo "unityVersion=$(./scripts/ci-env.ps1 "unity${{ matrix.unity-version }}")" >> $env:GITHUB_OUTPUT | |
- run: echo "::add-mask::${{ secrets.LICENSE_SERVER_URL }}" | |
- name: Restore Unity Packages | |
uses: actions/cache@v3 | |
with: | |
path: | | |
samples/unity-of-bugs/Library/Packages | |
temp/unity-packages/Library/ScriptAssemblies/*.TestRunner.* | |
key: samples/unity-of-bugs|${{ steps.env.outputs.unityVersion }}-${{ hashFiles('samples/unity-of-bugs/Packages/packages-lock.json') }} | |
- name: Docker Login | |
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # pinned v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Start the Unity docker container | |
# We must use the iOS version of the image instead of 'base' - Sentry.Unity.Editor.iOS.csproj requires some libraries. | |
# Maybe we could just cache the needed file instead of pulling the 1 GB larger image on every build... | |
run: ./scripts/ci-docker.sh '${{ matrix.unity-version }}' 'ios' '${{ secrets.UNITY_LICENSE_SERVER_CONFIG }}' | |
shell: bash | |
# Required by sentry-dotnet since 3.19.0 | |
- name: Install Android dotnet workflow | |
run: dotnet workload install android --temp-dir "${{ runner.temp }}" | |
- name: Download CLI | |
run: ./scripts/download-sentry-cli.ps1 | |
- name: Download Android SDK | |
uses: vaind/download-artifact@e7141b6a94ef28aa3d828b52830cfa1f406a1848 | |
with: | |
name: Android-sdk | |
path: package-dev/Plugins/Android | |
wait-timeout: 3600 | |
- name: Download Android Libraries | |
uses: vaind/download-artifact@e7141b6a94ef28aa3d828b52830cfa1f406a1848 | |
with: | |
name: Android-libraries | |
path: modules/sentry-java/sentry-android-ndk/build/intermediates/merged_native_libs/release/out/lib | |
wait-timeout: 3600 | |
- name: Download Linux SDK | |
uses: vaind/download-artifact@e7141b6a94ef28aa3d828b52830cfa1f406a1848 | |
with: | |
name: Linux-sdk | |
path: package-dev/Plugins/Linux | |
wait-timeout: 3600 | |
- name: Download Windows SDK | |
uses: vaind/download-artifact@e7141b6a94ef28aa3d828b52830cfa1f406a1848 | |
with: | |
name: Windows-sdk | |
path: package-dev/Plugins/Windows | |
wait-timeout: 3600 | |
- name: Build Sentry.Unity Solution | |
run: docker exec unity dotnet build -c Release | |
- name: Install assemblyalias | |
run: docker exec unity dotnet tool install --global Alias --version 0.4.3 | |
- name: Alias editor assemblies | |
run: docker exec unity /home/gh/.dotnet/tools/assemblyalias --target-directory "package-dev/Editor" --internalize --prefix "Sentry." --assemblies-to-alias "Microsoft*;Mono.Cecil*" | |
- name: Alias runtime assemblies | |
run: docker exec unity /home/gh/.dotnet/tools/assemblyalias --target-directory "package-dev/Runtime" --internalize --prefix "Sentry." --assemblies-to-alias "Microsoft*;System*" | |
- name: Package for release | |
if: ${{ matrix.unity-version == env.LOWEST_SUPPORTED_UNITY_VERSION }} | |
run: | | |
# Before packaging, we need to open & close Unity on the sample project to update .meta files in package-dev. | |
# We could add a new custom target but reusing UnityConfigureSentryOptions is good enough. | |
docker exec unity dotnet msbuild /t:UnityConfigureSentryOptions /p:Configuration=Release /p:OutDir=other src/Sentry.Unity | |
./scripts/pack.ps1 | |
- name: Upload release artifacts | |
uses: actions/upload-artifact@v4 | |
if: ${{ matrix.unity-version == env.LOWEST_SUPPORTED_UNITY_VERSION }} | |
with: | |
name: ${{ github.sha }} | |
if-no-files-found: error | |
# Adding the native libraries so the symbol collector craft target can find/upload them | |
path: | | |
package-release.zip | |
modules/sentry-java/sentry-android-ndk/build/intermediates/merged_native_libs/release/out/lib/* | |
- name: Run Unity tests (playmode) | |
run: | | |
docker exec unity dotnet msbuild /t:UnityConfigureSentryOptions /p:TestDsn= /p:Configuration=Release /p:OutDir=other src/Sentry.Unity | |
docker exec unity dotnet msbuild /t:UnityPlayModeTest /p:Configuration=Release /p:OutDir=other test/Sentry.Unity.Tests | |
- name: Upload test artifacts (playmode) | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Test results (playmode) - ${{matrix.unity-version}} | |
path: artifacts/test/playmode | |
- name: Run Unity tests (editmode) | |
run: docker exec unity dotnet msbuild /t:UnityEditModeTest /p:Configuration=Release /p:OutDir=other test/Sentry.Unity.Editor.Tests | |
- name: Upload test artifacts (editmode) | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Test results (editmode) - ${{matrix.unity-version}} | |
path: artifacts/test/editmode | |
package-validation: | |
name: UPM Package validation | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Download UPM package | |
uses: vaind/download-artifact@e7141b6a94ef28aa3d828b52830cfa1f406a1848 | |
with: | |
name: ${{ github.sha }} | |
wait-timeout: 3600 | |
- name: Verify package content against snapshot | |
# If this step fails, you can accept the new file content by | |
# running the following script locally with 'accept' as an argument | |
# and committing the new snapshot file to your branch. i.e: | |
# ./test/Scripts.Tests/test-pack-contents.ps1 accept | |
run: ./test/Scripts.Tests/test-pack-contents.ps1 | |
# This produces the `samples/IntegrationTest` as `smoke-test-${{ matrix.unity-version }}`. | |
smoke-test-create: | |
if: ${{ !startsWith(github.ref, 'refs/heads/release/') }} | |
name: ${{ matrix.unity-version }} Prepare Smoke Test | |
runs-on: ubuntu-latest | |
needs: [package-validation] | |
strategy: | |
fail-fast: false | |
matrix: | |
unity-version: ["2019", "2022", "6000"] | |
env: | |
UNITY_PATH: docker exec unity unity-editor | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- run: echo "::add-mask::${{ secrets.LICENSE_SERVER_URL }}" | |
- name: Docker Login | |
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # pinned v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Start the Unity docker container | |
run: ./scripts/ci-docker.sh '${{ matrix.unity-version }}' 'base' '${{ secrets.UNITY_LICENSE_SERVER_CONFIG }}' | |
shell: bash | |
- name: Create new Project | |
run: ./test/Scripts.Integration.Test/create-project.ps1 -UnityPath "${{ env.UNITY_PATH }}" | |
# We create tar explicitly because upload-artifact is slow for many files. | |
- name: Create archive | |
run: tar -cvzf test-project.tar.gz samples/IntegrationTest | |
- name: Upload project | |
uses: actions/upload-artifact@v4 | |
with: | |
name: smoke-test-${{ matrix.unity-version }} | |
if-no-files-found: error | |
path: test-project.tar.gz | |
# Lower retention period - we only need this to retry CI. | |
retention-days: 14 | |
# A Linux, docker-based build to prepare a game ("player") for some platforms. The tests run in `smoke-test-run`. | |
smoke-test-build: | |
if: ${{ !startsWith(github.ref, 'refs/heads/release/') }} | |
name: ${{ matrix.unity-version }} ${{ matrix.platform }} Build Smoke Test | |
needs: [smoke-test-create] | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
unity-version: ["2019", "2022", "6000"] | |
platform: ["Android", "WebGL", "Linux", "iOS"] | |
include: | |
- platform: Linux | |
image-suffix: "-il2cpp" | |
env: | |
UNITY_PATH: docker exec unity unity-editor | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Free Disk Space (Ubuntu) | |
uses: jlumbroso/free-disk-space@f68fdb76e2ea636224182cfb7377ff9a1708f9b8 | |
with: | |
android: true | |
dotnet: false | |
haskell: true | |
large-packages: false | |
docker-images: false | |
swap-storage: true | |
- run: echo "::add-mask::${{ secrets.LICENSE_SERVER_URL }}" | |
- name: Docker Login | |
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # pinned v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Start the Unity docker container | |
run: ./scripts/ci-docker.sh '${{ matrix.unity-version }}' '${{ matrix.platform }}${{ matrix.image-suffix }}' '${{ secrets.UNITY_LICENSE_SERVER_CONFIG }}' | |
shell: bash | |
# Workaround for missing libMonoPosixHelper.so | |
# See https://github.com/getsentry/sentry-unity/pull/1295 | |
- name: Install mono-devel | |
if: ${{ matrix.unity-version == '2019' }} | |
run: | | |
docker exec --user root unity apt-get update | |
docker exec --user root unity apt-get -y -q install mono-devel | |
- name: Download IntegrationTest project | |
uses: actions/download-artifact@v4 | |
with: | |
name: smoke-test-${{ matrix.unity-version }} | |
- name: Extract project archive | |
run: tar -xvzf test-project.tar.gz | |
- name: Build without Sentry SDK | |
run: ./test/Scripts.Integration.Test/build-project.ps1 -UnityPath "${{ env.UNITY_PATH }}" -Platform "${{ matrix.platform }}" | |
- name: Download UPM package | |
uses: actions/download-artifact@v4 | |
with: | |
name: ${{ github.sha }} | |
- name: Extract UPM package | |
run: ./test/Scripts.Integration.Test/extract-package.ps1 | |
- name: Add Sentry to the project | |
run: ./test/Scripts.Integration.Test/add-sentry.ps1 -UnityPath "${{ env.UNITY_PATH }}" | |
- name: Configure Sentry | |
run: | | |
$isAndroid = ('${{ matrix.platform }}' -eq 'Android') | |
$isNotMainBranch = ('${{ github.ref_name }}' -ne 'main') | |
$platform = if ($isAndroid -and $isNotMainBranch) { 'Android-Export' } else { '${{ matrix.platform }}' } | |
./test/Scripts.Integration.Test/configure-sentry.ps1 -UnityPath "${{ env.UNITY_PATH }}" -Platform $platform -CheckSymbols | |
# Dear lord, I don't know why we have to do this: If we do not "pre-build" the project then `exportAsGoogleAndroidProject` will stay `false` in `IPostGenerateGradleAndroidProject` | |
# and breaking all further steps in CI | |
# Things I tried: | |
# 1. Setting the flag and restarting the editor prior to build | |
# 2. Setting the flag and reloading the domain in a step prior to building | |
# 3. Reloading the domain prior to building (does not work - build fails with a domain reload pending) | |
- name: Pre-Build Project for Unity 6 and Android | |
continue-on-error: true | |
if: ${{ matrix.unity-version == '6000' && matrix.platform == 'Android' }} | |
run: | | |
$platform = '${{ matrix.platform }}' | |
if ('${{ github.ref_name }}' -ne 'main') | |
{ | |
$checkSymbols = $false | |
$platform = 'Android-Export' | |
} | |
else | |
{ | |
$checkSymbols = $false | |
} | |
./test/Scripts.Integration.Test/build-project.ps1 -UnityPath "${{ env.UNITY_PATH }}" -Platform $platform -CheckSymbols:$checkSymbols -UnityVersion "${{ matrix.unity-version }}" | |
Remove-Item -Path samples/IntegrationTest/Build -Recurse -Force -Confirm:$false | |
- name: Build Project | |
run: | | |
$platform = '${{ matrix.platform }}' | |
if ($platform -eq 'iOS') | |
{ | |
$checkSymbols = $false | |
} | |
elseif (($platform -eq 'Android') -and ('${{ github.ref_name }}' -ne 'main')) | |
{ | |
$checkSymbols = $false | |
$platform = 'Android-Export' | |
} | |
else | |
{ | |
$checkSymbols = $true | |
} | |
./test/Scripts.Integration.Test/build-project.ps1 -UnityPath "${{ env.UNITY_PATH }}" -Platform $platform -CheckSymbols:$checkSymbols -UnityVersion "${{ matrix.unity-version }}" | |
# We create tar explicitly because upload-artifact is slow for many files. | |
- name: Create archive | |
shell: bash | |
run: | | |
# Note: remove local.properties file that contains Android SDK & NDK paths in the Unity installation. | |
rm -rf samples/IntegrationTest/Build/*_BackUpThisFolder_ButDontShipItWithYourGame | |
tar -cvzf test-app.tar.gz samples/IntegrationTest/Build | |
- name: Upload test app | |
uses: actions/upload-artifact@v4 | |
with: | |
name: testapp-${{ matrix.platform }}-${{ matrix.unity-version }} | |
if-no-files-found: error | |
path: test-app.tar.gz | |
# Lower retention period - we only need this to retry CI. | |
retention-days: 14 | |
- name: Upload IntegrationTest project on failure | |
if: ${{ failure() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: failed-project-${{ matrix.platform }}-${{ matrix.unity-version }} | |
path: | | |
samples/IntegrationTest | |
!samples/IntegrationTest/Build/*_BackUpThisFolder_ButDontShipItWithYourGame | |
# Lower retention period - we only need this to retry CI. | |
retention-days: 14 | |
desktop-smoke-test: | |
if: ${{ !startsWith(github.ref, 'refs/heads/release/') }} | |
name: ${{ matrix.unity-version }} ${{ matrix.os }} Run Smoke Test | |
needs: [smoke-test-create] | |
runs-on: ${{ matrix.os }}-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
unity-version: ["2019", "2022", "6000"] | |
# os: ["windows", "macos"] | |
os: ["windows"] | |
include: | |
- os: windows | |
unity-modules: windows-il2cpp | |
unity-config-path: C:/ProgramData/Unity/config/ | |
# - os: macos | |
# unity-modules: mac-il2cpp | |
# unity-config-path: /Library/Application Support/Unity/config/ | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Load env | |
id: env | |
run: echo "unityVersion=$(./scripts/ci-env.ps1 "unity${{ matrix.unity-version }}")" >> $env:GITHUB_OUTPUT | |
- name: Setup Unity | |
uses: getsentry/setup-unity@d84ad1d1fb3020e48883c3ac8e87d64baf1135c7 | |
with: | |
unity-version: ${{ steps.env.outputs.unityVersion }} | |
unity-modules: ${{ matrix.unity-modules }} | |
- run: echo "::add-mask::${{ secrets.LICENSE_SERVER_URL }}" | |
- name: Create Unity license config | |
run: | | |
New-Item -Path '${{ matrix.unity-config-path }}' -ItemType Directory | |
Set-Content -Path '${{ matrix.unity-config-path }}services-config.json' -Value '${{ secrets.UNITY_LICENSE_SERVER_CONFIG }}' | |
- name: Download IntegrationTest project | |
uses: actions/download-artifact@v4 | |
with: | |
name: smoke-test-${{ matrix.unity-version }} | |
- name: Extract project archive | |
run: tar -xvzf test-project.tar.gz | |
- name: Build without Sentry SDK | |
run: ./test/Scripts.Integration.Test/build-project.ps1 -UnityPath "${{ env.UNITY_PATH }}" | |
- name: Download UPM package | |
uses: actions/download-artifact@v4 | |
with: | |
name: ${{ github.sha }} | |
- name: Extract UPM package | |
run: ./test/Scripts.Integration.Test/extract-package.ps1 | |
- name: Add Sentry to the project | |
run: ./test/Scripts.Integration.Test/add-sentry.ps1 -UnityPath "${{ env.UNITY_PATH }}" | |
- name: Configure Sentry | |
run: ./test/Scripts.Integration.Test/configure-sentry.ps1 -UnityPath "${{ env.UNITY_PATH }}" -CheckSymbols | |
- name: Build with Sentry SDK | |
run: ./test/Scripts.Integration.Test/build-project.ps1 -UnityPath "${{ env.UNITY_PATH }}" -CheckSymbols -UnityVersion "${{ matrix.unity-version }}" | |
- name: Run Smoke Test | |
run: ./test/Scripts.Integration.Test/run-smoke-test.ps1 -Smoke | |
- name: Run Crash Test | |
run: ./test/Scripts.Integration.Test/run-smoke-test.ps1 -Crash | |
android-smoke-test-run: | |
if: ${{ !startsWith(github.ref, 'refs/heads/release/') }} | |
needs: [mobile-smoke-test-compile] | |
name: ${{ matrix.unity-version }} Android ${{ matrix.api-level }} Run Smoke Test | |
uses: ./.github/workflows/android-smoke-test-wrapper.yml | |
with: | |
unity-version: ${{ matrix.unity-version }} | |
api-level: ${{ matrix.api-level }} | |
strategy: | |
fail-fast: false | |
matrix: | |
api-level: [27, 28, 29, 30, 31] # last updated October 2022 | |
unity-version: ["2019", "2022", "6000"] | |
include: | |
# API 21 is barely used but let's check it as the minimum supported version for now. | |
- api-level: 21 | |
unity-version: "2019" | |
exclude: | |
# Seems like there's an error in Unity with Android API 30 - disabling. | |
# https://github.com/getsentry/sentry-unity/issues/719#issuecomment-1129129952 | |
- api-level: 30 | |
unity-version: "2021" | |
- api-level: 30 | |
unity-version: "2022" | |
mobile-smoke-test-compile: | |
if: ${{ !startsWith(github.ref, 'refs/heads/release/') }} | |
needs: [smoke-test-build] | |
name: ${{ matrix.unity-version }} ${{ matrix.platform }} Compile Smoke Test | |
runs-on: ${{ matrix.platform == 'iOS' && 'macos' || 'ubuntu' }}-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
unity-version: ["2019", "2022", "6000"] | |
platform: ["Android", "iOS"] | |
include: | |
# See supported version in https://docs.unity3d.com/6000.0/Documentation/Manual/android-sdksetup.html | |
- unity-version: "2019" | |
ndk: "r19" | |
- unity-version: "2022" | |
ndk: "r21d" | |
- unity-version: "6000" | |
ndk: "r23b" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Download app project | |
uses: actions/download-artifact@v4 | |
with: | |
name: testapp-${{ matrix.platform }}-${{ matrix.unity-version }} | |
- name: Extract app project | |
run: tar -xvzf test-app.tar.gz | |
- name: Setup Android | |
uses: android-actions/setup-android@7c5672355aaa8fde5f97a91aa9a99616d1ace6bc # pin@v2 | |
if: ${{ matrix.platform == 'Android' && github.ref_name != 'main' }} | |
- name: Setup NDK | |
uses: nttld/setup-ndk@8c3b609ff4d54576ea420551943fd34b4d03b0dc # pin@v1 | |
if: ${{ matrix.platform == 'Android' && github.ref_name != 'main' }} | |
id: setup-ndk | |
with: | |
ndk-version: ${{ matrix.ndk }} | |
add-to-path: false | |
# We modify the exported gradle project to deal with the different build-environment | |
# I.e. we're fixing the paths for SDK & NDK that have been hardcoded to point at the Unity installation | |
- name: Modify gradle project | |
if: ${{ matrix.platform == 'Android' && github.ref_name != 'main' }} | |
run: | | |
./test/Scripts.Integration.Test/modify-gradle-project.ps1 ` | |
-AndroidSdkRoot $env:ANDROID_SDK_ROOT ` | |
-NdkPath ${{ steps.setup-ndk.outputs.ndk-path }} ` | |
-UnityVersion ${{ matrix.unity-version }} | |
- name: Setup JDK 17 for Unity 6 | |
if: ${{ matrix.platform == 'Android' && github.ref_name != 'main' && matrix.unity-version == '6000' }} | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Android smoke test | |
if: ${{ matrix.platform == 'Android' && github.ref_name != 'main' }} | |
run: ./scripts/smoke-test-android.ps1 Build -IsIntegrationTest -UnityVersion "${{ matrix.unity-version }}" | |
env: | |
JAVA_HOME: ${{ env.JAVA_HOME }} | |
- name: iOS smoke test | |
if: ${{ matrix.platform == 'iOS' }} | |
run: ./scripts/smoke-test-ios.ps1 Build -IsIntegrationTest -UnityVersion "${{ matrix.unity-version }}" | |
- name: Upload Project project on failure | |
if: ${{ failure() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: failed-project-${{ matrix.platform }}-${{ matrix.unity-version }}-but-compiled | |
path: | | |
samples/IntegrationTest | |
!samples/IntegrationTest/Build/*_BackUpThisFolder_ButDontShipItWithYourGame | |
# Lower retention period - we only need this to retry CI. | |
retention-days: 14 | |
- name: Upload app | |
uses: actions/upload-artifact@v4 | |
with: | |
name: testapp-${{ matrix.platform }}-compiled-${{ matrix.unity-version }} | |
# Collect app but ignore the files that are not required for the test. | |
path: | | |
samples/IntegrationTest/Build/*.apk | |
samples/IntegrationTest/Build/archive/Unity-iPhone/Build/Products/Release-iphonesimulator/ | |
!**/Release-iphonesimulator/*.dSYM | |
!**/Release-iphonesimulator/UnityFramework.framework/* | |
# Lower retention period - we only need this to retry CI. | |
retention-days: 14 | |
ios-smoke-test-run: | |
if: ${{ !startsWith(github.ref, 'refs/heads/release/') }} | |
needs: [mobile-smoke-test-compile] | |
name: ${{ matrix.unity-version }} iOS ${{ matrix.ios }} Run Smoke Test | |
runs-on: macos-12 | |
strategy: | |
fail-fast: false | |
matrix: | |
unity-version: ["2019", "2022", "6000"] | |
# Check https://support.apple.com/en-us/HT201222 for the latest minor version for a given major one. | |
# https://developer.apple.com/support/app-store/ shows that of all iOS devices | |
# - `iOS 16`: 71% | |
# - `iOS 15`: 20 % | |
# - the rest: 8 % | |
# as of May 2, 2023. Therefore, let's stick to testing iOS 15 and `latest` for now. | |
# Numbers as string otherwise GH will reformat the runtime numbers removing the fractions. | |
# Also make sure to match the versions available here: | |
# - https://github.com/actions/runner-images/blob/main/images/macos/macos-12-Readme.md | |
ios: ["15.4", latest] # last updated May 2023 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Download app artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: testapp-iOS-compiled-${{ matrix.unity-version }} | |
path: samples/IntegrationTest/Build | |
- name: Setup xcode-install | |
# Github Virtual machine already sets the runtime and simulator for the latest release. | |
if: ${{ matrix.ios != 'latest'}} | |
run: gem install xcode-install | |
- name: Setup ${{matrix.ios}} runtime | |
if: ${{ matrix.ios != 'latest'}} | |
run: xcversion simulators --install='iOS ${{matrix.ios}}' | |
- name: Setup ${{matrix.ios}} Simulator | |
if: ${{ matrix.ios != 'latest' }} | |
# We need to setup an simulator in order to xCode to populate the simulators for the given runtime. | |
run: xcrun simctl create InitialSimulator "iPhone 8" "iOS${{ matrix.ios }}" | |
- name: Smoke test | |
id: smoke-test-ios | |
timeout-minutes: 10 | |
run: | | |
$runtime = "${{ matrix.ios }}" | |
If ($runtime -ne "latest") | |
{ | |
$runtime = "iOS " + $runtime | |
} | |
./Scripts/smoke-test-ios.ps1 Test "$runtime" -IsIntegrationTest | |
smoke-test-run: | |
if: ${{ !startsWith(github.ref, 'refs/heads/release/') }} | |
needs: [smoke-test-build] | |
name: ${{ matrix.unity-version }} ${{ matrix.platform }} Run Smoke Test | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
unity-version: ["2019", "2022", "6000"] | |
platform: ["WebGL", "Linux"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Download test app artifact | |
uses: actions/download-artifact@v4 | |
id: download | |
with: | |
name: testapp-${{ matrix.platform }}-${{ matrix.unity-version }} | |
- name: Extract test app | |
run: tar -xvzf test-app.tar.gz | |
- name: Run (WebGL) | |
if: ${{ matrix.platform == 'WebGL' }} | |
timeout-minutes: 10 | |
run: | | |
pip3 install --upgrade --user selenium urllib3 requests | |
python3 scripts/smoke-test-webgl.py "samples/IntegrationTest/Build" | |
- name: Run Smoke Test (Linux) | |
if: ${{ matrix.platform == 'Linux' }} | |
run: ./test/Scripts.Integration.Test/run-smoke-test.ps1 -Smoke | |
- name: Run Crash Test (Linux) | |
if: ${{ matrix.platform == 'Linux' }} | |
run: ./test/Scripts.Integration.Test/run-smoke-test.ps1 -Crash |