Skip to content
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

ci: Change Unity UnitTest from Mono to IL2CPP and enabled on CI #603

Merged
merged 15 commits into from
Jul 30, 2024
Merged
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
67 changes: 47 additions & 20 deletions .github/workflows/build-debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,19 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: Cysharp/Actions/.github/actions/setup-dotnet@main
- run: dotnet build -c Debug
- run: dotnet test -c Debug

build-unity:
if: ${{ (github.event_name == 'push' && github.repository_owner == 'Cysharp') || startsWith(github.event.pull_request.head.label, 'Cysharp:') }}
strategy:
fail-fast: false
matrix:
unity: ["2019.3.9f1", "2019.4.13f1", "2020.1.12f1"]
unity: ["2021.3.41f1", "2022.3.39f1", "6000.0.12f1"] # Test with LTS
runs-on: ubuntu-latest
timeout-minutes: 15
timeout-minutes: 20
steps:
- name: Load secrets
id: op-load-secret
Expand All @@ -37,23 +38,7 @@ jobs:
UNITY_PASSWORD: "op://GitHubActionsPublic/UNITY_LICENSE/credential"
UNITY_SERIAL: "op://GitHubActionsPublic/UNITY_LICENSE/serial"

- uses: actions/checkout@v3
# Execute scripts: RuntimeUnitTestToolkit
# /opt/Unity/Editor/Unity -quit -batchmode -nographics -silent-crashes -logFile -projectPath . -executeMethod UnitTestBuilder.BuildUnitTest /headless /ScriptBackend mono /BuildTarget StandaloneLinux64
- name: Build UnitTest(Linux64, mono)
uses: Cysharp/Actions/.github/actions/unity-builder@main
env:
UNITY_EMAIL: ${{ steps.op-load-secret.outputs.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ steps.op-load-secret.outputs.UNITY_PASSWORD }}
UNITY_SERIAL: ${{ steps.op-load-secret.outputs.UNITY_SERIAL }}
with:
projectPath: src/UniTask
unityVersion: ${{ matrix.unity }}
targetPlatform: StandaloneLinux64
buildMethod: UnitTestBuilder.BuildUnitTest
customParameters: /headless /ScriptBackend mono
- name: Execute UnitTest
run: ./src/UniTask/bin/UnitTest/StandaloneLinux64_Mono2x/test
- uses: actions/checkout@v4

