If the `SWIFTCI_USE_LOCAL_DEPS` environment variable is set, we're building in the Swift.org CI system alongside other projects in the Swift toolchain and we can depend on local versions of our dependencies instead of fetching them remotely.
Ensure that the downloaded image matches the expected image. This
ensures that we catch download errors as well as provides some level of
security by requiring that the download checksum matches.
Use the internal copy of swift-syntax that the compiler uses for macros
to build the LSP. By sharing the swift-syntax build, we shave ~6MiB off
the LSP binary. Additionally, we avoid building swift-syntax twice as a
single copy is now used.
Adjust the installer to allow it to be built for foreign architectures.
Additionally, adjust the artifact staging to include additional content
that was missed previously in order to enable code signing.
Update the build.ps1 to match the current state which introduces
`-BuildTo` and updates most of the dependencies. Take the opportunity to
migrate to update-checkout for the majority of the dependencies. The
SQLite amalgamation and installer image are still fetched later, and ICU
is still cloned in the CI wrapper.