Commit Graph

404 Commits

Author SHA1 Message Date
Saleem Abdulrasool
b33be25549 Merge pull request #80441 from brianmichel/brian/always-restore-env-variables
Always restore old env variables
2025-04-08 10:35:23 +03:00
Brian Michel
07dac7b5c5 Update utils/build.ps1
Co-authored-by: Saleem Abdulrasool <compnerd@compnerd.org>
2025-04-07 17:01:28 -04:00
Saleem Abdulrasool
c3d7c9dc5f utils: print SCCache summary in summary view
This prints the stats for SCCache in the build as well to help
understand cache utilisation.
2025-04-07 12:30:41 -07:00
Saleem Abdulrasool
a20b568c07 Merge pull request #80157 from compnerd/helper
utils: extract `Build-SDK` helper
2025-04-07 18:19:29 +03:00
Brian Michel
c9437b522b Always restore old env variables
When we invoke the script block it could throw an exception so we should
wrap it in a try finally block to ensure that we can restore the old
environment variables, otherwise you can end up back in a shell that has
an incorrect set of variables set.

This is most noticable if an exception is thrown when entering the vs
dev shell since without resetting the old vars you will have invalid
Visual Studio env variables set meaning you need to manually reset your
shell environment.
2025-04-01 12:32:19 -04:00
Brian Michel
c0c9116bd6 Remove cache configuration from EanbleCaching
EnableCaching should only configure cmake to allow for sccache usage, it
should not configure sccache itself in any way. Those configuration
options should be deferred into the environment variables that sccache
will look for when it starts up.
2025-04-01 11:13:06 -04:00
Brian Michel
09664ee7cb Add remote caching option
When setting up sccache we can choose between local disk caching or
remote caching via an S3-ish blob storage engine. To allow for backward
compatibility for anyone that might be using the existing option for
disk caching we leave it place and instead provide a new remote caching
option.

This option assumes you've read the sccache documentation for setting up
the correct environment variables for telling sccache where to find the
bucket and how to authenticate to it.
2025-03-31 19:28:35 -04:00
Saleem Abdulrasool
36af875572 Merge pull request #80289 from jeffdav/win-build-compilers-test-split
utils: Breakup Build-Compilers into Build- and Test- steps.
2025-03-29 17:19:47 -07:00
Saleem Abdulrasool
78a2057934 utils: extract Build-SDK helper
This creates a helper for building the SDK for a given OS/Architecture.
The building of the SDK should be uniform and this ensures that we can
maintain that uniformity.

