Skip to content
Draft
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
16 changes: 12 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,13 @@ jobs:

- name: Load env
id: env
run: echo "unityVersion=$(./scripts/ci-env.ps1 "unity${env:UNITY_VERSION}")" >> $env:GITHUB_OUTPUT
run: echo "unityVersion=$(./scripts/ci-env.ps1 "$env:UNITY_SCRIPT_ARG")" >> $env:GITHUB_OUTPUT
env:
UNITY_SCRIPT_ARG: unity${{ env.UNITY_VERSION }}

- run: echo "::add-mask::${{ secrets.LICENSE_SERVER_URL }}"
- run: echo "::add-mask::\"$LICENSE_SERVER_URL\""
env:
LICENSE_SERVER_URL: ${{ secrets.LICENSE_SERVER_URL }}

- name: Restore Unity Packages
uses: actions/cache@2f8e54208210a422b2efd51efaa6bd6d7ca8920f # v3
Expand All @@ -51,8 +55,10 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Start the Unity docker container
run: ./scripts/ci-docker.sh "${UNITY_VERSION}" 'ios' '${{ secrets.UNITY_LICENSE_SERVER_CONFIG }}'
run: ./scripts/ci-docker.sh "$UNITY_VERSION" 'ios' "$UNITY_LICENSE_SERVER_CONFIG"
shell: bash
env:
UNITY_LICENSE_SERVER_CONFIG: ${{ secrets.UNITY_LICENSE_SERVER_CONFIG }}

- name: Install .NET SDK
if: runner.os != 'Windows'
Expand All @@ -61,7 +67,9 @@ jobs:
global-json-file: src/sentry-dotnet/global.json

- name: Install Android dotnet workflow
run: dotnet workload install android --temp-dir "${env:RUNNER_TEMP}"
run: dotnet workload install android --temp-dir "$RUNNER_TEMP"
env:
RUNNER_TEMP: ${{ env.RUNNER_TEMP }}

- name: Download CLI
run: ./scripts/download-sentry-cli.ps1
Expand Down
49 changes: 36 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,9 @@ jobs:
docker-images: false
swap-storage: true

- run: echo "::add-mask::${{ secrets.LICENSE_SERVER_URL }}"
- run: echo "::add-mask::\"$LICENSE_SERVER_URL\""
env:
LICENSE_SERVER_URL: ${{ secrets.LICENSE_SERVER_URL }}

- name: Docker Login
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # pinned v3
Expand All @@ -139,8 +141,14 @@ jobs:
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 }}'
run: ./scripts/ci-docker.sh "$UNITY_VERSION" "$PLATFORM_WITH_SUFFIX" "$UNITY_LICENSE_SERVER_CONFIG"
shell: bash
env:
UNITY_VERSION: ${{ matrix.unity-version }}
PLATFORM: ${{ matrix.platform }}
IMAGE_SUFFIX: ${{ matrix.image-suffix }}
PLATFORM_WITH_SUFFIX: ${{ matrix.platform }}${{ matrix.image-suffix }}
UNITY_LICENSE_SERVER_CONFIG: ${{ secrets.UNITY_LICENSE_SERVER_CONFIG }}

- name: Download IntegrationTest project
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
Expand All @@ -163,13 +171,19 @@ jobs:
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 }}"
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 }}" -Platform ${{ matrix.build_platform }} -CheckSymbols
run: ./test/Scripts.Integration.Test/configure-sentry.ps1 -UnityPath "$env:UNITY_PATH" -Platform "$env:BUILD_PLATFORM" -CheckSymbols
env:
BUILD_PLATFORM: ${{ matrix.build_platform }}

- name: Build Project
run: ./test/Scripts.Integration.Test/build-project.ps1 -UnityPath "${{ env.UNITY_PATH }}" -Platform ${{ matrix.build_platform }} -CheckSymbols:$${{ matrix.check_symbols }} -UnityVersion "${{ matrix.unity-version }}"
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"
env:
BUILD_PLATFORM: ${{ matrix.build_platform }}
CHECK_SYMBOLS: ${{ matrix.check_symbols }}
UNITY_VERSION: ${{ matrix.unity-version }}

