From a7dae198c30a921939f4201992c180a3d8d559e2 Mon Sep 17 00:00:00 2001 From: Nikola Irinchev Date: Mon, 9 Sep 2024 15:24:05 +0200 Subject: [PATCH] Disable the Unity builds --- .github/pkl-workflows/helpers/Common.pkl | 13 +- .github/pkl-workflows/helpers/Test.pkl | 2 +- .github/workflows/main.yml | 159 +---------------------- .github/workflows/pr.yml | 159 +---------------------- 4 files changed, 10 insertions(+), 323 deletions(-) diff --git a/.github/pkl-workflows/helpers/Common.pkl b/.github/pkl-workflows/helpers/Common.pkl index 4bccf3a88..444688ac9 100644 --- a/.github/pkl-workflows/helpers/Common.pkl +++ b/.github/pkl-workflows/helpers/Common.pkl @@ -59,12 +59,13 @@ const function defaultBuildJobs(netCoreVersions: Listing): 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) diff --git a/.github/pkl-workflows/helpers/Test.pkl b/.github/pkl-workflows/helpers/Test.pkl index 99aa33361..d7a702748 100644 --- a/.github/pkl-workflows/helpers/Test.pkl +++ b/.github/pkl-workflows/helpers/Test.pkl @@ -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) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e79619e41..ac01a71b5 100755 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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: @@ -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() diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index e423abef1..4df2d29b1 100755 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -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: @@ -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()