2.7.1 Working Changes (#1392) #51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Upload dSYM Files | |
| on: | |
| push: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: macos-15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Select Xcode Version | |
| run: sudo xcode-select -s /Applications/Xcode.app/Contents/Developer | |
| - name: Show Xcode Version | |
| run: xcodebuild -version | |
| - name: Setup Environment Variables | |
| env: | |
| DATADOG_CLIENT_TOKEN: ${{ secrets.DATADOG_CLIENT_TOKEN }} | |
| run: | | |
| echo "DATADOG_CLIENT_TOKEN=${DATADOG_CLIENT_TOKEN}" >> $GITHUB_ENV | |
| - name: Build iOS App and Generate dSYMs | |
| env: | |
| DATADOG_CLIENT_TOKEN: ${{ secrets.DATADOG_CLIENT_TOKEN }} | |
| run: | | |
| # Create build directory | |
| mkdir -p ./build/dSYMs | |
| # Build for iOS Simulator to generate dSYMs without code signing | |
| xcodebuild \ | |
| -workspace Meshtastic.xcworkspace \ | |
| -scheme Meshtastic \ | |
| -configuration Release \ | |
| -destination 'generic/platform=iOS Simulator' \ | |
| -derivedDataPath ./build/DerivedData \ | |
| DATADOG_CLIENT_TOKEN="${DATADOG_CLIENT_TOKEN}" \ | |
| DEBUG_INFORMATION_FORMAT=dwarf-with-dsym \ | |
| CODE_SIGNING_REQUIRED=NO \ | |
| CODE_SIGNING_ALLOWED=NO \ | |
| build | |
| - name: Extract dSYMs from Build | |
| run: | | |
| # Find and copy all dSYM files from the build | |
| find ./build/DerivedData -name "*.dSYM" -exec cp -R {} ./build/dSYMs/ \; | |
| # List what we found | |
| echo "Found dSYM files:" | |
| find ./build/dSYMs -name "*.dSYM" -type d | |
| - name: Install Datadog CI | |
| run: | | |
| npm install -g @datadog/datadog-ci | |
| - name: Upload dSYMs to Datadog | |
| env: | |
| DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }} | |
| DATADOG_SITE: us5.datadoghq.com | |
| run: | | |
| # Upload all dSYM files to Datadog | |
| if [ -d "./build/dSYMs" ] && [ "$(find ./build/dSYMs -name "*.dSYM" -type d | wc -l)" -gt 0 ]; then | |
| echo "Uploading dSYM files to Datadog..." | |
| datadog-ci dsyms upload ./build/dSYMs | |
| else | |
| echo "No dSYM files found to upload" | |
| exit 1 | |
| fi | |
| - name: Upload Build Artifacts | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: dsym-files | |
| path: | | |
| ./build/dSYMs | |
| ./build/DerivedData | |
| retention-days: 30 |