# We create tar explicitly because upload-artifact is slow for many files.
- name: Create archive
Expand Down Expand Up @@ -343,20 +357,27 @@ jobs:

- name: Load env
id: env
run: echo "unityVersion=$(./scripts/ci-env.ps1 "unity${{ matrix.unity-version }}")" >> $env:GITHUB_OUTPUT
run: echo "unityVersion=$(./scripts/ci-env.ps1 "$env:UNITY_SCRIPT_ARG")" >> $env:GITHUB_OUTPUT
env:
UNITY_SCRIPT_ARG: unity${{ matrix.unity-version }}

- 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 }}"
- run: echo "::add-mask::\"$LICENSE_SERVER_URL\""
env:
LICENSE_SERVER_URL: ${{ 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 }}'
New-Item -Path "$env:UNITY_CONFIG_PATH" -ItemType Directory
Set-Content -Path "$UNITY_CONFIG_PATH\services-config.json" -Value "$env:UNITY_LICENSE_SERVER_CONFIG"
env:
UNITY_CONFIG_PATH: ${{ matrix.unity-config-path }}
UNITY_LICENSE_SERVER_CONFIG: ${{ secrets.UNITY_LICENSE_SERVER_CONFIG }}

- name: Download IntegrationTest project
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
Expand All @@ -367,7 +388,7 @@ jobs:
run: tar -xvzf test-project.tar.gz

- name: Build without Sentry SDK
run: ./test/Scripts.Integration.Test/build-project.ps1 -UnityPath "${{ env.UNITY_PATH }}"
run: ./test/Scripts.Integration.Test/build-project.ps1 -UnityPath "$env:UNITY_PATH"

- name: Download UPM package
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
Expand All @@ -378,13 +399,15 @@ jobs:
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 }}"
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
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 }}"
run: ./test/Scripts.Integration.Test/build-project.ps1 -UnityPath "$env:UNITY_PATH" -CheckSymbols -UnityVersion "$env:UNITY_VERSION"
env:
UNITY_VERSION: ${{ matrix.unity-version }}

- name: Run Smoke Test
run: ./test/Scripts.Integration.Test/run-smoke-test.ps1 -Smoke
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ jobs:
echo "submodules=src/sentry-dotnet $submodules" >> $GITHUB_OUTPUT
fi
- name: Get submodule status
run: git submodule status --cached ${{ steps.env.outputs.submodules }} | tee submodules-status
run: git submodule status --cached $SUBMODULES | tee submodules-status
shell: bash
env:
SUBMODULES: ${{ steps.env.outputs.submodules }}

- run: |
if [[ "${{ env.TARGET }}" == "Cocoa" ]]; then
Expand Down
18 changes: 11 additions & 7 deletions .github/workflows/smoke-test-build-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,18 @@ jobs:
name: ${{ inputs.unity-version }}
runs-on: ubuntu-latest-4-cores
env:
UNITY_PATH: docker exec unity unity-editor
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_SHA: ${{ github.sha }}
UNITY_PATH: docker exec unity unity-editor
UNITY_VERSION: ${{ inputs.unity-version }}

steps:
- name: Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3

- run: echo "::add-mask::${{ secrets.LICENSE_SERVER_URL }}"
- run: echo "::add-mask::\"$LICENSE_SERVER_URL\""
env:
LICENSE_SERVER_URL: ${{ secrets.LICENSE_SERVER_URL }}

- name: Docker Login
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # pinned v3
Expand All @@ -34,8 +36,10 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Start the Unity docker container
run: ./scripts/ci-docker.sh "${UNITY_VERSION}" 'android' '${{ secrets.UNITY_LICENSE_SERVER_CONFIG }}'
run: ./scripts/ci-docker.sh "$UNITY_VERSION" 'android' "$UNITY_LICENSE_SERVER_CONFIG"
shell: bash
env:
UNITY_LICENSE_SERVER_CONFIG: ${{ secrets.UNITY_LICENSE_SERVER_CONFIG }}

- name: Download IntegrationTest project
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
Expand All @@ -55,13 +59,13 @@ jobs:
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}"
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}" -Platform "Android" -CheckSymbols
run: ./test/Scripts.Integration.Test/configure-sentry.ps1 -UnityPath "$env:UNITY_PATH" -Platform "Android" -CheckSymbols

