-
Notifications
You must be signed in to change notification settings - Fork 157
Update automation.yml for Azure Pipelines #2819
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
|
Please add additional information about this issue or PR. Please be as descriptive as possible. |
| displayName: Replace HEADER_SEARCH_PATHS for NativeAuth subspec in MSAL.podspec | ||
| inputs: | ||
| targetType: 'inline' | ||
| script: | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This pull request does not update CHANGELOG.md.
Please consider if this change would be noticeable to a partner or user and either update CHANGELOG.md or resolve this conversation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a new xcodebuild task to the cocoapods_lib_lint job in the automation pipeline to build the MSAL workspace before running pod lib lint.
Changes:
- Added a Bash task that executes xcodebuild to build the 'MSAL Test Automation (iOS)' scheme for iOS Simulator
| - task: Bash@3 | ||
| displayName: Build MSAL workspace | ||
| inputs: | ||
| targetType: 'inline' | ||
| script: | | ||
| xcodebuild build \ | ||
| -workspace MSAL.xcworkspace \ | ||
| -scheme 'MSAL Test Automation (iOS)' \ | ||
| -sdk 'iphonesimulator' \ | ||
| -destination 'platform=iOS Simulator,name=iPhone 16,OS=18.1' \ | ||
| -derivedDataPath 'build' |
Copilot
AI
Jan 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This build task uses direct xcodebuild commands instead of the repository's recommended build.py script. According to the project guidelines in .clinerules/AGENTS.md, the repository uses a Python script build.py to manage build and test operations, and the guidelines state to "prefer using the script over raw xcodebuild commands as it handles destination flags and settings correctly."
Additionally, this introduces an inconsistency: the other automation jobs in this file (ui_automation, e2e_test_native_auth_ios, e2e_test_native_auth_mac) use the templates/tests-with-conf-file.yml template which performs a proper build-for-testing step with configuration file setup from KeyVault. The cocoapods_lib_lint job appears to need the build artifacts from the automation test scheme, but this direct xcodebuild approach bypasses the established automation test infrastructure.
| displayName: Build MSAL workspace | ||
| inputs: | ||
| targetType: 'inline' | ||
| script: | | ||
| xcodebuild build \ | ||
| -workspace MSAL.xcworkspace \ | ||
| -scheme 'MSAL Test Automation (iOS)' \ | ||
| -sdk 'iphonesimulator' \ | ||
| -destination 'platform=iOS Simulator,name=iPhone 16,OS=18.1' \ | ||
| -derivedDataPath 'build' |
Copilot
AI
Jan 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The xcodebuild 'build' command is used here, but the ui_automation job uses 'build-for-testing' (line 43 in templates/tests-with-conf-file.yml). The 'MSAL Test Automation (iOS)' scheme is a test scheme that requires special configuration including a conf.json file from Azure KeyVault. Without the proper build-for-testing approach and configuration setup, this build may not produce the correct artifacts or may fail entirely.
If the intent is to prepare artifacts for the cocoapods validation, consider either:
- Using the build.py script with appropriate targets
- Reusing the existing template that properly handles test scheme builds
- Using a non-test scheme that doesn't require automation configuration
| displayName: Build MSAL workspace | |
| inputs: | |
| targetType: 'inline' | |
| script: | | |
| xcodebuild build \ | |
| -workspace MSAL.xcworkspace \ | |
| -scheme 'MSAL Test Automation (iOS)' \ | |
| -sdk 'iphonesimulator' \ | |
| -destination 'platform=iOS Simulator,name=iPhone 16,OS=18.1' \ | |
| -derivedDataPath 'build' | |
| displayName: Build MSAL iOS framework with build.py | |
| inputs: | |
| targetType: 'inline' | |
| script: | | |
| python3 ./build.py --targets iosFramework | |
| workingDirectory: '$(Build.SourcesDirectory)' |
| -workspace MSAL.xcworkspace \ | ||
| -scheme 'MSAL Test Automation (iOS)' \ | ||
| -sdk 'iphonesimulator' \ | ||
| -destination 'platform=iOS Simulator,name=iPhone 16,OS=18.1' \ |
Copilot
AI
Jan 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The iOS Simulator device and OS version specified here (iPhone 16, OS 18.1) must match the simulator available on the vmImage 'macOS-14' pool (defined at line 28). The build.py script uses iPhone 15 with iOS 17.5 as defaults. Additionally, the templates/tests-with-conf-file.yml uses Xcode 16.1 (line 13), but this task doesn't include the Xcode version selection step. Verify that:
- iPhone 16 simulator with iOS 18.1 is available on macOS-14 agents
- The default Xcode on macOS-14 supports these specifications
- Consider adding an Xcode selection step before this build task for consistency
No description provided.