# Execute scripts: Export Package
# /opt/Unity/Editor/Unity -quit -batchmode -nographics -silent-crashes -logFile -projectPath . -executeMethod PackageExporter.Export
Expand All @@ -79,3 +64,45 @@ jobs:
name: UniTask.unitypackage-${{ matrix.unity }}.zip
path: ./src/UniTask/*.unitypackage
retention-days: 1

test-unity:
needs: [build-unity]
if: ${{ (github.event_name == 'push' && github.repository_owner == 'Cysharp') || startsWith(github.event.pull_request.head.label, 'Cysharp:') }}
strategy:
fail-fast: false
matrix:
unity: ["2021.3.41f1", "2022.3.39f1", "6000.0.12f1"] # Test with LTS
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Load secrets
id: op-load-secret
uses: 1password/load-secrets-action@v2
with:
export-env: false
env:
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN_PUBLIC }}
UNITY_EMAIL: "op://GitHubActionsPublic/UNITY_LICENSE/username"
UNITY_PASSWORD: "op://GitHubActionsPublic/UNITY_LICENSE/credential"
UNITY_SERIAL: "op://GitHubActionsPublic/UNITY_LICENSE/serial"

- uses: actions/checkout@v4

# Execute UnitTest
# /opt/Unity/Editor/Unity -quit -batchmode -nographics -silent-crashes -logFile -projectPath . -executeMethod UnitTestBuilder.BuildUnitTest /headless /ScriptBackend IL2CPP /BuildTarget StandaloneLinux64
- name: Build UnitTest
uses: Cysharp/Actions/.github/actions/unity-builder@main
env:
UNITY_EMAIL: ${{ steps.op-load-secret.outputs.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ steps.op-load-secret.outputs.UNITY_PASSWORD }}
UNITY_SERIAL: ${{ steps.op-load-secret.outputs.UNITY_SERIAL }}
with:
projectPath: src/UniTask
unityVersion: ${{ matrix.unity }}
targetPlatform: StandaloneLinux64
buildMethod: UnitTestBuilder.BuildUnitTest
customParameters: "/headless /ScriptBackend IL2CPP"
- name: Check UnitTest file is generated
run: ls -lR ./src/UniTask/bin/UnitTest
- name: Execute UnitTest
run: ./src/UniTask/bin/UnitTest/StandaloneLinux64_IL2CPP/test
4 changes: 2 additions & 2 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: Cysharp/DocfxTemplate
path: docs/_DocfxTemplate
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
timeout-minutes: 10
steps:
- run: echo ${{ needs.update-packagejson.outputs.sha }}
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ needs.update-packagejson.outputs.sha }}
- uses: Cysharp/Actions/.github/actions/setup-dotnet@main
Expand All @@ -45,7 +45,7 @@ jobs:
needs: [update-packagejson]
strategy:
matrix:
unity: ["2019.3.9f1"]
unity: ["2021.3.41f1"]
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
Expand All @@ -61,7 +61,7 @@ jobs:
UNITY_SERIAL: "op://GitHubActionsPublic/UNITY_LICENSE/serial"

- run: echo ${{ needs.update-packagejson.outputs.sha }}
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ needs.update-packagejson.outputs.sha }}
# Execute scripts: Export Package
Expand Down
118 changes: 5 additions & 113 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ _ReSharper*
*.ncrunch*
.*crunch*.local.xml

# Installshield output folder
# Installshield output folder
[Ee]xpress

# DocProject is a documentation generator add-in
Expand Down Expand Up @@ -148,116 +148,8 @@ UniRx\.Async\.unitypackage

UniRx.Async.Tests.Editor.csproj

src/UniTask/UniTask.csproj
src/UniTask/*.csproj
.vsconfig

src/UniTask/UniTask.Editor.csproj

src/UniTask/UniTask.Tests.csproj

src/UniTask/UniTask.Tests.Editor.csproj

src/UniTask/UniTask.*.unitypackage

src/UniTask/UniTask.Linq.csproj

src/UniTask/DOTween.Modules.csproj

src/UniTask/Unity.Addressables.csproj

src/UniTask/Unity.Addressables.Editor.csproj

src/UniTask/Unity.Analytics.DataPrivacy.csproj

src/UniTask/Unity.Recorder.csproj

src/UniTask/Unity.Recorder.Editor.csproj

src/UniTask/Unity.ResourceManager.csproj

src/UniTask/Unity.Rider.Editor.csproj

src/UniTask/Unity.ScriptableBuildPipeline.csproj

src/UniTask/Unity.ScriptableBuildPipeline.Editor.csproj

src/UniTask/Unity.TextMeshPro.csproj

src/UniTask/Unity.TextMeshPro.Editor.csproj

src/UniTask/Unity.Timeline.csproj

src/UniTask/Unity.Timeline.Editor.csproj

src/UniTask/Unity.VisualStudio.Editor.csproj

src/UniTask/Unity.VSCode.Editor.csproj

src/UniTask/UnityEditor.CacheServer.csproj

src/UniTask/UnityEditor.TestRunner.csproj

src/UniTask/UnityEditor.UI.csproj

src/UniTask/UnityEngine.Advertisements.csproj

src/UniTask/UnityEngine.Monetization.csproj

src/UniTask/UnityEngine.TestRunner.csproj

src/UniTask/UnityEngine.UI.csproj

src/UniTask/TempAsm.csproj

src/UniTask/UniTask.Addressables.csproj

src/UniTask/UniTask.DOTween.csproj

src/UniTask/UniTask.TextMeshPro.csproj

src/UniTask/RuntimeUnitTestToolkit.Player.csproj

src/UniTask/TempAsm.Player.csproj

src/UniTask/UniTask.Addressables.Player.csproj

src/UniTask/UniTask.DOTween.Player.csproj

src/UniTask/UniTask.Linq.Player.csproj

src/UniTask/UniTask.Player.csproj

src/UniTask/UniTask.Tests.Player.csproj

src/UniTask/UniTask.TextMeshPro.Player.csproj

src/UniTask/Unity.Addressables.Player.csproj

src/UniTask/Unity.Analytics.DataPrivacy.Player.csproj

src/UniTask/Unity.ResourceManager.Player.csproj

src/UniTask/Unity.ScriptableBuildPipeline.Player.csproj

src/UniTask/Unity.TextMeshPro.Player.csproj

src/UniTask/Unity.Timeline.Player.csproj

src/UniTask/UnityEngine.Advertisements.Player.csproj

src/UniTask/UnityEngine.Monetization.Player.csproj

src/UniTask/UnityEngine.TestRunner.Player.csproj

src/UniTask/UnityEngine.UI.Player.csproj

src/UniTask/DOTween.Modules.Player.csproj

src/UniTask/Assembly-CSharp.Player.csproj

src/UniTask/Unity.EditorCoroutines.Editor.csproj

src/UniTask/.vsconfig

src/UniTask/Logs/ApiUpdaterCheck.txt

src/UniTask/Assembly-CSharp-firstpass.csproj
# Unity
!src/UniTask/Packages/
8 changes: 0 additions & 8 deletions src/UniTask/Assets/RuntimeUnitTestToolkit.meta

This file was deleted.

8 changes: 0 additions & 8 deletions src/UniTask/Assets/RuntimeUnitTestToolkit/Editor.meta

This file was deleted.

Loading
Loading