Skip to content

fix: Rokt User Attribute Mapping Fix #712

fix: Rokt User Attribute Mapping Fix

fix: Rokt User Attribute Mapping Fix #712

name: iOS SDK Build and Lint
on: [pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
pull-requests: read
checks: write
id-token: write
env:
XCODE_VERSION: "16.4"
jobs:
pod-lint:
runs-on: macOS-15
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Select Xcode
run: sudo xcode-select -s /Applications/Xcode_${{ env.XCODE_VERSION }}.app
- name: Update xcodeproj gem
run: sudo gem install xcodeproj
- name: Prevent social URL warnings if twitter is unreachable
run: find . -path '*.podspec' -exec perl -pi -e 's/.+\.social_media_url.+//' {} \;
- name: Lint with CocoaPods
run: pod lib lint
- name: Undo twitter change to podspec
run: git checkout *.podspec
xcode-build:
runs-on: macOS-15
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Select Xcode
run: sudo xcode-select -s /Applications/Xcode_${{ env.XCODE_VERSION }}.app
- name: Build SDK
run: |
set -o pipefail
xcodebuild \
-project "mParticle-Apple-SDK.xcodeproj" \
-scheme "mParticle-Apple-SDK" \
-destination "generic/platform=iOS" \
clean build | xcpretty
- name: Build SDK NoLocation
run: |
set -o pipefail
xcodebuild \
-project "mParticle-Apple-SDK.xcodeproj" \
-scheme "mParticle-Apple-SDK-NoLocation" \
-destination "generic/platform=iOS" \
clean build | xcpretty
run-analyzer:
runs-on: macOS-15
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Select Xcode
run: sudo xcode-select -s /Applications/Xcode_${{ env.XCODE_VERSION }}.app
- name: Run static analyzer
run: |
bash -c '! (set -o pipefail && xcodebuild -project "mParticle-Apple-SDK.xcodeproj" -scheme "mParticle-Apple-SDK" -sdk iphonesimulator -configuration Debug -destination "platform=iOS Simulator,name=iPhone 16 Pro,OS=latest" clean analyze | grep -v "warning: The iOS Simulator deployment target" | grep -v "warning: Metadata extraction skipped" | grep -F -v "Repeated use of MParticle sharedInstance in one method; assign to a local variable once." | grep -F -v "warning: Run script build phase '"'"'Run Script'"'"' will be run during every build" | grep -B3 "warning")'
pr-notify:
if: >
github.event_name == 'pull_request' &&
github.event.pull_request.draft == false
needs:
- pod-lint
- xcode-build
- run-analyzer
name: Notify GChat
uses: ROKT/rokt-workflows/.github/workflows/oss_pr_opened_notification.yml@main
secrets:
gchat_webhook: ${{ secrets.GCHAT_PRS_WEBHOOK }}