-
-
Notifications
You must be signed in to change notification settings - Fork 60
chore: CI Improvements #2422
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
chore: CI Improvements #2422
Changes from 15 commits
61dee56
8432fb5
6298ae5
9c23372
de1023e
76d8ea4
ec2cc65
203f9aa
b35deee
da395a9
83a64c7
885411a
a3be626
8acfbc0
3569082
1a14819
9f0d932
088aa6d
5b61cb1
614173d
4113193
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -29,6 +29,16 @@ jobs: | |
| - name: Checkout | ||
| uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 | ||
|
|
||
| - name: Free Disk Space (Ubuntu) | ||
| uses: jlumbroso/free-disk-space@f68fdb76e2ea636224182cfb7377ff9a1708f9b8 # v1.3.0 | ||
| with: | ||
| android: true | ||
| dotnet: false | ||
| haskell: true | ||
| large-packages: false | ||
| docker-images: false | ||
| swap-storage: true | ||
|
|
||
| - name: Checkout submodules | ||
| run: git submodule update --init --recursive src/sentry-dotnet | ||
|
|
||
|
|
@@ -72,11 +82,6 @@ jobs: | |
| - name: Restore .NET Workload | ||
| run: dotnet workload restore | ||
|
|
||
| - name: Install Android dotnet workflow | ||
| run: dotnet workload install android --temp-dir "$RUNNER_TEMP" | ||
| env: | ||
| RUNNER_TEMP: ${{ env.RUNNER_TEMP }} | ||
|
|
||
| - name: Download CLI | ||
| run: ./scripts/download-sentry-cli.ps1 | ||
|
|
||
|
|
@@ -134,9 +139,7 @@ jobs: | |
| package-release.zip | ||
|
|
||
| - 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 | ||
| run: docker exec unity dotnet msbuild /t:UnityPlayModeTest /p:Configuration=Release /p:OutDir=other test/Sentry.Unity.Tests | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
|
|
||
| - name: Run Unity tests (editmode) | ||
| run: docker exec unity dotnet msbuild /t:UnityEditModeTest /p:Configuration=Release /p:OutDir=other test/Sentry.Unity.Editor.Tests | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -81,11 +81,13 @@ jobs: | |
| DEBIAN_FRONTEND: noninteractive | ||
|
|
||
| - name: Install .NET SDK | ||
| if: ${{ steps.cache.outputs.cache-hit != 'true' }} | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added missing skips if the cache was hit. |
||
| uses: actions/setup-dotnet@d4c94342e560b34958eacfc5d055d21461ed1c5d # v5 | ||
| with: | ||
| global-json-file: global.json | ||
|
|
||
| - name: Restore .NET Workload | ||
| if: ${{ steps.cache.outputs.cache-hit != 'true' }} | ||
| run: dotnet workload restore | ||
|
|
||
| - name: Build | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,6 +39,10 @@ docker run -td --name $container \ | |
| -e GITHUB_ACTIONS="${GITHUB_ACTIONS}" \ | ||
| --workdir /sentry-unity $image | ||
|
|
||
| # Generate unique machine-id to avoid any hardcoded values and license-fetch congestion | ||
| $suexec $container rm -f /etc/machine-id | ||
| $suexec $container dbus-uuidgen --ensure=/etc/machine-id | ||
|
|
||
| $suexec $container groupadd -g $gid $user | ||
| $suexec $container useradd -u $uid -g $gid --create-home $user | ||
|
|
||
|
|
@@ -50,9 +54,7 @@ echo $licenseConfig | $suexec -i $container sh -c "cat > /usr/share/unity3d/conf | |
| $suexec $container chown -R $uid /usr/share/unity3d/config/ | ||
|
|
||
| # Unity 2021+ tries to write to this directory during asset import... | ||
| 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/ | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was failing with and we're running on |
||
|
|
||
| echo "Container started successfully: " | ||
| docker ps --filter "name=^/$container$" | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dotnet workload restorealready does that for us