Skip to content
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
96 changes: 47 additions & 49 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,24 +85,24 @@ jobs:
# ./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:
name: Create ${{ matrix.unity-version }} Smoke Test Project
# This produces the `samples/IntegrationTest` as `test-${{ matrix.unity-version }}`.
test-create:
name: Create ${{ matrix.unity-version }} Test Project
if: ${{ !startsWith(github.ref, 'refs/heads/release/') }}
needs: [create-unity-matrix]
secrets: inherit
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.create-unity-matrix.outputs.unity-matrix) }}
uses: ./.github/workflows/smoke-test-create.yml
uses: ./.github/workflows/test-create.yml
with:
unity-version: ${{ matrix.unity-version }}
# A Linux, docker-based build to prepare a WebGL player. The tests run in `smoke-test-run`.
smoke-test-build-webgl:
name: Build ${{ matrix.platform }} ${{ matrix.unity-version }} Smoke Test

# A Linux, docker-based build to prepare a WebGL player. The tests run in `test-run-webgl`.
test-build-webgl:
name: Build ${{ matrix.platform }} ${{ matrix.unity-version }} Test
if: ${{ !startsWith(github.ref, 'refs/heads/release/') }}
needs: [smoke-test-create, create-unity-matrix]
needs: [test-create, create-unity-matrix]
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand All @@ -111,7 +111,6 @@ jobs:
platform: ["WebGL"]
include:
- platform: WebGL
check_symbols: true
build_platform: WebGL
env:
UNITY_PATH: docker exec unity unity-editor
Expand Down Expand Up @@ -149,7 +148,7 @@ jobs:
- name: Download IntegrationTest project
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
name: smoke-test-${{ matrix.unity-version }}
name: test-${{ matrix.unity-version }}

- name: Extract project archive
run: tar -xvzf test-project.tar.gz
Expand All @@ -172,7 +171,7 @@ jobs:

- name: Build without Sentry SDK
if: steps.cache-build-nosentry.outputs.cache-hit != 'true'
run: ./test/Scripts.Integration.Test/build-project.ps1 -UnityPath "$env:UNITY_PATH" -Platform "$env:BUILD_PLATFORM" -CheckSymbols:$false -BuildDirName "Build-NoSentry"
run: ./test/Scripts.Integration.Test/build-project.ps1 -UnityPath "$env:UNITY_PATH" -Platform "$env:BUILD_PLATFORM" -BuildDirName "Build-NoSentry"
env:
BUILD_PLATFORM: ${{ matrix.build_platform }}

Expand All @@ -189,16 +188,15 @@ jobs:
run: ./test/Scripts.Integration.Test/add-sentry.ps1 -UnityPath "$env:UNITY_PATH" -PackagePath "test-package-release"

- name: Configure Sentry
run: ./test/Scripts.Integration.Test/configure-sentry.ps1 -UnityPath "$env:UNITY_PATH" -Platform "$env:BUILD_PLATFORM" -CheckSymbols -TestMode "integration"
run: ./test/Scripts.Integration.Test/configure-sentry.ps1 -UnityPath "$env:UNITY_PATH" -Platform "$env:BUILD_PLATFORM"
env:
BUILD_PLATFORM: ${{ matrix.build_platform }}
SENTRY_DSN: ${{ secrets.SENTRY_TEST_DSN }}

- name: Build Project
run: ./test/Scripts.Integration.Test/build-project.ps1 -UnityPath "$env:UNITY_PATH" -Platform "$env:BUILD_PLATFORM" -CheckSymbols:$([System.Convert]::ToBoolean($env:CHECK_SYMBOLS)) -UnityVersion "$env:UNITY_VERSION"
run: ./test/Scripts.Integration.Test/build-project.ps1 -UnityPath "$env:UNITY_PATH" -Platform "$env:BUILD_PLATFORM" -UnityVersion "$env:UNITY_VERSION"
env:
BUILD_PLATFORM: ${{ matrix.build_platform }}
CHECK_SYMBOLS: ${{ matrix.check_symbols }}
UNITY_VERSION: ${{ matrix.unity-version }}

- name: Compare build sizes
Expand Down Expand Up @@ -241,24 +239,24 @@ jobs:
# Lower retention period - we only need this to retry CI.
retention-days: 14

smoke-test-build-android:
name: Build Android ${{ matrix.unity-version }} Smoke Test
test-build-android:
name: Build Android ${{ matrix.unity-version }} Test
if: ${{ !startsWith(github.ref, 'refs/heads/release/') }}
needs: [smoke-test-create, create-unity-matrix]
needs: [test-create, create-unity-matrix]
secrets: inherit
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.create-unity-matrix.outputs.unity-matrix) }}
uses: ./.github/workflows/smoke-test-build-android.yml
uses: ./.github/workflows/test-build-android.yml
with:
unity-version: ${{ matrix.unity-version }}

smoke-test-run-android:
test-run-android:
name: Run Android ${{ matrix.unity-version }} Integration Test
if: ${{ !startsWith(github.ref, 'refs/heads/release/') }}
needs: [smoke-test-build-android, create-unity-matrix]
needs: [test-build-android, create-unity-matrix]
secrets: inherit
uses: ./.github/workflows/smoke-test-run-android.yml
uses: ./.github/workflows/test-run-android.yml
with:
unity-version: ${{ matrix.unity-version }}
api-level: ${{ matrix.api-level }}
Expand All @@ -271,38 +269,38 @@ jobs:
api-level: [30]
init-type: ["runtime", "buildtime"]

smoke-test-build-ios:
name: Build iOS ${{ matrix.unity-version }} Smoke Test
test-build-ios:
name: Build iOS ${{ matrix.unity-version }} Test
if: ${{ !startsWith(github.ref, 'refs/heads/release/') }}
needs: [smoke-test-create, create-unity-matrix]
needs: [test-create, create-unity-matrix]
secrets: inherit
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.create-unity-matrix.outputs.unity-matrix) }}
uses: ./.github/workflows/smoke-test-build-ios.yml
uses: ./.github/workflows/test-build-ios.yml
with:
unity-version: ${{ matrix.unity-version }}

smoke-test-compile-ios:
name: Compile iOS ${{ matrix.unity-version }} Smoke Test
test-compile-ios:
name: Compile iOS ${{ matrix.unity-version }} Test
if: ${{ !startsWith(github.ref, 'refs/heads/release/') }}
needs: [smoke-test-build-ios, create-unity-matrix]
needs: [test-build-ios, create-unity-matrix]
secrets: inherit
strategy:
fail-fast: false
matrix:
unity-version: ${{ fromJSON(needs.create-unity-matrix.outputs.unity-matrix).unity-version }}
init-type: ["runtime", "buildtime"]
uses: ./.github/workflows/smoke-test-compile-ios.yml
uses: ./.github/workflows/test-compile-ios.yml
with:
unity-version: ${{ matrix.unity-version }}
init-type: ${{ matrix.init-type }}

smoke-test-run-ios:
test-run-ios:
name: Run iOS ${{ matrix.unity-version }} Integration Test
if: ${{ !startsWith(github.ref, 'refs/heads/release/') }}
needs: [smoke-test-compile-ios, create-unity-matrix]
uses: ./.github/workflows/smoke-test-run-ios.yml
needs: [test-compile-ios, create-unity-matrix]
uses: ./.github/workflows/test-run-ios.yml
with:
unity-version: ${{ matrix.unity-version }}
ios-version: ${{ matrix.ios-version }}
Expand All @@ -324,69 +322,69 @@ jobs:
# Also make sure to match the versions available here:
# - https://github.com/actions/runner-images/blob/main/images/macos/macos-14-Readme.md

smoke-test-run-webgl:
test-run-webgl:
name: Run WebGL ${{ matrix.unity-version }} Integration Test
if: ${{ !startsWith(github.ref, 'refs/heads/release/') }}
needs: [smoke-test-build-webgl, create-unity-matrix]
needs: [test-build-webgl, create-unity-matrix]
secrets: inherit
strategy:
fail-fast: false
matrix:
unity-version: ${{ fromJSON(needs.create-unity-matrix.outputs.unity-matrix).unity-version }}
uses: ./.github/workflows/smoke-test-run-webgl.yml
uses: ./.github/workflows/test-run-webgl.yml
with:
unity-version: ${{ matrix.unity-version }}

smoke-test-build-linux:
test-build-linux:
name: Build Linux ${{ matrix.unity-version }} Integration Test
if: ${{ !startsWith(github.ref, 'refs/heads/release/') }}
needs: [smoke-test-create, create-unity-matrix]
needs: [test-create, create-unity-matrix]
secrets: inherit
strategy:
fail-fast: false
matrix:
unity-version: ${{ fromJSON(needs.create-unity-matrix.outputs.unity-matrix).unity-version }}
uses: ./.github/workflows/smoke-test-build-linux.yml
uses: ./.github/workflows/test-build-linux.yml
with:
unity-version: ${{ matrix.unity-version }}

smoke-test-build-windows:
test-build-windows:
name: Build Windows ${{ matrix.unity-version }} Integration Test
if: ${{ !startsWith(github.ref, 'refs/heads/release/') }}
needs: [smoke-test-create, create-unity-matrix]
needs: [test-create, create-unity-matrix]
secrets: inherit
strategy:
fail-fast: false
matrix:
unity-version: ${{ fromJSON(needs.create-unity-matrix.outputs.unity-matrix).unity-version }}
uses: ./.github/workflows/smoke-test-build-windows.yml
uses: ./.github/workflows/test-build-windows.yml
with:
unity-version: ${{ matrix.unity-version }}

smoke-test-run-linux:
test-run-linux:
name: Run Linux ${{ matrix.unity-version }} Integration Test
if: ${{ !startsWith(github.ref, 'refs/heads/release/') }}
needs: [smoke-test-build-linux, create-unity-matrix]
needs: [test-build-linux, create-unity-matrix]
secrets: inherit
strategy:
fail-fast: false
matrix:
unity-version: ${{ fromJSON(needs.create-unity-matrix.outputs.unity-matrix).unity-version }}
uses: ./.github/workflows/smoke-test-run-desktop.yml
uses: ./.github/workflows/test-run-desktop.yml
with:
unity-version: ${{ matrix.unity-version }}
platform: linux

smoke-test-run-windows:
test-run-windows:
name: Run Windows ${{ matrix.unity-version }} Integration Test
if: ${{ !startsWith(github.ref, 'refs/heads/release/') }}
needs: [smoke-test-build-windows, create-unity-matrix]
needs: [test-build-windows, create-unity-matrix]
secrets: inherit
strategy:
fail-fast: false
matrix:
unity-version: ${{ fromJSON(needs.create-unity-matrix.outputs.unity-matrix).unity-version }}
uses: ./.github/workflows/smoke-test-run-desktop.yml
uses: ./.github/workflows/test-run-desktop.yml
with:
unity-version: ${{ matrix.unity-version }}
platform: windows
Expand All @@ -395,7 +393,7 @@ jobs:
name: Build Size
runs-on: ubuntu-latest
if: ${{ !startsWith(github.ref, 'refs/heads/release/') }}
needs: [smoke-test-build-webgl, smoke-test-build-android, smoke-test-compile-ios, smoke-test-build-linux, smoke-test-build-windows]
needs: [test-build-webgl, test-build-android, test-compile-ios, test-build-linux, test-build-windows]
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "SmokeTest: Build Android"
name: "Test: Build Android"
on:
workflow_call:
inputs:
Expand Down Expand Up @@ -40,7 +40,7 @@ jobs:
- name: Download IntegrationTest project
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
name: smoke-test-${{ env.UNITY_VERSION }}
name: test-${{ env.UNITY_VERSION }}

- name: Extract project archive
run: tar -xvzf test-project.tar.gz
Expand All @@ -63,7 +63,7 @@ jobs:

- name: Build without Sentry SDK
if: steps.cache-build-nosentry.outputs.cache-hit != 'true'
run: ./test/Scripts.Integration.Test/build-project.ps1 -UnityPath "$env:UNITY_PATH" -Platform "Android" -CheckSymbols:$false -BuildDirName "Build-NoSentry"
run: ./test/Scripts.Integration.Test/build-project.ps1 -UnityPath "$env:UNITY_PATH" -Platform "Android" -BuildDirName "Build-NoSentry"

- name: Download UPM package
uses: vaind/download-artifact@e7141b6a94ef28aa3d828b52830cfa1f406a1848 # v4-with-wait-timeout
Expand All @@ -78,12 +78,12 @@ jobs:
run: ./test/Scripts.Integration.Test/add-sentry.ps1 -UnityPath "$env:UNITY_PATH" -PackagePath "test-package-release"

- name: Configure Sentry
run: ./test/Scripts.Integration.Test/configure-sentry.ps1 -UnityPath "$env:UNITY_PATH" -Platform "Android" -CheckSymbols -TestMode "integration"
run: ./test/Scripts.Integration.Test/configure-sentry.ps1 -UnityPath "$env:UNITY_PATH" -Platform "Android"
env:
SENTRY_DSN: ${{ secrets.SENTRY_TEST_DSN }}

- name: Export APK - Runtime Initialization
run: ./test/Scripts.Integration.Test/build-project.ps1 -UnityPath "$env:UNITY_PATH" -Platform "Android" -CheckSymbols:$true -UnityVersion "$env:UNITY_VERSION"
run: ./test/Scripts.Integration.Test/build-project.ps1 -UnityPath "$env:UNITY_PATH" -Platform "Android" -UnityVersion "$env:UNITY_VERSION"

- name: Compare build sizes (Runtime)
run: ./test/Scripts.Integration.Test/measure-build-size.ps1 -Path1 "samples/IntegrationTest/Build-NoSentry" -Path2 "samples/IntegrationTest/Build" -Platform "Android" -UnityVersion "$env:UNITY_VERSION"
Expand All @@ -110,7 +110,7 @@ jobs:
Set-Content $optionsPath $content

- name: Export APK - Build-Time Initialization
run: ./test/Scripts.Integration.Test/build-project.ps1 -UnityPath "$env:UNITY_PATH" -Platform "Android" -CheckSymbols:$true -UnityVersion "$env:UNITY_VERSION"
run: ./test/Scripts.Integration.Test/build-project.ps1 -UnityPath "$env:UNITY_PATH" -Platform "Android" -UnityVersion "$env:UNITY_VERSION"

- name: Upload .apk
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "SmokeTest: Build iOS"
name: "Test: Build iOS"
on:
workflow_call:
inputs:
Expand Down Expand Up @@ -46,7 +46,7 @@ jobs:
- name: Download IntegrationTest project
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
name: smoke-test-${{ env.UNITY_VERSION }}
name: test-${{ env.UNITY_VERSION }}

- name: Extract project archive
run: tar -xvzf test-project.tar.gz
Expand All @@ -69,7 +69,7 @@ jobs:

- name: Build without Sentry SDK
if: steps.cache-build-nosentry.outputs.cache-hit != 'true'
run: ./test/Scripts.Integration.Test/build-project.ps1 -UnityPath "$env:UNITY_PATH" -Platform "iOS" -CheckSymbols:$false -BuildDirName "Build-NoSentry"
run: ./test/Scripts.Integration.Test/build-project.ps1 -UnityPath "$env:UNITY_PATH" -Platform "iOS" -BuildDirName "Build-NoSentry"

- name: Create archive for build without Sentry
shell: bash
Expand Down Expand Up @@ -97,13 +97,13 @@ jobs:
run: ./test/Scripts.Integration.Test/add-sentry.ps1 -UnityPath "$env:UNITY_PATH" -PackagePath "test-package-release"

- name: Configure Sentry
run: ./test/Scripts.Integration.Test/configure-sentry.ps1 -UnityPath "$env:UNITY_PATH" -Platform "$env:BUILD_PLATFORM" -CheckSymbols -TestMode "integration"
run: ./test/Scripts.Integration.Test/configure-sentry.ps1 -UnityPath "$env:UNITY_PATH" -Platform "$env:BUILD_PLATFORM"
env:
BUILD_PLATFORM: ${{ matrix.build_platform }}
SENTRY_DSN: ${{ secrets.SENTRY_TEST_DSN }}

- name: Build Project with runtime initialization
run: ./test/Scripts.Integration.Test/build-project.ps1 -UnityPath "$env:UNITY_PATH" -Platform "$env:BUILD_PLATFORM" -CheckSymbols:$false -UnityVersion "$env:UNITY_VERSION"
run: ./test/Scripts.Integration.Test/build-project.ps1 -UnityPath "$env:UNITY_PATH" -Platform "$env:BUILD_PLATFORM" -UnityVersion "$env:UNITY_VERSION"
env:
BUILD_PLATFORM: ${{ matrix.build_platform }}

Expand Down Expand Up @@ -132,7 +132,7 @@ jobs:
Set-Content $optionsPath $content

- name: Build Project with build-time initialization
run: ./test/Scripts.Integration.Test/build-project.ps1 -UnityPath "$env:UNITY_PATH" -Platform "$env:BUILD_PLATFORM" -CheckSymbols:$false -UnityVersion "$env:UNITY_VERSION"
run: ./test/Scripts.Integration.Test/build-project.ps1 -UnityPath "$env:UNITY_PATH" -Platform "$env:BUILD_PLATFORM" -UnityVersion "$env:UNITY_VERSION"
env:
BUILD_PLATFORM: ${{ matrix.build_platform }}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "IntegrationTest: Build Linux"
name: "Test: Build Linux"
on:
workflow_call:
inputs:
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:
- name: Download IntegrationTest project
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
name: smoke-test-${{ env.UNITY_VERSION }}
name: test-${{ env.UNITY_VERSION }}

- name: Extract project archive
run: tar -xvzf test-project.tar.gz
Expand All @@ -74,7 +74,7 @@ jobs:

- name: Build without Sentry SDK
if: steps.cache-build-nosentry.outputs.cache-hit != 'true'
run: ./test/Scripts.Integration.Test/build-project.ps1 -UnityPath "$env:UNITY_PATH" -Platform Linux -CheckSymbols:$false -BuildDirName "Build-NoSentry"
run: ./test/Scripts.Integration.Test/build-project.ps1 -UnityPath "$env:UNITY_PATH" -Platform Linux -BuildDirName "Build-NoSentry"

- name: Download UPM package
uses: vaind/download-artifact@e7141b6a94ef28aa3d828b52830cfa1f406a1848 # v4-with-wait-timeout
Expand All @@ -89,12 +89,12 @@ jobs:
run: ./test/Scripts.Integration.Test/add-sentry.ps1 -UnityPath "$env:UNITY_PATH" -PackagePath "test-package-release"

- name: Configure Sentry
run: ./test/Scripts.Integration.Test/configure-sentry.ps1 -UnityPath "$env:UNITY_PATH" -Platform Linux -TestMode "integration"
run: ./test/Scripts.Integration.Test/configure-sentry.ps1 -UnityPath "$env:UNITY_PATH" -Platform Linux
env:
SENTRY_DSN: ${{ secrets.SENTRY_TEST_DSN }}

- name: Build with Sentry SDK
run: ./test/Scripts.Integration.Test/build-project.ps1 -UnityPath "$env:UNITY_PATH" -Platform Linux -CheckSymbols:$false -UnityVersion "$env:UNITY_VERSION"
run: ./test/Scripts.Integration.Test/build-project.ps1 -UnityPath "$env:UNITY_PATH" -Platform Linux -UnityVersion "$env:UNITY_VERSION"

- name: Compare build sizes
run: ./test/Scripts.Integration.Test/measure-build-size.ps1 -Path1 "samples/IntegrationTest/Build-NoSentry" -Path2 "samples/IntegrationTest/Build" -Platform Linux -UnityVersion "$env:UNITY_VERSION"
Expand Down
Loading
Loading