This also highlights any structural changes that are being adjusted
manually. The desire is to bring this to zero by gaining control over
the install rules.
2025-03-28 20:28:22 -07:00
Saleem Abdulrasool
f3329376ca Merge pull request #80341 from compnerd/new-currency
utils: enable swift_Concurrency on the new build
2025-03-28 13:47:35 -07:00
Jeff
4f8af6cc9c utils: Breakup Build-Compilers into Build- and Test- steps. 2025-03-27 18:27:40 -07:00
Saleem Abdulrasool
d644044c1c Merge pull request #80336 from jeffdav/win-build-summary-sort
utils: Fix build.ps1 summary sorting.
2025-03-27 13:26:05 -07:00
Saleem Abdulrasool
075b973f98 utils: enable swift_Concurrency on the new build
Enable the Concurrency runtime for the experimental runtime builds on
Windows. This is required to enable the use of the static runtime to
bootstrap the early swift-driver.
2025-03-27 08:31:45 -07:00
Jeff
92b0849a56 utils: Fix build.ps1 summary sorting. 2025-03-26 22:02:42 -07:00
Saleem Abdulrasool
f042eb8755 Merge pull request #80323 from jeffdav/win-build-fix-android-os-enum-refs
utils: Fix Android OS enum usage in function params.
2025-03-26 20:05:39 -07:00
Jeff
f863570499 utils: Fix Android OS enum usage in function params. 2025-03-26 15:21:24 -07:00
Jeff
828a3470e8 utils: Add back missing ToolchainInstallRoot properties. 2025-03-25 21:43:36 -07:00
Jeff
f3c95329bc PR Feedback. 2025-03-24 13:28:44 -07:00
Jeff
498f8f7909 Add fixme. 2025-03-21 11:05:15 -07:00
Jeff
dd6f1c29b3 Fix missing param. 2025-03-21 10:18:44 -07:00
Jeff
b150d4c94e PR Feedback 2. 2025-03-20 21:57:27 -07:00
Jeff
3daeb9c7b9 PR Feedback. 2025-03-20 17:08:41 -07:00
Jeff
643f904353 utils: Handle additional args to Invoke-BuildStep in build.ps1. 2025-03-20 15:17:27 -07:00
Jeff
ad744421fd utils: Convert build.ps1 to use Platform definitions. 2025-03-20 15:17:25 -07:00
Saleem Abdulrasool
1289c9614e Merge pull request #80092 from compnerd/versioning
utils: version testing frameworks
2025-03-20 10:20:40 -07:00
Saleem Abdulrasool
1e74bdffa0 Merge branch 'main' into timing 2025-03-19 22:28:46 -07:00
Saleem Abdulrasool
8e10b00984 Merge pull request #80148 from weliveindetail/windrd-unblock-nightly
utils: temporarily ignore test failure for Android runtimes
2025-03-19 21:42:57 -07:00
Saleem Abdulrasool
1b1274f7c1 Merge pull request #80125 from hjyamauchi/foundationmacros
Fix FoundationMacro build failure in ARM64 cross-build
2025-03-19 20:13:36 -07:00
Saleem Abdulrasool
440ebee0bb utils: collect more build times
Add time collection for the test execution. This will allow us to
immediately see in the summary the time expenditure.
2025-03-19 16:54:43 -07:00
Saleem Abdulrasool
89e9681592 utils: remove extra timing data collection
The timing data collection is now homed under `Invoke-BuildStep`.
`Build-SPMProject` is an implementation detail of the build step and is
timed at a higher level.
2025-03-19 16:53:35 -07:00
Saleem Abdulrasool
befc15e6df Merge pull request #80082 from compnerd/isolated
utils: split `Build-*` into `Build-` and `Test-`
2025-03-19 16:31:04 -07:00
Stefan Gränitz
123b25d20a utils: temporarily ignore test failure for Android runtimes 2025-03-20 00:16:56 +01:00
Saleem Abdulrasool
f20ff950ec utils: split Build-Dispatch into Build- and Test- function
Split up the test routines from the build routines. This is motivated by
the desire to simplify (remove logic flow) and to help get more accurate
timing data.
2025-03-19 11:13:43 -07:00
Saleem Abdulrasool
ae1f4cae7b utils: split Build-Foundation into Build- and Test- function
Split up the test routines from the build routines. This is motivated by
the desire to simplify (remove logic flow) and to help get more accurate
timing data.
2025-03-19 11:13:42 -07:00
Saleem Abdulrasool
789bd1fc0d utils: split Build-Testing into Build- and Test- function
Split up the test routines from the build routines. This is motivated by
the desire to simplify (remove logic flow) and to help get more accurate
timing data.
2025-03-19 11:12:03 -07:00
Saleem Abdulrasool
2c02471271 utils: split Build-LLBuild into Build- and Test- function
Split up the test routines from the build routines. This is motivated by
the desire to simplify (remove logic flow) and to help get more accurate
timing data.
2025-03-19 11:12:03 -07:00
Saleem Abdulrasool
e7c8dc66ad utils: remove extraneous parameter (NFC)
The callee does not take any parameters, remove the extra leftover
parameter.
2025-03-19 11:12:03 -07:00
Hiroshi Yamauchi
2ff8806fa8 Fix FoundationMacro build failure in ARM64 cross-build 2025-03-19 10:54:58 -07:00
Saleem Abdulrasool
6ead8cb5bd utils: correct straggling function replacement 2025-03-19 09:00:06 -07:00
Alex Hoppen
d870056efd Merge pull request #80076 from ahoppen/foundation-tests-debug
[tests] Run swift-(corelibs-)foundation tests in debug configuration on Windows
2025-03-19 08:16:30 -07:00
Saleem Abdulrasool
f457d9ccd4 Merge pull request #80099 from hjyamauchi/minjectverbose
Make minject not verbose
2025-03-18 21:28:23 -07:00
Alex Hoppen
3557451e54 [tests] Run swift-(corelibs-)foundation tests in debug configuration on Windows
This should improve CI times because building in debug configuration instead of release configuration is significantly faster. Since we don’t install the build of swift-(corelibs-)foundation using SwiftPM into the toolchain, this doesn’t have any performance impact on users of the toolchain.
2025-03-18 14:11:38 -07:00
Hiroshi Yamauchi
187c7981c5 Make minject not verbose 2025-03-18 13:15:04 -07:00
Saleem Abdulrasool
6d0a40c169 utils: adjust missed helpers in build.ps1
These were missed in the conversion from host/build/target to host based
builds.
2025-03-18 09:13:02 -07:00
Saleem Abdulrasool
179dc983b7 utils: version testing frameworks
This adjusts the install location for the testing frameworks to be
versioned with the product version. These are somewhat closely tied to
the compiler, and it makes sense to tie them to the product version.
2025-03-18 08:59:43 -07:00
Saleem Abdulrasool
7940b24ec7 utils: remove Host, Build, Target duplication
Adopt the `$Arch` parameter uniformly. If something is built for the
host we can use `$HostArch` explicitly (which identifies the
environment that the toolchain will run on). `$BuildArch` gives us an
explicit architecture when building for the machine where the toolchain
is being built. For the target libraries, we simply pass in the
appropriate `$Arch` value.
2025-03-17 17:50:21 -07:00
Saleem Abdulrasool
ef1a1d1644 Merge pull request #80037 from swiftlang/revert-79944-windrd-update-default-sdks
Revert "utils: Update default Android SDKs in build.ps1"
2025-03-16 16:25:36 -07:00
Jeff
644462cb5e utils: Improve build.ps1 build summary report. (#80026)
* utils: Display total time taken in build Summary.

* utils: Add % to summary data in build.ps1.

* Cleanup and formatting.
2025-03-16 16:23:02 -07:00
Saleem Abdulrasool
2f60c73ad6 Merge pull request #80039 from compnerd/crossed
utils: explicitly cross-compile the experimental runtimes
2025-03-16 15:04:47 -07:00
Stefan Gränitz
d6ac1eca74 [windows][toolchain] Run non-executable Swift Runtime tests for Android (#79185)
We cross-compile the Swift runtime libs for the Android SDKs in the Windows toolchain. This patch adds a build step that runs non-executable tests for them.
2025-03-16 22:52:38 +01:00