Skip to content

Add release-mode test runs for macOS and Linux #134

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

natecook1000
Copy link
Member

@natecook1000 natecook1000 commented Jun 16, 2025

This adds a Build / Test [release] step to the tests for macOS and Linux, so that tests can be run in both modes. It includes new inputs for:

  • macos_release_build_command (default: xcrun swift test -c release)
  • linux_release_build_command (default: swift test -c release)
  • enable_release_tests (default: false)

@natecook1000 natecook1000 requested a review from a team as a code owner June 16, 2025 01:35
@natecook1000 natecook1000 force-pushed the swift-test-c-release branch 3 times, most recently from 6fcd646 to 2cc0791 Compare June 16, 2025 01:44
@natecook1000 natecook1000 force-pushed the swift-test-c-release branch from 2cc0791 to 28ea3dc Compare June 16, 2025 01:50
@rauhul
Copy link
Member

rauhul commented Jun 16, 2025

Why not just run in release always?

@FranzBusch
Copy link
Member

Why not just run in release always?

Most packages don't support building tests in release mode due to @testable imports AFAIK

@rauhul
Copy link
Member

rauhul commented Jun 16, 2025

@testable supports release mode. It just makes internal api visible outside the module unit.

@natecook1000
Copy link
Member Author

Huh, that isn't my experience! I thought it would just be easier to not block on this for packages that couldn't support it fully.

@ahoppen
Copy link
Member

ahoppen commented Jun 17, 2025

I think you need to pass --enable-testable-imports to test a package with @testable imports in release mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants