-
Notifications
You must be signed in to change notification settings - Fork 721
Separate build and test steps in macos_tests.yml
#3162
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
Conversation
Separate build and test steps in `macos_tests.yml`. Test execution can now also be disabled through an input. This is useful for clarity of output and also in some cases where test execution may not be supported yet.
.github/workflows/macos_tests.yml
Outdated
| submodules: true | ||
| - name: Swift build | ||
| run: | | ||
| swift build --build-tests |
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.
Should there be build argument overrides as well?
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.
Good point, added
| cat >> "$GITHUB_OUTPUT" << EOM | ||
| darwin-matrix=$( | ||
| xcode_15_4_enabled="${MATRIX_MACOS_15_4_ENABLED:=true}" | ||
| xcode_15_4_build_arguments_override="${MATRIX_MACOS_15_4_BUILD_ARGUMENTS_OVERRIDE:=""}" |
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.
Do these need to be listed in the inputs?
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.
Good catch. I've not added it to 15.4 since that's deprecated. The bash defaulting should take care of this.
| - name: Swift build | ||
| run: | | ||
| if [ -n "${{ matrix.config.build_arguments_override }}" ]; then | ||
| swift build "${{ matrix.config.build_arguments_override }}" |
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.
Just checking that --build-tests is purposefully dropped here because the args are being overridden?
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.
Yeah I thought giving people power to totally customize was more general.
Separate build and test steps in
macos_tests.yml. Test execution can now also be disabled through an input. This is useful for clarity of output and also in some cases where test execution may not be supported yet.