-
Notifications
You must be signed in to change notification settings - Fork 433
Add simulator build step to iOS scripts workflow #3965
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
Add simulator build step to iOS scripts workflow #3965
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting
.github/workflows/scripts-ios.yml
Outdated
| - name: Compile generated Xcode project for Simulator | ||
| run: | | ||
| set -euo pipefail | ||
| tmpdir="${TMPDIR:-/tmp}" | ||
| derived_data="${tmpdir%/}/codenameone-derived" | ||
| mkdir -p "$derived_data" | ||
| built_any=0 | ||
| while IFS= read -r -d '' project; do | ||
| built_any=1 | ||
| scheme="$(basename "$project" .xcodeproj)" | ||
| echo "::group::Building $scheme from $project" | ||
| xcodebuild \ | ||
| -project "$project" \ | ||
| -scheme "$scheme" \ | ||
| -sdk iphonesimulator \ | ||
| -configuration Debug \ | ||
| -destination 'generic/platform=iOS Simulator' \ | ||
| -derivedDataPath "$derived_data" \ | ||
| CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO \ | ||
| build | ||
| echo "::endgroup::" | ||
| done < <(find "$PWD" -type d -path '*/dist/*.xcodeproj' -print0) | ||
| if [ "$built_any" -eq 0 ]; then | ||
| echo "::error::No generated Xcode project found under dist directories" >&2 | ||
| find "$PWD" -maxdepth 6 -type d -name '*.xcodeproj' | ||
| exit 1 |
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.
Simulator build step always fails without generated project
The new step assumes find "$PWD" -type d -path '*/dist/*.xcodeproj' will return at least one Xcode project and explicitly exits with ::error:: if none are found. However, the preceding scripts/build-ios-port.sh simply runs Maven to build the iOS port (see scripts/build-ios-port.sh) and does not generate any .xcodeproj files. As written, this step will never find a project and will fail every run of the scripts-ios workflow even when the build itself succeeds, effectively breaking CI for every PR that touches scripts. Consider generating a project before this step or making the step conditional so the workflow still passes when no projects are produced.
Useful? React with 👍 / 👎.
Summary
Testing
https://chatgpt.com/codex/tasks/task_e_68ef061e115c8331a16887d76a368caf