-
-
Notifications
You must be signed in to change notification settings - Fork 53
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
Build in linux docker, test on supported platforms #563
Conversation
fe339cf
to
3482444
Compare
a26d4c8
to
028eec3
Compare
028eec3
to
0b9e288
Compare
8d0611c
to
f30e01f
Compare
8edeed5
to
67a7c89
Compare
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.
Some info for a future reviewer
with: | ||
path: samples/artifacts/builds | ||
# using hash of package.json to bust cache on release builds which modify it | ||
key: samples/artifacts/builds|${{ matrix.os }}-${{ matrix.unity-version }}-${{ matrix.unity-version-changeset }}-${{ hashFiles('package/package.json') }} |
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.
This was caching the android (smoke-test) player build but that doesn't make sense (with the key based only on the package.json) - we actually weren't testing the code changes made in the PRs if the cache key hit...
key: samples/unity-of-bugs/Library|${{ matrix.os }}-${{ matrix.unity-version }}-${{ matrix.unity-version-changeset }}-${{ hashFiles('samples/unity-of-bugs/Packages/packages-lock.json') }} | ||
path: | | ||
samples/unity-of-bugs/Library/Packages | ||
temp/unity-packages/Library/ScriptAssemblies/*.TestRunner.* |
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.
TestRunner wasn't cached - caching it speeds up (skips) UnityRestorePackages
target
- name: Integration Test - Create new Project | ||
shell: pwsh | ||
run: ./test/Scripts.Integration.Test/integration-create-project.ps1 "${{ env.UNITY_PATH }}" | ||
|
||
- name: Integration Test - Build Standalone Player without Sentry SDK | ||
shell: pwsh | ||
run: ./test/Scripts.Integration.Test/integration-build-project.ps1 "${{ env.UNITY_PATH }}" | ||
|
||
- name: Integration Test - Add Sentry to test project | ||
shell: pwsh | ||
run: ./test/Scripts.Integration.Test/integration-update-sentry.ps1 "${{ env.UNITY_PATH }}" | ||
|
||
- name: Integration Test - Build Standalone Player Sentry SDK | ||
shell: pwsh | ||
run: ./test/Scripts.Integration.Test/integration-build-project.ps1 "${{ env.UNITY_PATH }}" | ||
|
||
- name: Integration Test - Run Player - Smoke Test | ||
shell: pwsh | ||
run: ./test/Scripts.Integration.Test/integration-run-smoke-test.ps1 | ||
|
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.
moved to a separate windows-smoke-test
job below
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.
We need a Mac and Linux too for standalone. Less relevant until we have native support
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.
yes, seemed a bit pointless to run on those while they're not officially supported yet. Would just take away from the available github-actions runners' pool. So if you don't mind I'd also add them later when needed.
- name: Setup Unity | ||
uses: getsentry/setup-unity@46c2e082d98cc3a825a5b59038cb31705fe9ff56 | ||
with: | ||
unity-version: ${{ matrix.unity-version }} | ||
unity-version-changeset: ${{ matrix.unity-version-changeset }} | ||
unity-modules: windows-il2cpp |
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.
Windows runners can't use containers because of licensing & the limitations of Windows Server 2022 (no support for WSL2), see actions/runner#904
Therefore we stay with the standard unity setup here
@@ -60,6 +60,7 @@ public static void BuildIl2CPPPlayer(BuildTarget buildTarget) | |||
|
|||
public static void BuildWindowsIl2CPPPlayer() => BuildIl2CPPPlayer(BuildTarget.StandaloneWindows64); | |||
public static void BuildMacIl2CPPPlayer() => BuildIl2CPPPlayer(BuildTarget.StandaloneOSX); | |||
public static void BuildLinuxIl2CPPPlayer() => BuildIl2CPPPlayer(BuildTarget.StandaloneLinux64); |
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.
this ended up unused but I guess we can keep it for now. Later we can fix the smoke test on linux (currently times out)
@@ -228,19 +146,14 @@ jobs: | |||
- name: Configure Sentry via the Editor Window | |||
run: dotnet msbuild /t:UnityConfigureSentryOptions /p:Configuration=Release /p:OutDir=other src/Sentry.Unity | |||
|
|||
# TODO: can we make unity only prepare the project, without compiling it, to unlock the unity license faster? iOS is already built like that. |
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.
Yes please. Export gradle project.
Downside is that we don't cover some code path the one that uploads symbols when unity builds an apk. But we anyway have 2 paths to test
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.
We could do the other (=current) path later in another job later on. In any case I'd do this change in a followup PR.
- name: Integration Test - Create new Project | ||
shell: pwsh | ||
run: ./test/Scripts.Integration.Test/integration-create-project.ps1 "${{ env.UNITY_PATH }}" | ||
|
||
- name: Integration Test - Build Standalone Player without Sentry SDK | ||
shell: pwsh | ||
run: ./test/Scripts.Integration.Test/integration-build-project.ps1 "${{ env.UNITY_PATH }}" | ||
|
||
- name: Integration Test - Add Sentry to test project | ||
shell: pwsh | ||
run: ./test/Scripts.Integration.Test/integration-update-sentry.ps1 "${{ env.UNITY_PATH }}" | ||
|
||
- name: Integration Test - Build Standalone Player Sentry SDK | ||
shell: pwsh | ||
run: ./test/Scripts.Integration.Test/integration-build-project.ps1 "${{ env.UNITY_PATH }}" | ||
|
||
- name: Integration Test - Run Player - Smoke Test | ||
shell: pwsh | ||
run: ./test/Scripts.Integration.Test/integration-run-smoke-test.ps1 | ||
|
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.
We need a Mac and Linux too for standalone. Less relevant until we have native support
e62ff2c
to
7139691
Compare
See #449
Uses a linux+docker based Unity to prepare "build projects" for all platforms and then runs the actual build on the target platforms
#skip-changelog