diff options
| author | AtlasLinden <114031241+AtlasLinden@users.noreply.github.com> | 2025-07-16 09:52:52 -0400 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-16 09:52:52 -0400 | 
| commit | f97ae3c151f252d4559ac627a51b1ebf9d434b08 (patch) | |
| tree | 67a0187b73603f3d9fa746e463da5ecd16c5a9a7 | |
| parent | 268ec1f9c2428c6bdc3cf2086246ed125366af8d (diff) | |
| parent | 9cc5c072990e90777fc8df69c26a92975e788054 (diff) | |
Merge pull request #4354 from secondlife/atlas-qaworkflow
Add mac self-hosted runner to QA workflow 
| -rw-r--r-- | .github/workflows/qatest.yaml | 49 | 
1 files changed, 36 insertions, 13 deletions
diff --git a/.github/workflows/qatest.yaml b/.github/workflows/qatest.yaml index 5d8894a3f4..4e10900441 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: macOS-installer +            install-path: '$HOME/Documents/viewer-automation'        fail-fast: false      runs-on: [self-hosted, "${{ matrix.runner }}"] @@ -498,11 +497,13 @@ jobs:            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" -          # 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 @@ -510,18 +511,40 @@ jobs:              exit 1            fi -          echo "Installing application to Applications folder..." +          APP_NAME=$(basename "$APP_PATH") +          DEST_PATH="/Applications/$APP_NAME" + +          # Handle existing installation +          if [ -d "$DEST_PATH" ]; then +            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 the Applications folder (or specified install path) -          cp -R "$APP_PATH" "${{ matrix.install-path }}" +          # 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 -          if [ ! -d "${{ matrix.install-path }}/$(basename "$APP_PATH")" ]; then -            echo "❌ Error: Failed to install application to ${{ matrix.install-path }}!" +          if [ ! -d "$DEST_PATH" ]; 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  | 
