Skip to content

Conversation

@bitsandfoxes
Copy link
Contributor

@bitsandfoxes bitsandfoxes commented Nov 14, 2025

These improvements include but are not limited to

  • Fixing license parallelization
  • Fixing step naming
  • Added appropriate caching all over the place to speed up Unity builds
  • Added missing skip checks in places where caching works its magic

#skip-changelog

if [[ $unityPrefix -ge 2021 ]]; then
$suexec $container chmod -R 755 /opt/unity/Editor/Data/UnityReferenceAssemblies/
fi
$suexec $container chmod -R 755 /opt/unity/Editor/Data/UnityReferenceAssemblies/
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was failing with

./scripts/ci-docker.sh: line 53: [[: 6000.0: syntax error: invalid arithmetic operator (error token is ".0")

and we're running on 2021+ only anyway.

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
run: docker exec unity dotnet msbuild /t:UnityPlayModeTest /p:Configuration=Release /p:OutDir=other test/Sentry.Unity.Tests
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Running it twice was a leftover from a time where we had to manually set/replace the TestDsn. That's no longer needed.

DEBIAN_FRONTEND: noninteractive

- name: Install .NET SDK
if: ${{ steps.cache.outputs.cache-hit != 'true' }}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added missing skips if the cache was hit.

env:
UNITY_SCRIPT_ARG: unity${{ env.UNITY_VERSION }}

- run: echo "::add-mask::$LICENSE_SERVER_URL"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The masking does nothing

Can't add secret mask for empty string in ##[add-mask] command.

@bitsandfoxes bitsandfoxes marked this pull request as ready for review November 19, 2025 15:04
- name: Restore .NET Workload
run: dotnet workload restore

- name: Install Android dotnet workflow
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dotnet workload restore already does that for us

env:
LICENSE_SERVER_URL: ${{ secrets.LICENSE_SERVER_URL }}

- name: Restore Unity Packages
Copy link
Contributor Author

@bitsandfoxes bitsandfoxes Nov 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't even remember why we were trying to cache the packages only. But it doesn't work in any case:

Cache not found for input keys

We're just caching the full Library like in the rest of CI instead. This lets us skip the full on creation of the assetdatabase with every single run.

@bitsandfoxes bitsandfoxes requested a review from a team November 19, 2025 15:35
@bitsandfoxes bitsandfoxes merged commit 00f4f06 into main Nov 19, 2025
56 checks passed
@bitsandfoxes bitsandfoxes deleted the chore/ci-improvements branch November 19, 2025 17:22
@bitsandfoxes bitsandfoxes mentioned this pull request Nov 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants