diff --git a/.github/workflows/build_deps.yml b/.github/workflows/build_deps.yml index 6cd71744b1..1a31b91e49 100644 --- a/.github/workflows/build_deps.yml +++ b/.github/workflows/build_deps.yml @@ -159,5 +159,6 @@ jobs: with: os: ${{ inputs.os }} pdb-artifact-name: PDB - release: ${{ github.sha }} + dsym-artifact-name: ${{ inputs.os == 'macos-14' && format('dSYM_Mac_{0}', needs.build_orca.outputs.release) || '' }} + release: ${{ needs.build_orca.outputs.release || github.sha }} secrets: inherit \ No newline at end of file diff --git a/.github/workflows/build_orca.yml b/.github/workflows/build_orca.yml index b9411fd28d..76a92bfc86 100644 --- a/.github/workflows/build_orca.yml +++ b/.github/workflows/build_orca.yml @@ -204,6 +204,14 @@ jobs: path: ${{ github.workspace }}/Snapmaker_Orca_profile_validator_Mac_universal_${{ env.ver }}.dmg if-no-files-found: ignore + - name: Upload dSYM artifacts mac + if: inputs.os == 'macos-14' + uses: actions/upload-artifact@v4 + with: + name: dSYM_Mac_${{ env.ver }} + path: ${{ github.workspace }}/build/universal/Snapmaker_Orca/dSYM + if-no-files-found: ignore + - name: Deploy Mac release if: (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/2.2.0') && inputs.os == 'macos-14' uses: WebFreak001/deploy-nightly@v3.2.0 diff --git a/.github/workflows/sentry_cli.yml b/.github/workflows/sentry_cli.yml index 0693fab2a0..869f5943a5 100644 --- a/.github/workflows/sentry_cli.yml +++ b/.github/workflows/sentry_cli.yml @@ -11,6 +11,10 @@ on: required: false type: string description: "Artifact name for Windows PDB archive (e.g., 'PDB')" + dsym-artifact-name: + required: false + type: string + description: "Artifact name for macOS dSYM archive (e.g., 'dSYM_Mac_V1.0.0')" release: required: true type: string @@ -86,7 +90,49 @@ jobs: } # ==================== macOS ==================== + - name: "[macOS] Install sentry-cli via brew" + if: inputs.os == 'macos-14' + run: | + brew install getsentry/tap/sentry-cli || true + sentry-cli --version + - name: "[macOS] Download dSYM artifact" + if: inputs.os == 'macos-14' + uses: actions/download-artifact@v4 + with: + name: ${{ inputs.dsym-artifact-name }} + path: ./symbols + + - name: "[macOS] Upload dSYM to Sentry (sentry-cli)" + if: inputs.os == 'macos-14' + env: + SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} + SENTRY_LOG_LEVEL: debug + run: | + echo "Checking for dSYM files in ./symbols..." + find ./symbols -name "*.dSYM" -type d | while read dsym; do + echo "Found dSYM: $dsym" + done + + dsymCount=$(find ./symbols -name "*.dSYM" -type d | wc -l | tr -d ' ') + if [ "$dsymCount" -gt 0 ]; then + echo "Found $dsymCount dSYM file(s) to upload from ./symbols:" + find ./symbols -name "*.dSYM" -type d | while read dsym; do + echo " - $dsym" + done + echo "" + echo "Starting Sentry upload with debug logging..." + sentry-cli --log-level=debug --auth-token "$SENTRY_AUTH_TOKEN" upload-dif --org "${{ secrets.SENTRY_ORG }}" --project "${{ secrets.SENTRY_PROJECT }}" --release "${{ inputs.release }}" ./symbols + if [ $? -ne 0 ]; then + echo "::error::Sentry upload failed with exit code $?" + exit 1 + fi + else + echo "::error::No dSYM files found in ./symbols" + echo "Contents of ./symbols:" + find ./symbols -type f -o -type d | head -20 + exit 1 + fi # ==================== Linux ====================