I'm looking into changing some build ordering in build-script and wanted to check if there were any problems anyone might have that I'm overlooking.
Currently the build-script builds, installs, and tests a small set of core projects before doing anything for the wider set of projects. Some projects, like swiftpm and swift-driver rely on the toolchain being fully built and installed before they can start building. Because of the current ordering, Swift will be tested before swift-driver gets a chance to build.
The direct motivation for this change is that we would like to make it possible to run the Swift test suite against swift-driver, which would require running tests later, after all the components have been built.
The current ordering in build-script looks like this:
Build all core build products Test all core build products Install all core build products For each other build products: Build Test Install
And I would like to make it something more like this:
For each build product: Build Install For each build product: Test
This is hopefully a more flexible ordering for this purpose.
Possible downsides I can think of right now are minor:
- Some builds with tests might fail slightly later, but others will fail faster, so this is just a tradeoff.
- It installs products before testing them, but since installs go to the toolchain in the build directory I'm not sure if this is a problem to anyone.
I have a draft PR implementing this change here: