From 2a89bfadf0a0ccaaa28e46270dc69e1905b53710 Mon Sep 17 00:00:00 2001 From: Agnieszka Besz Date: Fri, 31 Jan 2025 16:32:03 +0000 Subject: [PATCH 1/7] chore: run test on windows --- .github/workflows/test.yml | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4e8f4aa929..5bc015cf99 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,7 +24,7 @@ jobs: test: if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || (github.event.pull_request.draft == false) || (github.event.label.name == 'force-build') name: Test - runs-on: Ubuntu-Big + runs-on: windows-latest steps: - name: Checkout code @@ -85,7 +85,7 @@ jobs: # Configure test runner - - uses: game-ci/unity-test-runner@v4.1.1 + - uses: game-ci/unity-test-runner@v4.3.1 id: testRunner timeout-minutes: 30 continue-on-error: true @@ -96,19 +96,17 @@ jobs: - name: Convert NUnit to JUnit if: always() run: | - mkdir -p ${{ steps.testRunner.outputs.artifactsPath }}-junit - sudo rm /etc/apt/sources.list.d/microsoft-prod.list - sudo apt-get update - sudo apt-get install -y xsltproc - sudo xsltproc \ - --output ${{ steps.testRunner.outputs.artifactsPath }}-junit/playmode-results-junit.xml \ - .github/workflows/nunit-to-junit.xsl \ - ${{ steps.testRunner.outputs.artifactsPath }}/playmode-results.xml \ + New-Item -ItemType Directory -Force -Path "${{ steps.testRunner.outputs.artifactsPath }}-junit" + choco install xsltproc + xsltproc ` + --output "${{ steps.testRunner.outputs.artifactsPath }}-junit/playmode-results-junit.xml" ` + .github/workflows/nunit-to-junit.xsl ` + "${{ steps.testRunner.outputs.artifactsPath }}/playmode-results.xml" - sudo xsltproc \ - --output ${{ steps.testRunner.outputs.artifactsPath }}-junit/editmode-results-junit.xml \ - .github/workflows/nunit-to-junit.xsl \ - ${{ steps.testRunner.outputs.artifactsPath }}/editmode-results.xml + xsltproc ` + --output "${{ steps.testRunner.outputs.artifactsPath }}-junit/editmode-results-junit.xml" ` + .github/workflows/nunit-to-junit.xsl ` + "${{ steps.testRunner.outputs.artifactsPath }}/editmode-results.xml" - name: Report test results uses: decentraland/test-reporting@v0.3 From 997bb2aeeef1f1f85412f5e54d5730219cd79a30 Mon Sep 17 00:00:00 2001 From: Agnieszka Besz Date: Fri, 31 Jan 2025 17:14:38 +0000 Subject: [PATCH 2/7] Fixed add GitHub to the SSH known hosts file --- .github/workflows/test.yml | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5bc015cf99..8544e211b0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,7 +22,7 @@ concurrency: jobs: test: - if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || (github.event.pull_request.draft == false) || (github.event.label.name == 'force-build') + if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || (github.event.pull_request.draft == false) || (github.event.label.name == 'force-build') || (github.event.label.name == 'clean-build') name: Test runs-on: windows-latest steps: @@ -61,15 +61,22 @@ jobs: - name: 'Add GitHub to the SSH known hosts file' run: | - sshPath="$HOME/.ssh" - if [ ! -d "$sshPath" ]; then - mkdir -p "$sshPath" - fi - - knownHostsPath="$sshPath/known_hosts" - curl -s 'https://api.github.com/meta' | jq -r '.ssh_keys[] | "github.com " + .' >> "$knownHostsPath" - chmod 600 "$knownHostsPath" + $sshPath = Join-Path $env:USERPROFILE ".ssh" + if (-not (Test-Path $sshPath)) { + New-Item -ItemType Directory -Path $sshPath -Force + } + $knownHostsPath = Join-Path $sshPath "known_hosts" + $githubKeys = (Invoke-RestMethod -Uri 'https://api.github.com/meta').ssh_keys + $githubKeys | ForEach-Object { "github.com $_" } | Out-File -FilePath $knownHostsPath -Append + + # Set permissions (600 in Windows terms) + $acl = Get-Acl $knownHostsPath + $acl.SetAccessRuleProtection($true, $false) + $rule = New-Object System.Security.AccessControl.FileSystemAccessRule($env:USERNAME, "Read, Write", "Allow") + $acl.AddAccessRule($rule) + Set-Acl $knownHostsPath $acl + - name: Clone Packages To Use Locally run: | git clone git@github.com:decentraland/unity-explorer-packages.git From ab57a2190c7974e940e14eb484e2fe531e557227 Mon Sep 17 00:00:00 2001 From: Agnieszka Besz Date: Fri, 31 Jan 2025 17:28:12 +0000 Subject: [PATCH 3/7] Fixed Clone Packages To Use Locally step --- .github/workflows/test.yml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8544e211b0..d9448ee4ca 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -80,15 +80,17 @@ jobs: - name: Clone Packages To Use Locally run: | git clone git@github.com:decentraland/unity-explorer-packages.git - jsonFilePath="Explorer/Packages/manifest.json" - sed -i 's|git@github.com:decentraland/unity-explorer-packages.git?path=/StylizedGrassShader|file:../../unity-explorer-packages/StylizedGrassShader|' "$jsonFilePath" - sed -i 's|git@github.com:decentraland/unity-explorer-packages.git?path=/StylizedWater2|file:../../unity-explorer-packages/StylizedWater2|' "$jsonFilePath" - sed -i 's|git@github.com:decentraland/unity-explorer-packages.git?path=/AVProVideo|file:../../unity-explorer-packages/AVProVideo|' "$jsonFilePath" - sed -i 's|git@github.com:decentraland/unity-explorer-packages.git?path=/SuperScrollView|file:../../unity-explorer-packages/SuperScrollView|' "$jsonFilePath" - sed -i 's|git@github.com:decentraland/unity-explorer-packages.git?path=/SoftMask|file:../../unity-explorer-packages/SoftMask|' "$jsonFilePath" - ls -l - # Display the content of manifest.json - cat "$jsonFilePath" + $jsonFilePath = "Explorer/Packages/manifest.json" + (Get-Content $jsonFilePath) ` + -replace 'git@github.com:decentraland/unity-explorer-packages.git\?path=/StylizedGrassShader', 'file:../../unity-explorer-packages/StylizedGrassShader' ` + -replace 'git@github.com:decentraland/unity-explorer-packages.git\?path=/StylizedWater2', 'file:../../unity-explorer-packages/StylizedWater2' ` + -replace 'git@github.com:decentraland/unity-explorer-packages.git\?path=/AVProVideo', 'file:../../unity-explorer-packages/AVProVideo' ` + -replace 'git@github.com:decentraland/unity-explorer-packages.git\?path=/SuperScrollView', 'file:../../unity-explorer-packages/SuperScrollView' ` + -replace 'git@github.com:decentraland/unity-explorer-packages.git\?path=/SoftMask', 'file:../../unity-explorer-packages/SoftMask' | + Set-Content $jsonFilePath + + Get-ChildItem + Get-Content $jsonFilePath # Configure test runner From b9d2ccd6b556355228ce67d939e36a284fcf94f7 Mon Sep 17 00:00:00 2001 From: Agnieszka Besz Date: Mon, 3 Feb 2025 12:07:55 +0000 Subject: [PATCH 4/7] Increase the timeout --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d9448ee4ca..82ca82807c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -96,7 +96,7 @@ jobs: # Configure test runner - uses: game-ci/unity-test-runner@v4.3.1 id: testRunner - timeout-minutes: 30 + timeout-minutes: 60 continue-on-error: true with: projectPath: Explorer From aa4bfd9108a24d60edd1f9ed77b421248df9792c Mon Sep 17 00:00:00 2001 From: Juan Ignacio Molteni Date: Mon, 10 Feb 2025 16:15:58 -0300 Subject: [PATCH 5/7] Testing SetData Signed-off-by: Juan Ignacio Molteni --- .../AvatarShape/ComputeShader/ComputeShaderSkinning.cs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/ComputeShader/ComputeShaderSkinning.cs b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/ComputeShader/ComputeShaderSkinning.cs index 67f22d0bd8..aac4aa8423 100644 --- a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/ComputeShader/ComputeShaderSkinning.cs +++ b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/ComputeShader/ComputeShaderSkinning.cs @@ -55,12 +55,7 @@ private static ComputeSkinningBufferContainer CreateBufferContainer(int vertCoun { //Note (Juani): Using too many BeginWrite in Mac caused a crash. So I ve set up this switch that changes the way in which we //set up the buffers depending on the platform - -#if UNITY_STANDALONE_WIN - return new ComputeSkinningBufferContainerWrite(vertCount, skinnedMeshRendererBoneCount); -#else return new ComputeSkinningBufferContainerSetData(vertCount, skinnedMeshRendererBoneCount); -#endif } private AvatarCustomSkinningComponent.Buffers SetupComputeShader(IReadOnlyList meshesData, UnityEngine.ComputeShader skinningShader, int vertCount, int skinnedMeshRendererBoneCount) From 42ec6b9d37ff2ae3ccbd10ee3e5582184c5f5410 Mon Sep 17 00:00:00 2001 From: Juan Ignacio Molteni Date: Mon, 10 Feb 2025 17:09:48 -0300 Subject: [PATCH 6/7] Rollback Signed-off-by: Juan Ignacio Molteni --- .../AvatarShape/ComputeShader/ComputeShaderSkinning.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/ComputeShader/ComputeShaderSkinning.cs b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/ComputeShader/ComputeShaderSkinning.cs index aac4aa8423..67f22d0bd8 100644 --- a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/ComputeShader/ComputeShaderSkinning.cs +++ b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/ComputeShader/ComputeShaderSkinning.cs @@ -55,7 +55,12 @@ private static ComputeSkinningBufferContainer CreateBufferContainer(int vertCoun { //Note (Juani): Using too many BeginWrite in Mac caused a crash. So I ve set up this switch that changes the way in which we //set up the buffers depending on the platform + +#if UNITY_STANDALONE_WIN + return new ComputeSkinningBufferContainerWrite(vertCount, skinnedMeshRendererBoneCount); +#else return new ComputeSkinningBufferContainerSetData(vertCount, skinnedMeshRendererBoneCount); +#endif } private AvatarCustomSkinningComponent.Buffers SetupComputeShader(IReadOnlyList meshesData, UnityEngine.ComputeShader skinningShader, int vertCount, int skinnedMeshRendererBoneCount) From 032bcabde76db9820ffb908768b88cbbf478896c Mon Sep 17 00:00:00 2001 From: Ansis Date: Tue, 11 Feb 2025 13:22:34 +0100 Subject: [PATCH 7/7] Ignore the avatar instantiator tests --- .../Tests/Instantiate/AvatarInstantiatorSystemShould.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/Instantiate/AvatarInstantiatorSystemShould.cs b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/Instantiate/AvatarInstantiatorSystemShould.cs index 5974292a1f..db792ec9a1 100644 --- a/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/Instantiate/AvatarInstantiatorSystemShould.cs +++ b/Explorer/Assets/DCL/AvatarRendering/AvatarShape/Tests/Instantiate/AvatarInstantiatorSystemShould.cs @@ -35,6 +35,7 @@ namespace DCL.AvatarRendering.AvatarShape.Tests.Instantiate { + [Ignore("This test fails on the GameCI runner because it calls Unity with -nographics. Ignore until we figure out what to do.")] public class AvatarInstantiatorSystemShould : UnitySystemTestBase { private Entity avatarEntity;