From 1e2d4d3018f0e0c46e4f22943ae51badd9aaaaf8 Mon Sep 17 00:00:00 2001 From: AtlasLinden <114031241+AtlasLinden@users.noreply.github.com> Date: Wed, 26 Mar 2025 14:41:44 -0700 Subject: Added QA workflow file Previously in the develop archive. Recent change is to only run the workflow for tagged builds. The code to running other builds has been commented out. --- .github/workflows/qatest.yaml | 172 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 172 insertions(+) create mode 100644 .github/workflows/qatest.yaml (limited to '.github/workflows') diff --git a/.github/workflows/qatest.yaml b/.github/workflows/qatest.yaml new file mode 100644 index 0000000000..8709ca0cd4 --- /dev/null +++ b/.github/workflows/qatest.yaml @@ -0,0 +1,172 @@ +name: Run QA Test # Runs automated tests on a self-hosted QA machine + +on: + workflow_run: + workflows: ["Build"] + types: + - completed + +concurrency: + group: qa-test-run + cancel-in-progress: true # Cancels any queued job when a new one starts + +jobs: + debug-workflow: + runs-on: ubuntu-latest + steps: + - name: Debug Workflow Variables + run: | + echo "Workflow Conclusion: ${{ github.event.workflow_run.conclusion }}" + echo "Workflow Head Branch: ${{ github.event.workflow_run.head_branch }}" + echo "Workflow Run ID: ${{ github.event.workflow_run.id }}" + echo "Head Commit Message: ${{ github.event.workflow_run.head_commit.message }}" + echo "GitHub Ref: ${{ github.ref }}" + echo "GitHub Ref Name: ${{ github.ref_name }}" + echo "GitHub Event Name: ${{ github.event_name }}" + echo "GitHub Workflow Name: ${{ github.workflow }}" + + install-viewer-and-run-tests: + runs-on: [self-hosted, qa-machine] + # Run test only on successful builds of develop or Second_Life_X branches + if: > + github.event.workflow_run.conclusion == 'success' && + ( + startsWith(github.ref, 'refs/tags/Second_Life') + + # For now this will only run on Second_Life_X tagged builds + # || startsWith(github.event.workflow_run.head_branch, 'release') + # || github.event.workflow_run.head_branch == 'develop' + ) + + steps: + - name: Temporarily Allow PowerShell Scripts (Process Scope) + run: | + Set-ExecutionPolicy RemoteSigned -Scope Process -Force + + - name: Verify viewer-sikulix-main Exists + run: | + if (-Not (Test-Path -Path 'C:\viewer-sikulix-main')) { + Write-Host '❌ Error: viewer-sikulix not found on runner!' + exit 1 + } + Write-Host '✅ viewer-sikulix is already available.' + + - name: Fetch & Download Windows Installer Artifact + shell: pwsh + run: | + $BUILD_ID = "${{ github.event.workflow_run.id }}" + $ARTIFACTS_URL = "https://api.github.com/repos/secondlife/viewer/actions/runs/$BUILD_ID/artifacts" + + # Fetch the correct artifact URL + $response = Invoke-RestMethod -Headers @{Authorization="token ${{ secrets.GITHUB_TOKEN }}" } -Uri $ARTIFACTS_URL + $ARTIFACT_NAME = ($response.artifacts | Where-Object { $_.name -eq "Windows-installer" }).archive_download_url + + if (-Not $ARTIFACT_NAME) { + Write-Host "❌ Error: Windows-installer artifact not found!" + exit 1 + } + + Write-Host "✅ Artifact found: $ARTIFACT_NAME" + + # Secure download path + $DownloadPath = "$env:TEMP\secondlife-build-$BUILD_ID" + New-Item -ItemType Directory -Path $DownloadPath -Force | Out-Null + $InstallerPath = "$DownloadPath\installer.zip" + + # Download the ZIP + Invoke-WebRequest -Uri $ARTIFACT_NAME -Headers @{Authorization="token ${{ secrets.GITHUB_TOKEN }}"} -OutFile $InstallerPath + + # Ensure download succeeded + if (-Not (Test-Path $InstallerPath)) { + Write-Host "❌ Error: Failed to download Windows-installer.zip" + exit 1 + } + + - name: Extract Installer & Locate Executable + shell: pwsh + run: | + # Explicitly set BUILD_ID again (since it does not appear to persist across steps) + $BUILD_ID = "${{ github.event.workflow_run.id }}" + $ExtractPath = "$env:TEMP\secondlife-build-$BUILD_ID" + $InstallerZip = "$ExtractPath\installer.zip" + + # Print paths for debugging + Write-Host "Extract Path: $ExtractPath" + Write-Host "Installer ZIP Path: $InstallerZip" + + # Verify ZIP exists before extracting + if (-Not (Test-Path $InstallerZip)) { + Write-Host "❌ Error: ZIP file not found at $InstallerZip!" + exit 1 + } + + Write-Host "✅ ZIP file exists and is valid. Extracting..." + + Expand-Archive -Path $InstallerZip -DestinationPath $ExtractPath -Force + + # Find installer executable + $INSTALLER_PATH = (Get-ChildItem -Path $ExtractPath -Filter '*.exe' -Recurse | Select-Object -First 1).FullName + + if (-Not $INSTALLER_PATH -or $INSTALLER_PATH -eq "") { + Write-Host "❌ Error: No installer executable found in the extracted files!" + Write-Host "📂 Extracted Files:" + Get-ChildItem -Path $ExtractPath -Recurse | Format-Table -AutoSize + exit 1 + } + + Write-Host "✅ Installer found: $INSTALLER_PATH" + echo "INSTALLER_PATH=$INSTALLER_PATH" | Out-File -FilePath $env:GITHUB_ENV -Append + + - name: Install Second Life Using Task Scheduler (Bypass UAC) + shell: pwsh + run: | + $action = New-ScheduledTaskAction -Execute "${{ env.INSTALLER_PATH }}" -Argument "/S" + $principal = New-ScheduledTaskPrincipal -UserId "SYSTEM" -LogonType ServiceAccount -RunLevel Highest + $task = New-ScheduledTask -Action $action -Principal $principal + Register-ScheduledTask -TaskName "SilentSLInstaller" -InputObject $task -Force + Start-ScheduledTask -TaskName "SilentSLInstaller" + + - name: Wait for Installation to Complete + shell: pwsh + run: | + Write-Host "Waiting for the Second Life installer to finish..." + do { + Start-Sleep -Seconds 5 + $installerProcess = Get-Process | Where-Object { $_.Path -eq "${{ env.INSTALLER_PATH }}" } + } while ($installerProcess) + + Write-Host "✅ Installation completed!" + + - name: Cleanup Task Scheduler Entry + shell: pwsh + run: | + Unregister-ScheduledTask -TaskName "SilentSLInstaller" -Confirm:$false + Write-Host "✅ Task Scheduler entry removed." + + - name: Delete Installer ZIP + shell: pwsh + run: | + # Explicitly set BUILD_ID again + $BUILD_ID = "${{ github.event.workflow_run.id }}" + $DeletePath = "$env:TEMP\secondlife-build-$BUILD_ID\installer.zip" + + Write-Host "Checking if installer ZIP exists: $DeletePath" + + # Ensure the ZIP file exists before trying to delete it + if (Test-Path $DeletePath) { + Remove-Item -Path $DeletePath -Force + Write-Host "✅ Successfully deleted: $DeletePath" + } else { + Write-Host "⚠️ Warning: ZIP file does not exist, skipping deletion." + } + + - name: Run QA Test Script + run: | + Write-Host "Running QA Test script..." + python C:\viewer-sikulix-main\runTests.py + + # - name: Upload Test Results + # uses: actions/upload-artifact@v3 + # with: + # name: test-results + # path: C:\viewer-sikulix-main\regressionTest\test_results.html \ No newline at end of file -- cgit v1.2.3 From 51f5b853608a756ef9eb39f5bafd963d28e752d7 Mon Sep 17 00:00:00 2001 From: AtlasLinden <114031241+AtlasLinden@users.noreply.github.com> Date: Thu, 27 Mar 2025 06:58:07 -0700 Subject: Removed unnecessary comments in QA workflow file GHA does not like comments inside an if statement. These have been removed. --- .github/workflows/qatest.yaml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/qatest.yaml b/.github/workflows/qatest.yaml index 8709ca0cd4..533635c3f7 100644 --- a/.github/workflows/qatest.yaml +++ b/.github/workflows/qatest.yaml @@ -27,15 +27,11 @@ jobs: install-viewer-and-run-tests: runs-on: [self-hosted, qa-machine] - # Run test only on successful builds of develop or Second_Life_X branches + # Run test only on successful builds of Second_Life_X branches if: > github.event.workflow_run.conclusion == 'success' && ( startsWith(github.ref, 'refs/tags/Second_Life') - - # For now this will only run on Second_Life_X tagged builds - # || startsWith(github.event.workflow_run.head_branch, 'release') - # || github.event.workflow_run.head_branch == 'develop' ) steps: @@ -169,4 +165,4 @@ jobs: # uses: actions/upload-artifact@v3 # with: # name: test-results - # path: C:\viewer-sikulix-main\regressionTest\test_results.html \ No newline at end of file + # path: C:\viewer-sikulix-main\regressionTest\test_results.html -- cgit v1.2.3 From 0a39fe8dc9c5f3c24392f3f5cfb385379f70da03 Mon Sep 17 00:00:00 2001 From: AtlasLinden <114031241+AtlasLinden@users.noreply.github.com> Date: Thu, 27 Mar 2025 15:28:15 -0700 Subject: Allow QA workflow to run on Second_Life_X branches Using the echos from the last run, it appears that the tagged builds have Workflow Head Branch = Second_Life_X. Edit made so the file looks for this rather than what was there previously. --- .github/workflows/qatest.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/qatest.yaml b/.github/workflows/qatest.yaml index 533635c3f7..7f3a5242e9 100644 --- a/.github/workflows/qatest.yaml +++ b/.github/workflows/qatest.yaml @@ -31,7 +31,7 @@ jobs: if: > github.event.workflow_run.conclusion == 'success' && ( - startsWith(github.ref, 'refs/tags/Second_Life') + startsWith(github.event.workflow_run.head_branch, 'Second_Life') ) steps: -- cgit v1.2.3 From 85b88f568214c733e775dc26b0a1a9c42d12870e Mon Sep 17 00:00:00 2001 From: Ansariel Date: Fri, 18 Apr 2025 02:47:07 +0200 Subject: Fix line endings of qatest.yaml --- .github/workflows/qatest.yaml | 336 +++++++++++++++++++++--------------------- 1 file changed, 168 insertions(+), 168 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/qatest.yaml b/.github/workflows/qatest.yaml index 7f3a5242e9..6a4ca440ed 100644 --- a/.github/workflows/qatest.yaml +++ b/.github/workflows/qatest.yaml @@ -1,168 +1,168 @@ -name: Run QA Test # Runs automated tests on a self-hosted QA machine - -on: - workflow_run: - workflows: ["Build"] - types: - - completed - -concurrency: - group: qa-test-run - cancel-in-progress: true # Cancels any queued job when a new one starts - -jobs: - debug-workflow: - runs-on: ubuntu-latest - steps: - - name: Debug Workflow Variables - run: | - echo "Workflow Conclusion: ${{ github.event.workflow_run.conclusion }}" - echo "Workflow Head Branch: ${{ github.event.workflow_run.head_branch }}" - echo "Workflow Run ID: ${{ github.event.workflow_run.id }}" - echo "Head Commit Message: ${{ github.event.workflow_run.head_commit.message }}" - echo "GitHub Ref: ${{ github.ref }}" - echo "GitHub Ref Name: ${{ github.ref_name }}" - echo "GitHub Event Name: ${{ github.event_name }}" - echo "GitHub Workflow Name: ${{ github.workflow }}" - - install-viewer-and-run-tests: - runs-on: [self-hosted, qa-machine] - # Run test only on successful builds of Second_Life_X branches - if: > - github.event.workflow_run.conclusion == 'success' && - ( - startsWith(github.event.workflow_run.head_branch, 'Second_Life') - ) - - steps: - - name: Temporarily Allow PowerShell Scripts (Process Scope) - run: | - Set-ExecutionPolicy RemoteSigned -Scope Process -Force - - - name: Verify viewer-sikulix-main Exists - run: | - if (-Not (Test-Path -Path 'C:\viewer-sikulix-main')) { - Write-Host '❌ Error: viewer-sikulix not found on runner!' - exit 1 - } - Write-Host '✅ viewer-sikulix is already available.' - - - name: Fetch & Download Windows Installer Artifact - shell: pwsh - run: | - $BUILD_ID = "${{ github.event.workflow_run.id }}" - $ARTIFACTS_URL = "https://api.github.com/repos/secondlife/viewer/actions/runs/$BUILD_ID/artifacts" - - # Fetch the correct artifact URL - $response = Invoke-RestMethod -Headers @{Authorization="token ${{ secrets.GITHUB_TOKEN }}" } -Uri $ARTIFACTS_URL - $ARTIFACT_NAME = ($response.artifacts | Where-Object { $_.name -eq "Windows-installer" }).archive_download_url - - if (-Not $ARTIFACT_NAME) { - Write-Host "❌ Error: Windows-installer artifact not found!" - exit 1 - } - - Write-Host "✅ Artifact found: $ARTIFACT_NAME" - - # Secure download path - $DownloadPath = "$env:TEMP\secondlife-build-$BUILD_ID" - New-Item -ItemType Directory -Path $DownloadPath -Force | Out-Null - $InstallerPath = "$DownloadPath\installer.zip" - - # Download the ZIP - Invoke-WebRequest -Uri $ARTIFACT_NAME -Headers @{Authorization="token ${{ secrets.GITHUB_TOKEN }}"} -OutFile $InstallerPath - - # Ensure download succeeded - if (-Not (Test-Path $InstallerPath)) { - Write-Host "❌ Error: Failed to download Windows-installer.zip" - exit 1 - } - - - name: Extract Installer & Locate Executable - shell: pwsh - run: | - # Explicitly set BUILD_ID again (since it does not appear to persist across steps) - $BUILD_ID = "${{ github.event.workflow_run.id }}" - $ExtractPath = "$env:TEMP\secondlife-build-$BUILD_ID" - $InstallerZip = "$ExtractPath\installer.zip" - - # Print paths for debugging - Write-Host "Extract Path: $ExtractPath" - Write-Host "Installer ZIP Path: $InstallerZip" - - # Verify ZIP exists before extracting - if (-Not (Test-Path $InstallerZip)) { - Write-Host "❌ Error: ZIP file not found at $InstallerZip!" - exit 1 - } - - Write-Host "✅ ZIP file exists and is valid. Extracting..." - - Expand-Archive -Path $InstallerZip -DestinationPath $ExtractPath -Force - - # Find installer executable - $INSTALLER_PATH = (Get-ChildItem -Path $ExtractPath -Filter '*.exe' -Recurse | Select-Object -First 1).FullName - - if (-Not $INSTALLER_PATH -or $INSTALLER_PATH -eq "") { - Write-Host "❌ Error: No installer executable found in the extracted files!" - Write-Host "📂 Extracted Files:" - Get-ChildItem -Path $ExtractPath -Recurse | Format-Table -AutoSize - exit 1 - } - - Write-Host "✅ Installer found: $INSTALLER_PATH" - echo "INSTALLER_PATH=$INSTALLER_PATH" | Out-File -FilePath $env:GITHUB_ENV -Append - - - name: Install Second Life Using Task Scheduler (Bypass UAC) - shell: pwsh - run: | - $action = New-ScheduledTaskAction -Execute "${{ env.INSTALLER_PATH }}" -Argument "/S" - $principal = New-ScheduledTaskPrincipal -UserId "SYSTEM" -LogonType ServiceAccount -RunLevel Highest - $task = New-ScheduledTask -Action $action -Principal $principal - Register-ScheduledTask -TaskName "SilentSLInstaller" -InputObject $task -Force - Start-ScheduledTask -TaskName "SilentSLInstaller" - - - name: Wait for Installation to Complete - shell: pwsh - run: | - Write-Host "Waiting for the Second Life installer to finish..." - do { - Start-Sleep -Seconds 5 - $installerProcess = Get-Process | Where-Object { $_.Path -eq "${{ env.INSTALLER_PATH }}" } - } while ($installerProcess) - - Write-Host "✅ Installation completed!" - - - name: Cleanup Task Scheduler Entry - shell: pwsh - run: | - Unregister-ScheduledTask -TaskName "SilentSLInstaller" -Confirm:$false - Write-Host "✅ Task Scheduler entry removed." - - - name: Delete Installer ZIP - shell: pwsh - run: | - # Explicitly set BUILD_ID again - $BUILD_ID = "${{ github.event.workflow_run.id }}" - $DeletePath = "$env:TEMP\secondlife-build-$BUILD_ID\installer.zip" - - Write-Host "Checking if installer ZIP exists: $DeletePath" - - # Ensure the ZIP file exists before trying to delete it - if (Test-Path $DeletePath) { - Remove-Item -Path $DeletePath -Force - Write-Host "✅ Successfully deleted: $DeletePath" - } else { - Write-Host "⚠️ Warning: ZIP file does not exist, skipping deletion." - } - - - name: Run QA Test Script - run: | - Write-Host "Running QA Test script..." - python C:\viewer-sikulix-main\runTests.py - - # - name: Upload Test Results - # uses: actions/upload-artifact@v3 - # with: - # name: test-results - # path: C:\viewer-sikulix-main\regressionTest\test_results.html +name: Run QA Test # Runs automated tests on a self-hosted QA machine + +on: + workflow_run: + workflows: ["Build"] + types: + - completed + +concurrency: + group: qa-test-run + cancel-in-progress: true # Cancels any queued job when a new one starts + +jobs: + debug-workflow: + runs-on: ubuntu-latest + steps: + - name: Debug Workflow Variables + run: | + echo "Workflow Conclusion: ${{ github.event.workflow_run.conclusion }}" + echo "Workflow Head Branch: ${{ github.event.workflow_run.head_branch }}" + echo "Workflow Run ID: ${{ github.event.workflow_run.id }}" + echo "Head Commit Message: ${{ github.event.workflow_run.head_commit.message }}" + echo "GitHub Ref: ${{ github.ref }}" + echo "GitHub Ref Name: ${{ github.ref_name }}" + echo "GitHub Event Name: ${{ github.event_name }}" + echo "GitHub Workflow Name: ${{ github.workflow }}" + + install-viewer-and-run-tests: + runs-on: [self-hosted, qa-machine] + # Run test only on successful builds of Second_Life_X branches + if: > + github.event.workflow_run.conclusion == 'success' && + ( + startsWith(github.event.workflow_run.head_branch, 'Second_Life') + ) + + steps: + - name: Temporarily Allow PowerShell Scripts (Process Scope) + run: | + Set-ExecutionPolicy RemoteSigned -Scope Process -Force + + - name: Verify viewer-sikulix-main Exists + run: | + if (-Not (Test-Path -Path 'C:\viewer-sikulix-main')) { + Write-Host '❌ Error: viewer-sikulix not found on runner!' + exit 1 + } + Write-Host '✅ viewer-sikulix is already available.' + + - name: Fetch & Download Windows Installer Artifact + shell: pwsh + run: | + $BUILD_ID = "${{ github.event.workflow_run.id }}" + $ARTIFACTS_URL = "https://api.github.com/repos/secondlife/viewer/actions/runs/$BUILD_ID/artifacts" + + # Fetch the correct artifact URL + $response = Invoke-RestMethod -Headers @{Authorization="token ${{ secrets.GITHUB_TOKEN }}" } -Uri $ARTIFACTS_URL + $ARTIFACT_NAME = ($response.artifacts | Where-Object { $_.name -eq "Windows-installer" }).archive_download_url + + if (-Not $ARTIFACT_NAME) { + Write-Host "❌ Error: Windows-installer artifact not found!" + exit 1 + } + + Write-Host "✅ Artifact found: $ARTIFACT_NAME" + + # Secure download path + $DownloadPath = "$env:TEMP\secondlife-build-$BUILD_ID" + New-Item -ItemType Directory -Path $DownloadPath -Force | Out-Null + $InstallerPath = "$DownloadPath\installer.zip" + + # Download the ZIP + Invoke-WebRequest -Uri $ARTIFACT_NAME -Headers @{Authorization="token ${{ secrets.GITHUB_TOKEN }}"} -OutFile $InstallerPath + + # Ensure download succeeded + if (-Not (Test-Path $InstallerPath)) { + Write-Host "❌ Error: Failed to download Windows-installer.zip" + exit 1 + } + + - name: Extract Installer & Locate Executable + shell: pwsh + run: | + # Explicitly set BUILD_ID again (since it does not appear to persist across steps) + $BUILD_ID = "${{ github.event.workflow_run.id }}" + $ExtractPath = "$env:TEMP\secondlife-build-$BUILD_ID" + $InstallerZip = "$ExtractPath\installer.zip" + + # Print paths for debugging + Write-Host "Extract Path: $ExtractPath" + Write-Host "Installer ZIP Path: $InstallerZip" + + # Verify ZIP exists before extracting + if (-Not (Test-Path $InstallerZip)) { + Write-Host "❌ Error: ZIP file not found at $InstallerZip!" + exit 1 + } + + Write-Host "✅ ZIP file exists and is valid. Extracting..." + + Expand-Archive -Path $InstallerZip -DestinationPath $ExtractPath -Force + + # Find installer executable + $INSTALLER_PATH = (Get-ChildItem -Path $ExtractPath -Filter '*.exe' -Recurse | Select-Object -First 1).FullName + + if (-Not $INSTALLER_PATH -or $INSTALLER_PATH -eq "") { + Write-Host "❌ Error: No installer executable found in the extracted files!" + Write-Host "📂 Extracted Files:" + Get-ChildItem -Path $ExtractPath -Recurse | Format-Table -AutoSize + exit 1 + } + + Write-Host "✅ Installer found: $INSTALLER_PATH" + echo "INSTALLER_PATH=$INSTALLER_PATH" | Out-File -FilePath $env:GITHUB_ENV -Append + + - name: Install Second Life Using Task Scheduler (Bypass UAC) + shell: pwsh + run: | + $action = New-ScheduledTaskAction -Execute "${{ env.INSTALLER_PATH }}" -Argument "/S" + $principal = New-ScheduledTaskPrincipal -UserId "SYSTEM" -LogonType ServiceAccount -RunLevel Highest + $task = New-ScheduledTask -Action $action -Principal $principal + Register-ScheduledTask -TaskName "SilentSLInstaller" -InputObject $task -Force + Start-ScheduledTask -TaskName "SilentSLInstaller" + + - name: Wait for Installation to Complete + shell: pwsh + run: | + Write-Host "Waiting for the Second Life installer to finish..." + do { + Start-Sleep -Seconds 5 + $installerProcess = Get-Process | Where-Object { $_.Path -eq "${{ env.INSTALLER_PATH }}" } + } while ($installerProcess) + + Write-Host "✅ Installation completed!" + + - name: Cleanup Task Scheduler Entry + shell: pwsh + run: | + Unregister-ScheduledTask -TaskName "SilentSLInstaller" -Confirm:$false + Write-Host "✅ Task Scheduler entry removed." + + - name: Delete Installer ZIP + shell: pwsh + run: | + # Explicitly set BUILD_ID again + $BUILD_ID = "${{ github.event.workflow_run.id }}" + $DeletePath = "$env:TEMP\secondlife-build-$BUILD_ID\installer.zip" + + Write-Host "Checking if installer ZIP exists: $DeletePath" + + # Ensure the ZIP file exists before trying to delete it + if (Test-Path $DeletePath) { + Remove-Item -Path $DeletePath -Force + Write-Host "✅ Successfully deleted: $DeletePath" + } else { + Write-Host "⚠️ Warning: ZIP file does not exist, skipping deletion." + } + + - name: Run QA Test Script + run: | + Write-Host "Running QA Test script..." + python C:\viewer-sikulix-main\runTests.py + + # - name: Upload Test Results + # uses: actions/upload-artifact@v3 + # with: + # name: test-results + # path: C:\viewer-sikulix-main\regressionTest\test_results.html -- cgit v1.2.3 From 1f3ba13a632a751cc3217cbe02d8aa2190df6b41 Mon Sep 17 00:00:00 2001 From: Brad Linden <46733234+brad-linden@users.noreply.github.com> Date: Mon, 28 Apr 2025 10:51:47 -0700 Subject: Attempt to fix qatest.yaml CodeQL issues (#3987) --- .github/workflows/.gitattributes | 1 + .github/workflows/qatest.yaml | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/.gitattributes (limited to '.github/workflows') diff --git a/.github/workflows/.gitattributes b/.github/workflows/.gitattributes new file mode 100644 index 0000000000..6dc1cca42a --- /dev/null +++ b/.github/workflows/.gitattributes @@ -0,0 +1 @@ +qatest.yaml -text eol=crlf diff --git a/.github/workflows/qatest.yaml b/.github/workflows/qatest.yaml index 7f3a5242e9..4892cfaae3 100644 --- a/.github/workflows/qatest.yaml +++ b/.github/workflows/qatest.yaml @@ -1,4 +1,7 @@ name: Run QA Test # Runs automated tests on a self-hosted QA machine +permissions: + contents: read + #pull-requests: write # maybe need to re-add this later on: workflow_run: @@ -15,11 +18,14 @@ jobs: runs-on: ubuntu-latest steps: - name: Debug Workflow Variables + env: + HEAD_BRANCH: ${{ github.event.workflow_run.head_branch }} + HEAD_COMMIT_MSG: ${{ github.event.workflow_run.head_commit.message }} run: | echo "Workflow Conclusion: ${{ github.event.workflow_run.conclusion }}" - echo "Workflow Head Branch: ${{ github.event.workflow_run.head_branch }}" + echo "Workflow Head Branch: $HEAD_BRANCH" echo "Workflow Run ID: ${{ github.event.workflow_run.id }}" - echo "Head Commit Message: ${{ github.event.workflow_run.head_commit.message }}" + echo "Head Commit Message: $HEAD_COMMIT_MSG" echo "GitHub Ref: ${{ github.ref }}" echo "GitHub Ref Name: ${{ github.ref_name }}" echo "GitHub Event Name: ${{ github.event_name }}" -- cgit v1.2.3 From f68a5b2363b14c98e74a09a548571486e74f8510 Mon Sep 17 00:00:00 2001 From: AtlasLinden <114031241+AtlasLinden@users.noreply.github.com> Date: Mon, 5 May 2025 15:08:10 -0700 Subject: Introduce workflow dispatch and mac functionality to qatest.yaml A workflow dispatch has been added in an attempt to not only manually trigger this workflow but to also test this from a different branch without having to first merge to develop. Also steps have been added to allow this workflow to run on mac runners when added. Mac runner info currently commented out. --- .github/workflows/qatest.yaml | 271 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 236 insertions(+), 35 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/qatest.yaml b/.github/workflows/qatest.yaml index 6a4ca440ed..5a609fdc5b 100644 --- a/.github/workflows/qatest.yaml +++ b/.github/workflows/qatest.yaml @@ -5,10 +5,20 @@ on: workflows: ["Build"] types: - completed + workflow_dispatch: + inputs: + branch_name: + description: 'Branch name to simulate workflow (e.g. develop)' + required: true + default: 'develop' + build_id: + description: 'Build workflow run ID (e.g. For github.com/secondlife/viewer/actions/runs/1234567890 the ID is 1234567890)' + required: true + default: '14806728332' concurrency: - group: qa-test-run - cancel-in-progress: true # Cancels any queued job when a new one starts + group: qa-test-run-${{ matrix.runner }} + cancel-in-progress: false # Prevents cancellation of in-progress jobs jobs: debug-workflow: @@ -26,39 +36,75 @@ jobs: echo "GitHub Workflow Name: ${{ github.workflow }}" install-viewer-and-run-tests: - runs-on: [self-hosted, qa-machine] - # Run test only on successful builds of Second_Life_X branches + strategy: + matrix: + include: + - os: windows + runner: qa-windows-atlas + artifact: Windows-installer + install-path: 'C:\viewer-sikulix-main' + - os: windows + runner: qa-dan-asus + artifact: Windows-installer + install-path: 'C:\viewer-sikulix-main' + # Commented out until mac runner is available + # - os: mac + # runner: qa-mac + # artifact: Mac-installer + # install-path: 'HOME/Documents/viewer-sikulix-main' + fail-fast: false + + runs-on: [self-hosted, "${{ matrix.runner }}"] + # Run test only on successful builds of Second_Life_X branches or on manual dispatch if: > + (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success' && - ( - startsWith(github.event.workflow_run.head_branch, 'Second_Life') - ) + startsWith(github.event.workflow_run.head_branch, 'Second_Life')) || + github.event_name == 'workflow_dispatch' steps: - - name: Temporarily Allow PowerShell Scripts (Process Scope) + # Common steps for both OSes + - name: Set Build ID + shell: bash + run: | + if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then + echo "BUILD_ID=${{ github.event.inputs.build_id }}" >> $GITHUB_ENV + echo "ARTIFACTS_URL=https://api.github.com/repos/secondlife/viewer/actions/runs/${{ github.event.inputs.build_id }}/artifacts" >> $GITHUB_ENV + else + echo "BUILD_ID=${{ github.event.workflow_run.id }}" >> $GITHUB_ENV + echo "ARTIFACTS_URL=https://api.github.com/repos/secondlife/viewer/actions/runs/${{ github.event.workflow_run.id }}/artifacts" >> $GITHUB_ENV + fi + + # Windows-specific steps + - name: Temporarily Allow PowerShell Scripts (Windows) + if: matrix.os == 'windows' + shell: pwsh run: | Set-ExecutionPolicy RemoteSigned -Scope Process -Force - - name: Verify viewer-sikulix-main Exists + - name: Verify viewer-sikulix-main Exists (Windows) + if: matrix.os == 'windows' + shell: pwsh run: | - if (-Not (Test-Path -Path 'C:\viewer-sikulix-main')) { + if (-Not (Test-Path -Path '${{ matrix.install-path }}')) { Write-Host '❌ Error: viewer-sikulix not found on runner!' exit 1 } Write-Host '✅ viewer-sikulix is already available.' - - name: Fetch & Download Windows Installer Artifact + - name: Fetch & Download Installer Artifact (Windows) + if: matrix.os == 'windows' shell: pwsh run: | - $BUILD_ID = "${{ github.event.workflow_run.id }}" - $ARTIFACTS_URL = "https://api.github.com/repos/secondlife/viewer/actions/runs/$BUILD_ID/artifacts" + $BUILD_ID = "${{ env.BUILD_ID }}" + $ARTIFACTS_URL = "${{ env.ARTIFACTS_URL }}" # Fetch the correct artifact URL $response = Invoke-RestMethod -Headers @{Authorization="token ${{ secrets.GITHUB_TOKEN }}" } -Uri $ARTIFACTS_URL - $ARTIFACT_NAME = ($response.artifacts | Where-Object { $_.name -eq "Windows-installer" }).archive_download_url + $ARTIFACT_NAME = ($response.artifacts | Where-Object { $_.name -eq "${{ matrix.artifact }}" }).archive_download_url if (-Not $ARTIFACT_NAME) { - Write-Host "❌ Error: Windows-installer artifact not found!" + Write-Host "❌ Error: ${{ matrix.artifact }} artifact not found!" exit 1 } @@ -74,16 +120,19 @@ jobs: # Ensure download succeeded if (-Not (Test-Path $InstallerPath)) { - Write-Host "❌ Error: Failed to download Windows-installer.zip" + Write-Host "❌ Error: Failed to download ${{ matrix.artifact }}.zip" exit 1 } - - name: Extract Installer & Locate Executable + # Set the path for other steps + echo "DOWNLOAD_PATH=$DownloadPath" | Out-File -FilePath $env:GITHUB_ENV -Append + + - name: Extract Installer & Locate Executable (Windows) + if: matrix.os == 'windows' shell: pwsh run: | - # Explicitly set BUILD_ID again (since it does not appear to persist across steps) - $BUILD_ID = "${{ github.event.workflow_run.id }}" - $ExtractPath = "$env:TEMP\secondlife-build-$BUILD_ID" + $BUILD_ID = "${{ env.BUILD_ID }}" + $ExtractPath = "${{ env.DOWNLOAD_PATH }}" $InstallerZip = "$ExtractPath\installer.zip" # Print paths for debugging @@ -113,16 +162,19 @@ jobs: Write-Host "✅ Installer found: $INSTALLER_PATH" echo "INSTALLER_PATH=$INSTALLER_PATH" | Out-File -FilePath $env:GITHUB_ENV -Append - - name: Install Second Life Using Task Scheduler (Bypass UAC) + - name: Install Second Life (Windows) + if: matrix.os == 'windows' shell: pwsh run: | + # Windows - Use Task Scheduler to bypass UAC $action = New-ScheduledTaskAction -Execute "${{ env.INSTALLER_PATH }}" -Argument "/S" $principal = New-ScheduledTaskPrincipal -UserId "SYSTEM" -LogonType ServiceAccount -RunLevel Highest $task = New-ScheduledTask -Action $action -Principal $principal Register-ScheduledTask -TaskName "SilentSLInstaller" -InputObject $task -Force Start-ScheduledTask -TaskName "SilentSLInstaller" - - name: Wait for Installation to Complete + - name: Wait for Installation to Complete (Windows) + if: matrix.os == 'windows' shell: pwsh run: | Write-Host "Waiting for the Second Life installer to finish..." @@ -133,18 +185,16 @@ jobs: Write-Host "✅ Installation completed!" - - name: Cleanup Task Scheduler Entry + - name: Cleanup After Installation (Windows) + if: matrix.os == 'windows' shell: pwsh run: | + # Cleanup Task Scheduler Entry Unregister-ScheduledTask -TaskName "SilentSLInstaller" -Confirm:$false Write-Host "✅ Task Scheduler entry removed." - - name: Delete Installer ZIP - shell: pwsh - run: | - # Explicitly set BUILD_ID again - $BUILD_ID = "${{ github.event.workflow_run.id }}" - $DeletePath = "$env:TEMP\secondlife-build-$BUILD_ID\installer.zip" + # Delete Installer ZIP + $DeletePath = "${{ env.DOWNLOAD_PATH }}\installer.zip" Write-Host "Checking if installer ZIP exists: $DeletePath" @@ -156,13 +206,164 @@ jobs: Write-Host "⚠️ Warning: ZIP file does not exist, skipping deletion." } - - name: Run QA Test Script + - name: Run QA Test Script (Windows) + if: matrix.os == 'windows' + shell: pwsh + run: | + Write-Host "Running QA Test script on Windows runner: ${{ matrix.runner }}..." + python "${{ matrix.install-path }}\runTests.py" + + # Mac-specific steps + - name: Verify viewer-sikulix-main Exists (Mac) + if: matrix.os == 'mac' + shell: bash + run: | + if [ ! -d "${{ matrix.install-path }}" ]; then + echo "❌ Error: viewer-sikulix not found on runner!" + exit 1 + fi + echo "✅ viewer-sikulix is already available." + + - name: Fetch & Download Installer Artifact (Mac) + if: matrix.os == 'mac' + shell: bash + run: | + # Mac-specific Bash commands + response=$(curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -s ${{ env.ARTIFACTS_URL }}) + ARTIFACT_NAME=$(echo $response | jq -r '.artifacts[] | select(.name=="${{ matrix.artifact }}") | .archive_download_url') + + if [ -z "$ARTIFACT_NAME" ]; then + echo "❌ Error: ${{ matrix.artifact }} artifact not found!" + exit 1 + fi + + echo "✅ Artifact found: $ARTIFACT_NAME" + + # Secure download path + DOWNLOAD_PATH="/tmp/secondlife-build-${{ env.BUILD_ID }}" + mkdir -p $DOWNLOAD_PATH + INSTALLER_PATH="$DOWNLOAD_PATH/installer.zip" + + # Download the ZIP + curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -L $ARTIFACT_NAME -o $INSTALLER_PATH + + # Ensure download succeeded + if [ ! -f "$INSTALLER_PATH" ]; then + echo "❌ Error: Failed to download ${{ matrix.artifact }}.zip" + exit 1 + fi + + # Set the path for other steps + echo "DOWNLOAD_PATH=$DOWNLOAD_PATH" >> $GITHUB_ENV + + - name: Extract Installer & Locate Executable (Mac) + if: matrix.os == 'mac' + shell: bash + run: | + EXTRACT_PATH="${{ env.DOWNLOAD_PATH }}" + INSTALLER_ZIP="$EXTRACT_PATH/installer.zip" + + # Debug output + echo "Extract Path: $EXTRACT_PATH" + echo "Installer ZIP Path: $INSTALLER_ZIP" + + # Verify ZIP exists + if [ ! -f "$INSTALLER_ZIP" ]; then + echo "❌ Error: ZIP file not found at $INSTALLER_ZIP!" + exit 1 + fi + + echo "✅ ZIP file exists and is valid. Extracting..." + + # Extract the ZIP + unzip -o "$INSTALLER_ZIP" -d "$EXTRACT_PATH" + + # Find DMG file + INSTALLER_PATH=$(find "$EXTRACT_PATH" -name "*.dmg" -type f | head -1) + + if [ -z "$INSTALLER_PATH" ]; then + echo "❌ Error: No installer DMG found in the extracted files!" + echo "📂 Extracted Files:" + ls -la "$EXTRACT_PATH" + exit 1 + fi + + echo "✅ Installer found: $INSTALLER_PATH" + echo "INSTALLER_PATH=$INSTALLER_PATH" >> $GITHUB_ENV + + - name: Install Second Life (Mac) + if: matrix.os == 'mac' + shell: bash + run: | + # Mac installation + echo "Mounting DMG installer..." + MOUNT_POINT="/tmp/secondlife-dmg" + mkdir -p "$MOUNT_POINT" + + # Mount the DMG + hdiutil attach "${{ env.INSTALLER_PATH }}" -mountpoint "$MOUNT_POINT" -nobrowse + + echo "✅ DMG mounted at $MOUNT_POINT" + + # Find the app in the mounted DMG + APP_PATH=$(find "$MOUNT_POINT" -name "*.app" -type d | head -1) + + if [ -z "$APP_PATH" ]; then + echo "❌ Error: No .app bundle found in the mounted DMG!" + exit 1 + fi + + echo "Installing application to Applications folder..." + + # Copy the app to the Applications folder (or specified install path) + cp -R "$APP_PATH" "${{ matrix.install-path }}" + + # Verify the app was copied successfully + if [ ! -d "${{ matrix.install-path }}/$(basename "$APP_PATH")" ]; then + echo "❌ Error: Failed to install application to ${{ matrix.install-path }}!" + exit 1 + fi + + echo "✅ Application installed successfully to ${{ matrix.install-path }}" + + # Save mount point for cleanup + echo "MOUNT_POINT=$MOUNT_POINT" >> $GITHUB_ENV + + - name: Wait for Installation to Complete (Mac) + if: matrix.os == 'mac' + shell: bash + run: | + echo "Waiting for installation to complete..." + # Sleep to allow installation to finish (adjust as needed) + sleep 30 + echo "✅ Installation completed" + + - name: Cleanup After Installation (Mac) + if: matrix.os == 'mac' + shell: bash + run: | + # Mac cleanup + # Unmount the DMG + echo "Unmounting DMG..." + hdiutil detach "${{ env.MOUNT_POINT }}" -force + + # Clean up temporary files + echo "Cleaning up temporary files..." + rm -rf "${{ env.DOWNLOAD_PATH }}" + rm -rf "${{ env.MOUNT_POINT }}" + + echo "✅ Cleanup completed" + + - name: Run QA Test Script (Mac) + if: matrix.os == 'mac' + shell: bash run: | - Write-Host "Running QA Test script..." - python C:\viewer-sikulix-main\runTests.py + echo "Running QA Test script on Mac runner: ${{ matrix.runner }}..." + python "${{ matrix.install-path }}/runTests.py" # - name: Upload Test Results - # uses: actions/upload-artifact@v3 + # if: always() + # uses: actions/upload-artifact@v4 # with: - # name: test-results - # path: C:\viewer-sikulix-main\regressionTest\test_results.html + # name: test-results-${{ matrix.runner }} + # path: ${{ matrix.install-path }}/regressionTest/test_results.html -- cgit v1.2.3 From 4bb51a5f276ba96c08ed8b204ab8a32feb9af037 Mon Sep 17 00:00:00 2001 From: AtlasLinden <114031241+AtlasLinden@users.noreply.github.com> Date: Tue, 6 May 2025 06:28:57 -0700 Subject: Add permissions to QA Workflow Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- .github/workflows/qatest.yaml | 3 +++ 1 file changed, 3 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/qatest.yaml b/.github/workflows/qatest.yaml index 5a609fdc5b..f1835a4b7f 100644 --- a/.github/workflows/qatest.yaml +++ b/.github/workflows/qatest.yaml @@ -1,5 +1,8 @@ name: Run QA Test # Runs automated tests on a self-hosted QA machine +permissions: + contents: read + on: workflow_run: workflows: ["Build"] -- cgit v1.2.3 From 2c176c75fc6951388668e41bd8bb59a5190b0f07 Mon Sep 17 00:00:00 2001 From: AtlasLinden <114031241+AtlasLinden@users.noreply.github.com> Date: Tue, 6 May 2025 11:02:57 -0700 Subject: Resolve qatest.yaml concurrency group error Error: "The workflow is not valid. .github/workflows/qatest.yaml (Line: 23, Col: 10): Unrecognized named-value: 'matrix'. Located at position 1 within expression: matrix.runner" --- .github/workflows/qatest.yaml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/qatest.yaml b/.github/workflows/qatest.yaml index f1835a4b7f..96ce672d4c 100644 --- a/.github/workflows/qatest.yaml +++ b/.github/workflows/qatest.yaml @@ -1,4 +1,4 @@ -name: Run QA Test # Runs automated tests on a self-hosted QA machine +name: Run QA Test # Runs automated tests on self-hosted QA machines permissions: contents: read @@ -10,17 +10,13 @@ on: - completed workflow_dispatch: inputs: - branch_name: - description: 'Branch name to simulate workflow (e.g. develop)' - required: true - default: 'develop' build_id: description: 'Build workflow run ID (e.g. For github.com/secondlife/viewer/actions/runs/1234567890 the ID is 1234567890)' required: true default: '14806728332' concurrency: - group: qa-test-run-${{ matrix.runner }} + group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: false # Prevents cancellation of in-progress jobs jobs: -- cgit v1.2.3 From 469730f18798f0c4baba17759bdedbb3dd342214 Mon Sep 17 00:00:00 2001 From: AtlasLinden <114031241+AtlasLinden@users.noreply.github.com> Date: Tue, 6 May 2025 12:31:18 -0700 Subject: Separate Build ID step for each OS --- .github/workflows/qatest.yaml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/qatest.yaml b/.github/workflows/qatest.yaml index 96ce672d4c..f3f93a9c55 100644 --- a/.github/workflows/qatest.yaml +++ b/.github/workflows/qatest.yaml @@ -62,9 +62,10 @@ jobs: github.event_name == 'workflow_dispatch' steps: - # Common steps for both OSes + # Windows-specific steps - name: Set Build ID - shell: bash + if: matrix.os == 'windows' + shell: pwsh run: | if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then echo "BUILD_ID=${{ github.event.inputs.build_id }}" >> $GITHUB_ENV @@ -74,7 +75,6 @@ jobs: echo "ARTIFACTS_URL=https://api.github.com/repos/secondlife/viewer/actions/runs/${{ github.event.workflow_run.id }}/artifacts" >> $GITHUB_ENV fi - # Windows-specific steps - name: Temporarily Allow PowerShell Scripts (Windows) if: matrix.os == 'windows' shell: pwsh @@ -213,6 +213,18 @@ jobs: python "${{ matrix.install-path }}\runTests.py" # Mac-specific steps + - name: Set Build ID (Mac) + if: matrix.os == 'mac' + shell: bash + run: | + if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then + echo "BUILD_ID=${{ github.event.inputs.build_id }}" >> $GITHUB_ENV + echo "ARTIFACTS_URL=https://api.github.com/repos/secondlife/viewer/actions/runs/${{ github.event.inputs.build_id }}/artifacts" >> $GITHUB_ENV + else + echo "BUILD_ID=${{ github.event.workflow_run.id }}" >> $GITHUB_ENV + echo "ARTIFACTS_URL=https://api.github.com/repos/secondlife/viewer/actions/runs/${{ github.event.workflow_run.id }}/artifacts" >> $GITHUB_ENV + fi + - name: Verify viewer-sikulix-main Exists (Mac) if: matrix.os == 'mac' shell: bash -- cgit v1.2.3 From 8c5df1ad9d812a50e0ed5281bcafbfb867d670eb Mon Sep 17 00:00:00 2001 From: AtlasLinden <114031241+AtlasLinden@users.noreply.github.com> Date: Tue, 6 May 2025 12:41:08 -0700 Subject: Update Windows Build ID step to use pwsh syntax --- .github/workflows/qatest.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/qatest.yaml b/.github/workflows/qatest.yaml index f3f93a9c55..43fdb86b7e 100644 --- a/.github/workflows/qatest.yaml +++ b/.github/workflows/qatest.yaml @@ -67,13 +67,13 @@ jobs: if: matrix.os == 'windows' shell: pwsh run: | - if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then - echo "BUILD_ID=${{ github.event.inputs.build_id }}" >> $GITHUB_ENV - echo "ARTIFACTS_URL=https://api.github.com/repos/secondlife/viewer/actions/runs/${{ github.event.inputs.build_id }}/artifacts" >> $GITHUB_ENV - else - echo "BUILD_ID=${{ github.event.workflow_run.id }}" >> $GITHUB_ENV - echo "ARTIFACTS_URL=https://api.github.com/repos/secondlife/viewer/actions/runs/${{ github.event.workflow_run.id }}/artifacts" >> $GITHUB_ENV - fi + if ("${{ github.event_name }}" -eq "workflow_dispatch") { + echo "BUILD_ID=${{ github.event.inputs.build_id }}" | Out-File -FilePath $env:GITHUB_ENV -Append + echo "ARTIFACTS_URL=https://api.github.com/repos/secondlife/viewer/actions/runs/${{ github.event.inputs.build_id }}/artifacts" | Out-File -FilePath $env:GITHUB_ENV -Append + } else { + echo "BUILD_ID=${{ github.event.workflow_run.id }}" | Out-File -FilePath $env:GITHUB_ENV -Append + echo "ARTIFACTS_URL=https://api.github.com/repos/secondlife/viewer/actions/runs/${{ github.event.workflow_run.id }}/artifacts" | Out-File -FilePath $env:GITHUB_ENV -Append + } - name: Temporarily Allow PowerShell Scripts (Windows) if: matrix.os == 'windows' -- cgit v1.2.3 From 147442c24056799c807ebbe44ef429ff4e172bc2 Mon Sep 17 00:00:00 2001 From: AtlasLinden <114031241+AtlasLinden@users.noreply.github.com> Date: Thu, 8 May 2025 06:41:29 -0700 Subject: Adjust install path for new repo name --- .github/workflows/qatest.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/qatest.yaml b/.github/workflows/qatest.yaml index 43fdb86b7e..aafe455b61 100644 --- a/.github/workflows/qatest.yaml +++ b/.github/workflows/qatest.yaml @@ -41,16 +41,16 @@ jobs: - os: windows runner: qa-windows-atlas artifact: Windows-installer - install-path: 'C:\viewer-sikulix-main' + install-path: 'C:\viewer-automation-main' - os: windows runner: qa-dan-asus artifact: Windows-installer - install-path: 'C:\viewer-sikulix-main' + install-path: 'C:\viewer-automation-main' # Commented out until mac runner is available # - os: mac # runner: qa-mac # artifact: Mac-installer - # install-path: 'HOME/Documents/viewer-sikulix-main' + # install-path: 'HOME/Documents/viewer-automation-main' fail-fast: false runs-on: [self-hosted, "${{ matrix.runner }}"] @@ -81,15 +81,15 @@ jobs: run: | Set-ExecutionPolicy RemoteSigned -Scope Process -Force - - name: Verify viewer-sikulix-main Exists (Windows) + - name: Verify viewer-automation-main Exists (Windows) if: matrix.os == 'windows' shell: pwsh run: | if (-Not (Test-Path -Path '${{ matrix.install-path }}')) { - Write-Host '❌ Error: viewer-sikulix not found on runner!' + Write-Host '❌ Error: viewer-automation folder not found on runner!' exit 1 } - Write-Host '✅ viewer-sikulix is already available.' + Write-Host '✅ viewer-automation folder is provided.' - name: Fetch & Download Installer Artifact (Windows) if: matrix.os == 'windows' @@ -225,15 +225,15 @@ jobs: echo "ARTIFACTS_URL=https://api.github.com/repos/secondlife/viewer/actions/runs/${{ github.event.workflow_run.id }}/artifacts" >> $GITHUB_ENV fi - - name: Verify viewer-sikulix-main Exists (Mac) + - name: Verify viewer-automation-main Exists (Mac) if: matrix.os == 'mac' shell: bash run: | if [ ! -d "${{ matrix.install-path }}" ]; then - echo "❌ Error: viewer-sikulix not found on runner!" + echo "❌ Error: viewer-automation folder not found on runner!" exit 1 fi - echo "✅ viewer-sikulix is already available." + echo "✅ viewer-automation is provided." - name: Fetch & Download Installer Artifact (Mac) if: matrix.os == 'mac' -- cgit v1.2.3 From ca81b40f5a4f056ac2616afaa9ccb1df9645b95e Mon Sep 17 00:00:00 2001 From: AtlasLinden <114031241+AtlasLinden@users.noreply.github.com> Date: Wed, 14 May 2025 07:33:58 -0700 Subject: Add virtual env setup step to qatest.yaml A step is created for both Win and Mac --- .github/workflows/qatest.yaml | 88 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 85 insertions(+), 3 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/qatest.yaml b/.github/workflows/qatest.yaml index aafe455b61..5810744c47 100644 --- a/.github/workflows/qatest.yaml +++ b/.github/workflows/qatest.yaml @@ -50,7 +50,7 @@ jobs: # - os: mac # runner: qa-mac # artifact: Mac-installer - # install-path: 'HOME/Documents/viewer-automation-main' + # install-path: '$HOME/Documents/viewer-automation' fail-fast: false runs-on: [self-hosted, "${{ matrix.runner }}"] @@ -91,6 +91,43 @@ jobs: } Write-Host '✅ viewer-automation folder is provided.' + - name: Verify Python Installation (Windows) + if: matrix.os == 'windows' + shell: pwsh + run: | + try { + $pythonVersion = (python --version) + Write-Host "✅ Python found: $pythonVersion" + } catch { + Write-Host "❌ Error: Python not found in PATH. Please install Python on this runner." + exit 1 + } + + - name: Setup Python Virtual Environment (Windows) + if: matrix.os == 'windows' + shell: pwsh + run: | + Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process -Force + cd ${{ matrix.install-path }} + + if (-Not (Test-Path -Path ".venv")) { + Write-Host "Creating virtual environment..." + python -m venv .venv + } else { + Write-Host "Using existing virtual environment" + } + + # Direct environment activation to avoid script execution issues + $env:VIRTUAL_ENV = "$PWD\.venv" + $env:PATH = "$env:VIRTUAL_ENV\Scripts;$env:PATH" + + # Install dependencies + if (Test-Path -Path "requirements.txt") { + pip install -r requirements.txt + } else { + pip install outleap requests behave + } + - name: Fetch & Download Installer Artifact (Windows) if: matrix.os == 'windows' shell: pwsh @@ -210,7 +247,12 @@ jobs: shell: pwsh run: | Write-Host "Running QA Test script on Windows runner: ${{ matrix.runner }}..." - python "${{ matrix.install-path }}\runTests.py" + cd ${{ matrix.install-path }} + # Activate virtual environment + Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process -Force + $env:VIRTUAL_ENV = "$PWD\.venv" + $env:PATH = "$env:VIRTUAL_ENV\Scripts;$env:PATH" + python runTests.py # Mac-specific steps - name: Set Build ID (Mac) @@ -235,6 +277,44 @@ jobs: fi echo "✅ viewer-automation is provided." + - name: Verify Python Installation (Mac) + if: matrix.os == 'mac' + shell: bash + run: | + if command -v python3 &> /dev/null; then + PYTHON_VERSION=$(python3 --version) + echo "✅ Python found: $PYTHON_VERSION" + else + echo "❌ Error: Python3 not found in PATH. Please install Python on this runner." + exit 1 + fi + + - name: Setup Python Virtual Environment (Mac) + if: matrix.os == 'mac' + shell: bash + run: | + cd ${{ matrix.install-path }} + + # Create virtual environment if it doesn't exist + if [ ! -d ".venv" ]; then + echo "Creating virtual environment..." + python3 -m venv .venv + else + echo "Using existing virtual environment" + fi + + # Activate virtual environment + source .venv/bin/activate + + # Install dependencies + if [ -f "requirements.txt" ]; then + pip install -r requirements.txt + echo "✅ Installed dependencies from requirements.txt" + else + pip install outleap requests behave + echo "⚠️ requirements.txt not found, installed basic dependencies" + fi + - name: Fetch & Download Installer Artifact (Mac) if: matrix.os == 'mac' shell: bash @@ -370,7 +450,9 @@ jobs: shell: bash run: | echo "Running QA Test script on Mac runner: ${{ matrix.runner }}..." - python "${{ matrix.install-path }}/runTests.py" + cd ${{ matrix.install-path }} + source .venv/bin/activate + python runTests.py # - name: Upload Test Results # if: always() -- cgit v1.2.3 From 33fb7903f9a0fd83a71dbaeb9101bd4a53014f48 Mon Sep 17 00:00:00 2001 From: AtlasLinden <114031241+AtlasLinden@users.noreply.github.com> Date: Wed, 14 May 2025 08:32:25 -0700 Subject: Added "verify repo is up-to-date" step Local changes are stashed temporarily upon repo update and an attempt to restore them is made afterwards. If a merge conflict is hit then a new local branch is created. --- .github/workflows/qatest.yaml | 97 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/qatest.yaml b/.github/workflows/qatest.yaml index 5810744c47..44a317efb8 100644 --- a/.github/workflows/qatest.yaml +++ b/.github/workflows/qatest.yaml @@ -91,6 +91,51 @@ jobs: } Write-Host '✅ viewer-automation folder is provided.' + - name: Verify viewer-automation-main is Up-To-Date (Windows) + if: matrix.os == 'windows' + shell: pwsh + continue-on-error: true + run: | + cd ${{ matrix.install-path }} + Write-Host "Checking for repository updates..." + + # Check if .git directory exists + if (Test-Path -Path ".git") { + try { + # Save local changes instead of discarding them + git stash push -m "Automated stash before update $(Get-Date)" + Write-Host "Local changes saved (if any)" + + # Update the repository + git pull + Write-Host "✅ Repository updated successfully" + + # Try to restore local changes if any were stashed + $stashList = git stash list + if ($stashList -match "Automated stash before update") { + try { + git stash pop + Write-Host "✅ Local changes restored successfully" + } catch { + Write-Host "⚠️ Conflict when restoring local changes" + # Save the conflicted state in a new branch for later review + $branchName = "conflict-recovery-$(Get-Date -Format 'yyyyMMdd-HHmmss')" + git checkout -b $branchName + Write-Host "✅ Created branch '$branchName' with conflicted state" + + # For test execution, revert to a clean state + git reset --hard HEAD + Write-Host "✅ Reset to clean state for test execution" + } + } + } catch { + Write-Host "⚠️ Could not update repository: $_" + Write-Host "Continuing with existing files..." + } + } else { + Write-Host "⚠️ Not a Git repository, using existing files" + } + - name: Verify Python Installation (Windows) if: matrix.os == 'windows' shell: pwsh @@ -248,10 +293,16 @@ jobs: run: | Write-Host "Running QA Test script on Windows runner: ${{ matrix.runner }}..." cd ${{ matrix.install-path }} + # Activate virtual environment Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process -Force $env:VIRTUAL_ENV = "$PWD\.venv" $env:PATH = "$env:VIRTUAL_ENV\Scripts;$env:PATH" + + # Set runner name as environment variable + $env:RUNNER_NAME = "${{ matrix.runner }}" + + # Run the test script python runTests.py # Mac-specific steps @@ -277,6 +328,45 @@ jobs: fi echo "✅ viewer-automation is provided." + - name: Verify viewer-automation-main is Up-To-Date (Mac) + if: matrix.os == 'mac' + shell: bash + continue-on-error: true + run: | + cd ${{ matrix.install-path }} + echo "Checking for repository updates..." + + # Check if .git directory exists + if [ -d ".git" ]; then + # Save local changes instead of discarding them + git stash push -m "Automated stash before update $(date)" + echo "Local changes saved (if any)" + + # Update the repository + git pull || echo "⚠️ Could not update repository" + echo "✅ Repository updated (or attempted update)" + + # Try to restore local changes if any were stashed + if git stash list | grep -q "Automated stash before update"; then + # Try to pop the stash, but be prepared for conflicts + if ! git stash pop; then + echo "⚠️ Conflict when restoring local changes" + # Save the conflicted state in a new branch for later review + branch_name="conflict-recovery-$(date +%Y%m%d-%H%M%S)" + git checkout -b "$branch_name" + echo "✅ Created branch '$branch_name' with conflicted state" + + # For test execution, revert to a clean state + git reset --hard HEAD + echo "✅ Reset to clean state for test execution" + else + echo "✅ Local changes restored successfully" + fi + fi + else + echo "⚠️ Not a Git repository, using existing files" + fi + - name: Verify Python Installation (Mac) if: matrix.os == 'mac' shell: bash @@ -451,7 +541,14 @@ jobs: run: | echo "Running QA Test script on Mac runner: ${{ matrix.runner }}..." cd ${{ matrix.install-path }} + + # Activate virtual environment source .venv/bin/activate + + # Set runner name as environment variable + export RUNNER_NAME="${{ matrix.runner }}" + + # Run the test script python runTests.py # - name: Upload Test Results -- cgit v1.2.3 From a8897407095c4901275e8aacfc55a28e56e2e2c6 Mon Sep 17 00:00:00 2001 From: AtlasLinden <114031241+AtlasLinden@users.noreply.github.com> Date: Wed, 14 May 2025 14:25:36 -0700 Subject: Account for further Playwright dependencies in .venv --- .github/workflows/qatest.yaml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/qatest.yaml b/.github/workflows/qatest.yaml index 44a317efb8..14530ec824 100644 --- a/.github/workflows/qatest.yaml +++ b/.github/workflows/qatest.yaml @@ -168,9 +168,17 @@ jobs: # Install dependencies if (Test-Path -Path "requirements.txt") { + Write-Host "Installing dependencies from requirements.txt..." pip install -r requirements.txt + + # Install Playwright browsers - add this line + Write-Host "Installing Playwright browsers..." + python -m playwright install } else { - pip install outleap requests behave + pip install outleap requests behave playwright + # Install Playwright browsers - add this line + Write-Host "Installing Playwright browsers..." + python -m playwright install } - name: Fetch & Download Installer Artifact (Windows) @@ -400,9 +408,17 @@ jobs: if [ -f "requirements.txt" ]; then pip install -r requirements.txt echo "✅ Installed dependencies from requirements.txt" + + # Install Playwright browsers - add this line + echo "Installing Playwright browsers..." + python -m playwright install else - pip install outleap requests behave + pip install outleap requests behave playwright echo "⚠️ requirements.txt not found, installed basic dependencies" + + # Install Playwright browsers - add this line + echo "Installing Playwright browsers..." + python -m playwright install fi - name: Fetch & Download Installer Artifact (Mac) -- cgit v1.2.3 From cee546977da35f22b79fc80647da179d288f1ee8 Mon Sep 17 00:00:00 2001 From: AtlasLinden <114031241+AtlasLinden@users.noreply.github.com> Date: Thu, 22 May 2025 09:05:24 -0700 Subject: Allow runners to operate independently Currently if there are multiple workflow runs queued and a runner is offline, the online runner will wait for the offline runner to either timeout or complete the job before moving to the next job. This adjustment should allow the online runner/s to move onto new workflow runs regardless of what other runners are up to. --- .github/workflows/qatest.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/qatest.yaml b/.github/workflows/qatest.yaml index 14530ec824..dd42f28c88 100644 --- a/.github/workflows/qatest.yaml +++ b/.github/workflows/qatest.yaml @@ -16,7 +16,7 @@ on: default: '14806728332' concurrency: - group: ${{ github.workflow }}-${{ github.ref }} + group: ${{ github.workflow }}-${{ matrix.runner }} cancel-in-progress: false # Prevents cancellation of in-progress jobs jobs: -- cgit v1.2.3 From 7aea88fb84e6cb5412662dd4de4e7589a6801ba3 Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy Date: Thu, 29 May 2025 20:56:30 +0300 Subject: Use awk to make PV channel name --- .github/workflows/build.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 50b0cf02bc..a9807e1dba 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -218,8 +218,10 @@ jobs: prefix=${ba[0]} if [ "$prefix" == "project" ]; then IFS='_' read -ra prj <<< "${ba[1]}" + prj_str="${prj[*]}" # uppercase first letter of each word - export viewer_channel="Second Life Project ${prj[*]^}" + capitalized=$(echo "$prj_str" | awk '{for (i=1; i<=NF; i++) $i = toupper(substr($i,1,1)) substr($i,2); print}') + export viewer_channel="Second Life Project $capitalized" elif [[ "$prefix" == "release" || "$prefix" == "main" ]]; then export viewer_channel="Second Life Release" -- cgit v1.2.3 From 3c7dde56e55bc36b3befe9fbf23fd1d50fdd68e2 Mon Sep 17 00:00:00 2001 From: Signal Linden Date: Tue, 10 Jun 2025 09:21:49 -0700 Subject: Require PR descriptions (#4233) * Require PR descriptions Add a simple workflow check to ensure PRs have a description. * Potential fix for code scanning alert no. 32: Workflow does not contain permissions Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --------- Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- .github/workflows/check-pr.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/check-pr.yaml (limited to '.github/workflows') diff --git a/.github/workflows/check-pr.yaml b/.github/workflows/check-pr.yaml new file mode 100644 index 0000000000..a5cee9157c --- /dev/null +++ b/.github/workflows/check-pr.yaml @@ -0,0 +1,21 @@ +name: Check PR + +on: + pull_request: + types: [opened, edited, reopened, synchronize] + +permissions: + contents: read + +jobs: + check-description: + runs-on: ubuntu-latest + steps: + - name: Check PR description + uses: actions/github-script@v7 + with: + script: | + const description = context.payload.pull_request.body || ''; + if (description.trim().length < 20) { + core.setFailed("❌ PR description is too short. Please provide at least 20 characters."); + } -- cgit v1.2.3 From 41ef5b25530feeee775a03aafa7ee0b8b5146d4f Mon Sep 17 00:00:00 2001 From: AtlasLinden <114031241+AtlasLinden@users.noreply.github.com> Date: Tue, 10 Jun 2025 11:11:20 -0700 Subject: Resolve qatest.yaml invalid workflow error Previous edit to allow runners to work independently caused the following error: The workflow is not valid. .github/workflows/qatest.yaml (Line: 19, Col: 10): Unrecognized named-value: 'matrix'. Located at position 1 within expression: matrix.runner --- .github/workflows/qatest.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/qatest.yaml b/.github/workflows/qatest.yaml index 08c4fd4e29..5d8894a3f4 100644 --- a/.github/workflows/qatest.yaml +++ b/.github/workflows/qatest.yaml @@ -15,10 +15,6 @@ on: required: true default: '14806728332' -concurrency: - group: ${{ github.workflow }}-${{ matrix.runner }} - cancel-in-progress: false # Prevents cancellation of in-progress jobs - jobs: debug-workflow: runs-on: ubuntu-latest @@ -35,6 +31,10 @@ jobs: echo "GitHub Workflow Name: ${{ github.workflow }}" install-viewer-and-run-tests: + concurrency: + group: ${{ github.workflow }}-${{ matrix.runner }} + cancel-in-progress: false # Prevents cancellation of in-progress jobs + strategy: matrix: include: @@ -48,7 +48,7 @@ jobs: install-path: 'C:\viewer-automation-main' # Commented out until mac runner is available # - os: mac - # runner: qa-mac + # runner: qa-mac-atlas # artifact: Mac-installer # install-path: '$HOME/Documents/viewer-automation' fail-fast: false @@ -572,4 +572,4 @@ jobs: # uses: actions/upload-artifact@v4 # with: # name: test-results-${{ matrix.runner }} - # path: ${{ matrix.install-path }}/regressionTest/test_results.html \ No newline at end of file + # path: ${{ matrix.install-path }}/regressionTest/test_results.html -- cgit v1.2.3 From 03b6d09ae51761c0b3244a477c0b16ca8ac05dad Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy Date: Thu, 12 Jun 2025 03:40:20 +0300 Subject: Use windows-latest runner for sign-and-package-windows (#4263) --- .github/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 50b0cf02bc..198785d39b 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -304,7 +304,7 @@ jobs: AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} needs: build - runs-on: windows-large + runs-on: windows-latest steps: - name: Sign and package Windows viewer if: env.AZURE_KEY_VAULT_URI && env.AZURE_CERT_NAME && env.AZURE_CLIENT_ID && env.AZURE_CLIENT_SECRET && env.AZURE_TENANT_ID -- cgit v1.2.3 From 781d9fa4814b4c82473bb5bfe5ab87094434a3f5 Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy Date: Sat, 31 May 2025 15:42:08 +0300 Subject: Use latest release for changelog --- .github/workflows/build.yaml | 1 - 1 file changed, 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index a9807e1dba..3a9ed6451f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -457,7 +457,6 @@ jobs: prerelease: true generate_release_notes: true target_commitish: ${{ github.sha }} - previous_tag: release append_body: true fail_on_unmatched_files: true files: | -- cgit v1.2.3 From b0c951ffe348f478f27a85720cc7aeffea32fe73 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Geenz\" Goodman" Date: Fri, 27 Jun 2025 21:28:58 -0400 Subject: Revert "Merge develop into glTF mesh import" --- .github/workflows/build.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 4bf2af644a..198785d39b 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -218,10 +218,8 @@ jobs: prefix=${ba[0]} if [ "$prefix" == "project" ]; then IFS='_' read -ra prj <<< "${ba[1]}" - prj_str="${prj[*]}" # uppercase first letter of each word - capitalized=$(echo "$prj_str" | awk '{for (i=1; i<=NF; i++) $i = toupper(substr($i,1,1)) substr($i,2); print}') - export viewer_channel="Second Life Project $capitalized" + export viewer_channel="Second Life Project ${prj[*]^}" elif [[ "$prefix" == "release" || "$prefix" == "main" ]]; then export viewer_channel="Second Life Release" @@ -457,6 +455,7 @@ jobs: prerelease: true generate_release_notes: true target_commitish: ${{ github.sha }} + previous_tag: release append_body: true fail_on_unmatched_files: true files: | -- cgit v1.2.3 From 0bb0d3efeaf37ee008dad60710671e2739cb190d Mon Sep 17 00:00:00 2001 From: AtlasLinden <114031241+AtlasLinden@users.noreply.github.com> Date: Wed, 9 Jul 2025 08:50:41 -0700 Subject: Add mac runner Uncommenting mac runner lines to enable newly set up self-hosted runner with the workflow. --- .github/workflows/qatest.yaml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/qatest.yaml b/.github/workflows/qatest.yaml index 5d8894a3f4..11ac1edaf2 100644 --- a/.github/workflows/qatest.yaml +++ b/.github/workflows/qatest.yaml @@ -46,11 +46,10 @@ jobs: runner: qa-dan-asus artifact: Windows-installer install-path: 'C:\viewer-automation-main' - # Commented out until mac runner is available - # - os: mac - # runner: qa-mac-atlas - # artifact: Mac-installer - # install-path: '$HOME/Documents/viewer-automation' + - os: mac + runner: qa-mac-atlas + artifact: Mac-installer + install-path: '$HOME/Documents/viewer-automation' fail-fast: false runs-on: [self-hosted, "${{ matrix.runner }}"] -- cgit v1.2.3 From 8c6e766311b13ab3f8494f0db6400e82392f6660 Mon Sep 17 00:00:00 2001 From: AtlasLinden <114031241+AtlasLinden@users.noreply.github.com> Date: Wed, 9 Jul 2025 13:12:16 -0700 Subject: Adjust mac artifact name It was previously looking for a Mac-installer artifact instead of macOS-installer --- .github/workflows/qatest.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/qatest.yaml b/.github/workflows/qatest.yaml index 11ac1edaf2..7bdb8cb9aa 100644 --- a/.github/workflows/qatest.yaml +++ b/.github/workflows/qatest.yaml @@ -48,7 +48,7 @@ jobs: install-path: 'C:\viewer-automation-main' - os: mac runner: qa-mac-atlas - artifact: Mac-installer + artifact: macOS-installer install-path: '$HOME/Documents/viewer-automation' fail-fast: false -- cgit v1.2.3 From 7b4cdd3040e1ebcd37c298fd97ef03ea41c65c1b Mon Sep 17 00:00:00 2001 From: AtlasLinden <114031241+AtlasLinden@users.noreply.github.com> Date: Wed, 9 Jul 2025 14:14:40 -0700 Subject: Adjust permission before copying app --- .github/workflows/qatest.yaml | 3 +++ 1 file changed, 3 insertions(+) (limited to '.github/workflows') diff --git a/.github/workflows/qatest.yaml b/.github/workflows/qatest.yaml index 7bdb8cb9aa..9b5e0173f9 100644 --- a/.github/workflows/qatest.yaml +++ b/.github/workflows/qatest.yaml @@ -514,6 +514,9 @@ jobs: # Copy the app to the Applications folder (or specified install path) cp -R "$APP_PATH" "${{ matrix.install-path }}" + # Fix permissions before copying + chmod -R u+rw "$APP_PATH" + # Verify the app was copied successfully if [ ! -d "${{ matrix.install-path }}/$(basename "$APP_PATH")" ]; then echo "❌ Error: Failed to install application to ${{ matrix.install-path }}!" -- cgit v1.2.3 From 9533232ce740bdeaf179a806cddd4825f44b2c45 Mon Sep 17 00:00:00 2001 From: AtlasLinden <114031241+AtlasLinden@users.noreply.github.com> Date: Wed, 9 Jul 2025 14:26:09 -0700 Subject: Mount dmg to new /Volumes Currently hitting another permission error while attempting to mount dmg in tmp --- .github/workflows/qatest.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/qatest.yaml b/.github/workflows/qatest.yaml index 9b5e0173f9..707288abb8 100644 --- a/.github/workflows/qatest.yaml +++ b/.github/workflows/qatest.yaml @@ -493,11 +493,11 @@ jobs: run: | # Mac installation echo "Mounting DMG installer..." - MOUNT_POINT="/tmp/secondlife-dmg" + MOUNT_POINT="/Volumes/SecondLifeMount" mkdir -p "$MOUNT_POINT" # Mount the DMG - hdiutil attach "${{ env.INSTALLER_PATH }}" -mountpoint "$MOUNT_POINT" -nobrowse + hdiutil attach "$INSTALLER_PATH" -mountpoint "$MOUNT_POINT" -nobrowse echo "✅ DMG mounted at $MOUNT_POINT" @@ -511,14 +511,14 @@ jobs: echo "Installing application to Applications folder..." - # Copy the app to the Applications folder (or specified install path) - cp -R "$APP_PATH" "${{ matrix.install-path }}" - # Fix permissions before copying chmod -R u+rw "$APP_PATH" + # Copy the app to the Applications folder (or specified install path) + cp -R "$APP_PATH" "${{ matrix.install-path }}" + # Verify the app was copied successfully - if [ ! -d "${{ matrix.install-path }}/$(basename "$APP_PATH")" ]; then + if [ ! -d "${{ matrix.install-path }}/$(basename \"$APP_PATH\")" ]; then echo "❌ Error: Failed to install application to ${{ matrix.install-path }}!" exit 1 fi @@ -527,7 +527,7 @@ jobs: # Save mount point for cleanup echo "MOUNT_POINT=$MOUNT_POINT" >> $GITHUB_ENV - + - name: Wait for Installation to Complete (Mac) if: matrix.os == 'mac' shell: bash -- cgit v1.2.3 From c8f6eb045dba0b104afbf8bc4b01b4abd1db6b42 Mon Sep 17 00:00:00 2001 From: AtlasLinden <114031241+AtlasLinden@users.noreply.github.com> Date: Wed, 9 Jul 2025 14:27:46 -0700 Subject: Remove whitespace --- .github/workflows/qatest.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/qatest.yaml b/.github/workflows/qatest.yaml index 707288abb8..c5889a4eb3 100644 --- a/.github/workflows/qatest.yaml +++ b/.github/workflows/qatest.yaml @@ -527,7 +527,7 @@ jobs: # Save mount point for cleanup echo "MOUNT_POINT=$MOUNT_POINT" >> $GITHUB_ENV - + - name: Wait for Installation to Complete (Mac) if: matrix.os == 'mac' shell: bash -- cgit v1.2.3 From 8fe51b3c9a210b57a210e1178ae594bd5e848bc0 Mon Sep 17 00:00:00 2001 From: AtlasLinden <114031241+AtlasLinden@users.noreply.github.com> Date: Wed, 9 Jul 2025 14:38:36 -0700 Subject: Adjusting dmg mount point Permission issues yet again. Adjusting this back --- .github/workflows/qatest.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/qatest.yaml b/.github/workflows/qatest.yaml index c5889a4eb3..87e8bed1fc 100644 --- a/.github/workflows/qatest.yaml +++ b/.github/workflows/qatest.yaml @@ -493,7 +493,7 @@ jobs: run: | # Mac installation echo "Mounting DMG installer..." - MOUNT_POINT="/Volumes/SecondLifeMount" + MOUNT_POINT="/tmp/secondlife-dmg" mkdir -p "$MOUNT_POINT" # Mount the DMG -- cgit v1.2.3 From 239a9c7242307f2f738c91165038f5ac6b0c8d8a Mon Sep 17 00:00:00 2001 From: AtlasLinden <114031241+AtlasLinden@users.noreply.github.com> Date: Thu, 10 Jul 2025 08:18:16 -0700 Subject: Removing previous permission "fix" --- .github/workflows/qatest.yaml | 3 --- 1 file changed, 3 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/qatest.yaml b/.github/workflows/qatest.yaml index 87e8bed1fc..b3dd267276 100644 --- a/.github/workflows/qatest.yaml +++ b/.github/workflows/qatest.yaml @@ -511,9 +511,6 @@ jobs: echo "Installing application to Applications folder..." - # Fix permissions before copying - chmod -R u+rw "$APP_PATH" - # Copy the app to the Applications folder (or specified install path) cp -R "$APP_PATH" "${{ matrix.install-path }}" -- cgit v1.2.3 From 450d4d77f75801eba3576207e3e9df5f3e9cfdc1 Mon Sep 17 00:00:00 2001 From: AtlasLinden <114031241+AtlasLinden@users.noreply.github.com> Date: Thu, 10 Jul 2025 08:39:09 -0700 Subject: New copy app command An attempt to resolve another permission issue --- .github/workflows/qatest.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/qatest.yaml b/.github/workflows/qatest.yaml index b3dd267276..62b83f814f 100644 --- a/.github/workflows/qatest.yaml +++ b/.github/workflows/qatest.yaml @@ -512,7 +512,7 @@ jobs: echo "Installing application to Applications folder..." # Copy the app to the Applications folder (or specified install path) - cp -R "$APP_PATH" "${{ matrix.install-path }}" + rsync -a --no-xattrs --inplace "$APP_PATH" "${{ matrix.install-path }}/" # Verify the app was copied successfully if [ ! -d "${{ matrix.install-path }}/$(basename \"$APP_PATH\")" ]; then -- cgit v1.2.3 From 2f77cd09a98c2fbc1e928bf04d400afdeaf55a13 Mon Sep 17 00:00:00 2001 From: AtlasLinden <114031241+AtlasLinden@users.noreply.github.com> Date: Thu, 10 Jul 2025 08:42:34 -0700 Subject: Remove --no-xattrs option --- .github/workflows/qatest.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/qatest.yaml b/.github/workflows/qatest.yaml index 62b83f814f..db6268e200 100644 --- a/.github/workflows/qatest.yaml +++ b/.github/workflows/qatest.yaml @@ -512,7 +512,7 @@ jobs: echo "Installing application to Applications folder..." # Copy the app to the Applications folder (or specified install path) - rsync -a --no-xattrs --inplace "$APP_PATH" "${{ matrix.install-path }}/" + rsync -a --inplace "$APP_PATH" "${{ matrix.install-path }}/" # Verify the app was copied successfully if [ ! -d "${{ matrix.install-path }}/$(basename \"$APP_PATH\")" ]; then -- cgit v1.2.3 From c70875e0ba93151a19c7b48e3d66dfe9ed556171 Mon Sep 17 00:00:00 2001 From: AtlasLinden <114031241+AtlasLinden@users.noreply.github.com> Date: Thu, 10 Jul 2025 08:56:37 -0700 Subject: Redirecting viewer installation to Application directory --- .github/workflows/qatest.yaml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/qatest.yaml b/.github/workflows/qatest.yaml index db6268e200..ba2c0ed6d9 100644 --- a/.github/workflows/qatest.yaml +++ b/.github/workflows/qatest.yaml @@ -501,7 +501,9 @@ jobs: echo "✅ DMG mounted at $MOUNT_POINT" - # Find the app in the mounted DMG + echo "Installing application to default location from DMG..." + + # Find the .app bundle in the DMG APP_PATH=$(find "$MOUNT_POINT" -name "*.app" -type d | head -1) if [ -z "$APP_PATH" ]; then @@ -509,18 +511,17 @@ jobs: exit 1 fi - echo "Installing application to Applications folder..." - - # Copy the app to the Applications folder (or specified install path) - rsync -a --inplace "$APP_PATH" "${{ matrix.install-path }}/" + # Use the default macOS installer to copy the .app to /Applications + cp -R "$APP_PATH" /Applications/ # Verify the app was copied successfully - if [ ! -d "${{ matrix.install-path }}/$(basename \"$APP_PATH\")" ]; then - echo "❌ Error: Failed to install application to ${{ matrix.install-path }}!" + APP_NAME=$(basename "$APP_PATH") + if [ ! -d "/Applications/$APP_NAME" ]; then + echo "❌ Error: Failed to install application to /Applications!" exit 1 fi - echo "✅ Application installed successfully to ${{ matrix.install-path }}" + echo "✅ Application installed successfully to /Applications" # Save mount point for cleanup echo "MOUNT_POINT=$MOUNT_POINT" >> $GITHUB_ENV -- cgit v1.2.3 From db5af314b9054be7c4c021643d43852bf06cef6d Mon Sep 17 00:00:00 2001 From: AtlasLinden <114031241+AtlasLinden@users.noreply.github.com> Date: Thu, 10 Jul 2025 10:27:16 -0700 Subject: Remove previously installed viewer More permission issues encountered if a job is repeated. That is, when attempting to replace an existing installed viewer. --- .github/workflows/qatest.yaml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/qatest.yaml b/.github/workflows/qatest.yaml index ba2c0ed6d9..29d55c775f 100644 --- a/.github/workflows/qatest.yaml +++ b/.github/workflows/qatest.yaml @@ -511,12 +511,20 @@ jobs: exit 1 fi - # Use the default macOS installer to copy the .app to /Applications + APP_NAME=$(basename "$APP_PATH") + DEST_PATH="/Applications/$APP_NAME" + + # Remove existing installation if it exists to avoid permission conflicts + if [ -d "$DEST_PATH" ]; then + echo "Removing existing installation..." + sudo rm -rf "$DEST_PATH" + fi + + # Copy the .app to /Applications cp -R "$APP_PATH" /Applications/ # Verify the app was copied successfully - APP_NAME=$(basename "$APP_PATH") - if [ ! -d "/Applications/$APP_NAME" ]; then + if [ ! -d "$DEST_PATH" ]; then echo "❌ Error: Failed to install application to /Applications!" exit 1 fi -- cgit v1.2.3 From 9cc5c072990e90777fc8df69c26a92975e788054 Mon Sep 17 00:00:00 2001 From: AtlasLinden <114031241+AtlasLinden@users.noreply.github.com> Date: Thu, 10 Jul 2025 10:36:16 -0700 Subject: New method to handle removing previous viewer Moving previous viewer to trash instead of "removing" it. --- .github/workflows/qatest.yaml | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to '.github/workflows') diff --git a/.github/workflows/qatest.yaml b/.github/workflows/qatest.yaml index 29d55c775f..4e10900441 100644 --- a/.github/workflows/qatest.yaml +++ b/.github/workflows/qatest.yaml @@ -514,13 +514,28 @@ jobs: APP_NAME=$(basename "$APP_PATH") DEST_PATH="/Applications/$APP_NAME" - # Remove existing installation if it exists to avoid permission conflicts + # Handle existing installation if [ -d "$DEST_PATH" ]; then - echo "Removing existing installation..." - sudo rm -rf "$DEST_PATH" + echo "Found existing installation at: $DEST_PATH" + echo "Moving existing installation to trash..." + + # Move to trash instead of force removing + TRASH_PATH="$HOME/.Trash/$(date +%Y%m%d_%H%M%S)_$APP_NAME" + mv "$DEST_PATH" "$TRASH_PATH" || { + echo "⚠️ Could not move to trash, trying direct removal..." + rm -rf "$DEST_PATH" || { + echo "❌ Could not remove existing installation" + echo "Please manually remove: $DEST_PATH" + exit 1 + } + } + + echo "✅ Existing installation handled successfully" fi # Copy the .app to /Applications + echo "Copying app from: $APP_PATH" + echo "To destination: /Applications/" cp -R "$APP_PATH" /Applications/ # Verify the app was copied successfully -- cgit v1.2.3 From 9311b522d8979cfe6e7a751f9447df8e0c3d1e96 Mon Sep 17 00:00:00 2001 From: AtlasLinden <114031241+AtlasLinden@users.noreply.github.com> Date: Wed, 30 Jul 2025 13:56:44 -0700 Subject: Add new runners to QA workflow --- .github/workflows/qatest.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/qatest.yaml b/.github/workflows/qatest.yaml index 4e10900441..457e915726 100644 --- a/.github/workflows/qatest.yaml +++ b/.github/workflows/qatest.yaml @@ -43,7 +43,11 @@ jobs: artifact: Windows-installer install-path: 'C:\viewer-automation-main' - os: windows - runner: qa-dan-asus + runner: qa-windows-asus-dan + artifact: Windows-installer + install-path: 'C:\viewer-automation-main' + - os: windows + runner: qa-windows-z600-dan artifact: Windows-installer install-path: 'C:\viewer-automation-main' - os: mac -- cgit v1.2.3