- 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" -CheckSymbols:$true -UnityVersion "$env:UNITY_VERSION"

- name: Upload .apk
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
Expand All @@ -78,7 +82,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" -CheckSymbols:$true -UnityVersion "$env:UNITY_VERSION"

- name: Upload .apk
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
Expand Down
24 changes: 17 additions & 7 deletions .github/workflows/smoke-test-build-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,18 @@ jobs:
check_symbols: false
build_platform: iOS
env:
UNITY_PATH: docker exec unity unity-editor
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_SHA: ${{ github.sha }}
UNITY_PATH: docker exec unity unity-editor
UNITY_VERSION: ${{ inputs.unity-version }}

steps:
- name: Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3

- run: echo "::add-mask::${{ secrets.LICENSE_SERVER_URL }}"
- run: echo "::add-mask::\"$LICENSE_SERVER_URL\""
env:
LICENSE_SERVER_URL: ${{ secrets.LICENSE_SERVER_URL }}

- name: Docker Login
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # pinned v3
Expand All @@ -40,8 +42,10 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Start the Unity docker container
run: ./scripts/ci-docker.sh "${UNITY_VERSION}" 'iOS' '${{ secrets.UNITY_LICENSE_SERVER_CONFIG }}'
run: ./scripts/ci-docker.sh "$UNITY_VERSION" "iOS" "$UNITY_LICENSE_SERVER_CONFIG"
shell: bash
env:
UNITY_LICENSE_SERVER_CONFIG: ${{ secrets.UNITY_LICENSE_SERVER_CONFIG }}

- name: Download IntegrationTest project
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
Expand All @@ -61,13 +65,17 @@ jobs:
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}"
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}" -Platform ${{ matrix.build_platform }} -CheckSymbols
run: ./test/Scripts.Integration.Test/configure-sentry.ps1 -UnityPath "$env:UNITY_PATH" -Platform "$env:BUILD_PLATFORM" -CheckSymbols
env:
BUILD_PLATFORM: ${{ matrix.build_platform }}

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

# We create tar explicitly because upload-artifact is slow for many files.
- name: Create archive
Expand All @@ -94,7 +102,9 @@ jobs:
Set-Content $optionsPath $content

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

- name: Create archive (build-time initialization)
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/smoke-test-compile-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
name: testapp-ios-${{ env.UNITY_VERSION }}-${{ env.INIT_TYPE }}

- name: Extract app project
run: tar -xvzf test-app-${env:INIT_TYPE}.tar.gz
run: tar -xvzf "test-app-$env:INIT_TYPE.tar.gz"

- name: iOS smoke test
run: ./scripts/smoke-test-ios.ps1 Build -IsIntegrationTest -UnityVersion "${env:UNITY_VERSION}" -iOSMinVersion "17.0"
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/smoke-test-create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,17 @@ jobs:
name: ${{ inputs.unity-version }}
runs-on: ubuntu-latest
env:
UNITY_PATH: docker exec unity unity-editor
GITHUB_ACTOR: ${{ github.actor }}
UNITY_PATH: docker exec unity unity-editor
UNITY_VERSION: ${{ inputs.unity-version }}

steps:
- name: Checkout
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3

- run: echo "::add-mask::${{ secrets.LICENSE_SERVER_URL }}"
- run: echo "::add-mask::\"$LICENSE_SERVER_URL\""
env:
LICENSE_SERVER_URL: ${{ secrets.LICENSE_SERVER_URL }}

- name: Docker Login
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # pinned v3
Expand All @@ -33,11 +35,13 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Start the Unity docker container
run: ./scripts/ci-docker.sh "${{ env.UNITY_VERSION }}" 'base' '${{ secrets.UNITY_LICENSE_SERVER_CONFIG }}'
run: ./scripts/ci-docker.sh "$UNITY_VERSION" 'base' "$UNITY_LICENSE_SERVER_CONFIG"
shell: bash
env:
UNITY_LICENSE_SERVER_CONFIG: ${{ secrets.UNITY_LICENSE_SERVER_CONFIG }}

- name: Create new Project
run: ./test/Scripts.Integration.Test/create-project.ps1 -UnityPath "${{ env.UNITY_PATH }}"
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
Expand Down
Loading