Skip to content

Commit

Permalink
Disable the Unity builds
Browse files Browse the repository at this point in the history
  • Loading branch information
nirinchev committed Sep 9, 2024
1 parent 4d8d259 commit a7dae19
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 323 deletions.
13 changes: 7 additions & 6 deletions .github/pkl-workflows/helpers/Common.pkl
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,13 @@ const function defaultBuildJobs(netCoreVersions: Listing<NetFramework>): Mapping
}
}
[job_Unity] = Package.unity()
...TestJobs.unity(new TestJobs.UnityTestConfig {
os = "linux"
})
...TestJobs.unity(new TestJobs.UnityTestConfig {
os = "windows"
})
// TODO: https://github.com/realm/realm-dotnet/issues/3667 the Unity licensing server needs to be fixed before we can reenable these
// ...TestJobs.unity(new TestJobs.UnityTestConfig {
// os = "linux"
// })
// ...TestJobs.unity(new TestJobs.UnityTestConfig {
// os = "windows"
// })
["test-net-framework"] = TestJobs.netFramework()
["test-uwp"] = TestJobs.uwp()
["test-net-core"] = TestJobs.netCore(netCoreVersions)
Expand Down
2 changes: 1 addition & 1 deletion .github/pkl-workflows/helpers/Test.pkl
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ function uwp(): gha.StepJobBase = testJob(
})
new {
name = "Run the tests"
run = "./Tests/Tests.UWP/RunTests.ps1 -ExtraAppArgs"
run = "./Tests/Tests.UWP/RunTests.ps1"
shell = "powershell"
}
...reportTestResultsWithCustomFile("${{ env.TEST_RESULTS }}", config)
Expand Down
159 changes: 1 addition & 158 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -293,163 +293,6 @@ jobs:
path: Tests/Tests.Unity
retention-days: ${{ github.event_name != 'pull_request' && 30 || 1 }}
if-no-files-found: error
build-unity-tests-linux:
name: Build Unity linux
needs:
- build-packages
- build-unity
if: always() && !cancelled() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled')
timeout-minutes: 30
runs-on:
- unity
- linux
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
submodules: false
ref: ${{ github.event.pull_request.head.sha }}
- name: Register problem matchers
run: |-
echo "::add-matcher::.github/problem-matchers/csc.json"
echo "::add-matcher::.github/problem-matchers/msvc.json"
- name: Cleanup Workspace
run: git clean -fdx
- name: Fetch io.realm.unity-${{ needs.build-packages.outputs.package_version }}.tgz
uses: actions/download-artifact@v4
with:
name: io.realm.unity-${{ needs.build-packages.outputs.package_version }}.tgz
path: Realm/Realm.Unity
- name: Fetch UnityTests
uses: actions/download-artifact@v4
with:
name: UnityTests
path: Tests/Tests.Unity
- name: Build Unity Tests
run: unity-editor -runTests -batchmode -projectPath ${{ github.workspace }}/Tests/Tests.Unity -testPlatform StandaloneLinux64 -testSettingsFile ${{ github.workspace }}/Tests/Tests.Unity/.TestConfigs/Mono-Net4.json -logFile -
- name: Store artifacts for UnityTestsRunner.linux
uses: actions/upload-artifact@v4
with:
name: UnityTestsRunner.linux
path: Tests/Tests.Unity/Player_StandaloneLinux64_Mono-Net4/
retention-days: ${{ github.event_name != 'pull_request' && 30 || 1 }}
if-no-files-found: error
run-unity-tests-linux:
name: Test Unity linux
needs:
- build-unity-tests-linux
if: always() && !cancelled() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled')
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
submodules: false
ref: ${{ github.event.pull_request.head.sha }}
- name: Register problem matchers
run: |-
echo "::add-matcher::.github/problem-matchers/csc.json"
echo "::add-matcher::.github/problem-matchers/msvc.json"
- name: Fetch UnityTestsRunner.linux
uses: actions/download-artifact@v4
with:
name: UnityTestsRunner.linux
path: TestRunner
- name: Install xvfb
run: sudo apt install -y xvfb libglu1 libxcursor1
- name: Run Tests
run: |-
chmod +x ${{ github.workspace }}/TestRunner/PlayerWithTests.x86_64
xvfb-run --auto-servernum --server-args='-screen 0 640x480x24:32' ${{ github.workspace }}/TestRunner/PlayerWithTests.x86_64 -logFile - --result=${{ github.workspace }}/TestResults.xml
- name: Publish Unit Test Results
if: always()
uses: dorny/test-reporter@31a54ee7ebcacc03a09ea97a7e5465a47b84aea5
with:
name: Results Unity linux Mono-Net4
path: TestResults.xml
reporter: java-junit
list-suites: failed
path-replace-backslashes: true
fail-on-error: true
build-unity-tests-windows:
name: Build Unity windows
needs:
- build-packages
- build-unity
if: always() && !cancelled() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled')
timeout-minutes: 30
runs-on:
- unity
- windows
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
submodules: false
ref: ${{ github.event.pull_request.head.sha }}
- name: Register problem matchers
run: |-
echo "::add-matcher::.github/problem-matchers/csc.json"
echo "::add-matcher::.github/problem-matchers/msvc.json"
- name: Cleanup Workspace
run: git clean -fdx
- name: Fetch io.realm.unity-${{ needs.build-packages.outputs.package_version }}.tgz
uses: actions/download-artifact@v4
with:
name: io.realm.unity-${{ needs.build-packages.outputs.package_version }}.tgz
path: Realm/Realm.Unity
- name: Fetch UnityTests
uses: actions/download-artifact@v4
with:
name: UnityTests
path: Tests/Tests.Unity
- name: Build Unity Tests
run: unity-editor -runTests -batchmode -projectPath ${{ github.workspace }}/Tests/Tests.Unity -testPlatform StandaloneWindows64 -testSettingsFile ${{ github.workspace }}/Tests/Tests.Unity/.TestConfigs/Mono-Net4.json -logFile build.log
- name: Store artifacts for UnityTestsRunner.windows
uses: actions/upload-artifact@v4
with:
name: UnityTestsRunner.windows
path: Tests/Tests.Unity/Player_StandaloneWindows64_Mono-Net4/
retention-days: ${{ github.event_name != 'pull_request' && 30 || 1 }}
if-no-files-found: error
run-unity-tests-windows:
name: Test Unity windows
needs:
- build-unity-tests-windows
if: always() && !cancelled() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled')
timeout-minutes: 30
runs-on: windows-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
submodules: false
ref: ${{ github.event.pull_request.head.sha }}
- name: Register problem matchers
run: |-
echo "::add-matcher::.github/problem-matchers/csc.json"
echo "::add-matcher::.github/problem-matchers/msvc.json"
- name: Fetch UnityTestsRunner.windows
uses: actions/download-artifact@v4
with:
name: UnityTestsRunner.windows
path: TestRunner
- name: Run Tests
run: |-
Start-Process ${{ github.workspace }}\TestRunner\PlayerWithTests.exe -Wait -ArgumentList "-logFile","${{ github.workspace }}\test.log","--result=${{ github.workspace }}\TestResults.xml"
cat ${{ github.workspace }}\test.log
shell: pwsh
- name: Publish Unit Test Results
if: always()
uses: dorny/test-reporter@31a54ee7ebcacc03a09ea97a7e5465a47b84aea5
with:
name: Results Unity windows Mono-Net4
path: TestResults.xml
reporter: java-junit
list-suites: failed
path-replace-backslashes: true
fail-on-error: true
test-net-framework:
name: Test .NET Framework
needs:
Expand Down Expand Up @@ -524,7 +367,7 @@ jobs:
- name: Build Tests/Tests.UWP
run: msbuild Tests/Tests.UWP -restore -p:Configuration=Release -p:AppxBundle=Always -p:PackageCertificateKeyFile=${{ github.workspace }}\Tests\Tests.UWP\Tests.UWP_TemporaryKey.pfx -p:PackageCertificatePassword=${{ secrets.Pfx_Password }} -p:UseDotNetNativeToolchain=false -p:AppxBundlePlatforms=x64 -p:RestoreConfigFile=Tests/Test.NuGet.Config -p:UseRealmNupkgsWithVersion=${{ needs.build-packages.outputs.package_version }}
- name: Run the tests
run: ./Tests/Tests.UWP/RunTests.ps1 -ExtraAppArgs
run: ./Tests/Tests.UWP/RunTests.ps1
shell: powershell
- name: Publish Unit Test Results
if: always()
Expand Down
159 changes: 1 addition & 158 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -299,163 +299,6 @@ jobs:
path: Tests/Tests.Unity
retention-days: ${{ github.event_name != 'pull_request' && 30 || 1 }}
if-no-files-found: error
build-unity-tests-linux:
name: Build Unity linux
needs:
- build-packages
- build-unity
if: always() && !cancelled() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled')
timeout-minutes: 30
runs-on:
- unity
- linux
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
submodules: false
ref: ${{ github.event.pull_request.head.sha }}
- name: Register problem matchers
run: |-
echo "::add-matcher::.github/problem-matchers/csc.json"
echo "::add-matcher::.github/problem-matchers/msvc.json"
- name: Cleanup Workspace
run: git clean -fdx
- name: Fetch io.realm.unity-${{ needs.build-packages.outputs.package_version }}.tgz
uses: actions/download-artifact@v4
with:
name: io.realm.unity-${{ needs.build-packages.outputs.package_version }}.tgz
path: Realm/Realm.Unity
- name: Fetch UnityTests
uses: actions/download-artifact@v4
with:
name: UnityTests
path: Tests/Tests.Unity
- name: Build Unity Tests
run: unity-editor -runTests -batchmode -projectPath ${{ github.workspace }}/Tests/Tests.Unity -testPlatform StandaloneLinux64 -testSettingsFile ${{ github.workspace }}/Tests/Tests.Unity/.TestConfigs/Mono-Net4.json -logFile -
- name: Store artifacts for UnityTestsRunner.linux
uses: actions/upload-artifact@v4
with:
name: UnityTestsRunner.linux
path: Tests/Tests.Unity/Player_StandaloneLinux64_Mono-Net4/
retention-days: ${{ github.event_name != 'pull_request' && 30 || 1 }}
if-no-files-found: error
run-unity-tests-linux:
name: Test Unity linux
needs:
- build-unity-tests-linux
if: always() && !cancelled() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled')
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
submodules: false
ref: ${{ github.event.pull_request.head.sha }}
- name: Register problem matchers
run: |-
echo "::add-matcher::.github/problem-matchers/csc.json"
echo "::add-matcher::.github/problem-matchers/msvc.json"
- name: Fetch UnityTestsRunner.linux
uses: actions/download-artifact@v4
with:
name: UnityTestsRunner.linux
path: TestRunner
- name: Install xvfb
run: sudo apt install -y xvfb libglu1 libxcursor1
- name: Run Tests
run: |-
chmod +x ${{ github.workspace }}/TestRunner/PlayerWithTests.x86_64
xvfb-run --auto-servernum --server-args='-screen 0 640x480x24:32' ${{ github.workspace }}/TestRunner/PlayerWithTests.x86_64 -logFile - --result=${{ github.workspace }}/TestResults.xml
- name: Publish Unit Test Results
if: always()
uses: dorny/test-reporter@31a54ee7ebcacc03a09ea97a7e5465a47b84aea5
with:
name: Results Unity linux Mono-Net4
path: TestResults.xml
reporter: java-junit
list-suites: failed
path-replace-backslashes: true
fail-on-error: true
build-unity-tests-windows:
name: Build Unity windows
needs:
- build-packages
- build-unity
if: always() && !cancelled() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled')
timeout-minutes: 30
runs-on:
- unity
- windows
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
submodules: false
ref: ${{ github.event.pull_request.head.sha }}
- name: Register problem matchers
run: |-
echo "::add-matcher::.github/problem-matchers/csc.json"
echo "::add-matcher::.github/problem-matchers/msvc.json"
- name: Cleanup Workspace
run: git clean -fdx
- name: Fetch io.realm.unity-${{ needs.build-packages.outputs.package_version }}.tgz
uses: actions/download-artifact@v4
with:
name: io.realm.unity-${{ needs.build-packages.outputs.package_version }}.tgz
path: Realm/Realm.Unity
- name: Fetch UnityTests
uses: actions/download-artifact@v4
with:
name: UnityTests
path: Tests/Tests.Unity
- name: Build Unity Tests
run: unity-editor -runTests -batchmode -projectPath ${{ github.workspace }}/Tests/Tests.Unity -testPlatform StandaloneWindows64 -testSettingsFile ${{ github.workspace }}/Tests/Tests.Unity/.TestConfigs/Mono-Net4.json -logFile build.log
- name: Store artifacts for UnityTestsRunner.windows
uses: actions/upload-artifact@v4
with:
name: UnityTestsRunner.windows
path: Tests/Tests.Unity/Player_StandaloneWindows64_Mono-Net4/
retention-days: ${{ github.event_name != 'pull_request' && 30 || 1 }}
if-no-files-found: error
run-unity-tests-windows:
name: Test Unity windows
needs:
- build-unity-tests-windows
if: always() && !cancelled() && !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled')
timeout-minutes: 30
runs-on: windows-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
submodules: false
ref: ${{ github.event.pull_request.head.sha }}
- name: Register problem matchers
run: |-
echo "::add-matcher::.github/problem-matchers/csc.json"
echo "::add-matcher::.github/problem-matchers/msvc.json"
- name: Fetch UnityTestsRunner.windows
uses: actions/download-artifact@v4
with:
name: UnityTestsRunner.windows
path: TestRunner
- name: Run Tests
run: |-
Start-Process ${{ github.workspace }}\TestRunner\PlayerWithTests.exe -Wait -ArgumentList "-logFile","${{ github.workspace }}\test.log","--result=${{ github.workspace }}\TestResults.xml"
cat ${{ github.workspace }}\test.log
shell: pwsh
- name: Publish Unit Test Results
if: always()
uses: dorny/test-reporter@31a54ee7ebcacc03a09ea97a7e5465a47b84aea5
with:
name: Results Unity windows Mono-Net4
path: TestResults.xml
reporter: java-junit
list-suites: failed
path-replace-backslashes: true
fail-on-error: true
test-net-framework:
name: Test .NET Framework
needs:
Expand Down Expand Up @@ -530,7 +373,7 @@ jobs:
- name: Build Tests/Tests.UWP
run: msbuild Tests/Tests.UWP -restore -p:Configuration=Release -p:AppxBundle=Always -p:PackageCertificateKeyFile=${{ github.workspace }}\Tests\Tests.UWP\Tests.UWP_TemporaryKey.pfx -p:PackageCertificatePassword=${{ secrets.Pfx_Password }} -p:UseDotNetNativeToolchain=false -p:AppxBundlePlatforms=x64 -p:RestoreConfigFile=Tests/Test.NuGet.Config -p:UseRealmNupkgsWithVersion=${{ needs.build-packages.outputs.package_version }}
- name: Run the tests
run: ./Tests/Tests.UWP/RunTests.ps1 -ExtraAppArgs
run: ./Tests/Tests.UWP/RunTests.ps1
shell: powershell
- name: Publish Unit Test Results
if: always()
Expand Down

0 comments on commit a7dae19

Please sign in to comment.