swift icon indicating copy to clipboard operation
swift copied to clipboard

build: enable the Android SDKs to be built, packaged, and tested

Open compnerd opened this issue 1 year ago • 11 comments

Build and package the Android SDKs on Windows as part of the toolchain distribution. This requires further fine tuning to improve the DevEx, however, this ensures that we do not backslide on the ability to build and package the SDK as a starting point.

compnerd avatar Jan 02 '25 19:01 compnerd

@swift-ci please test Windows platform

compnerd avatar Jan 02 '25 19:01 compnerd

@swift-ci please test Windows platform

compnerd avatar Jan 03 '25 17:01 compnerd

@swift-ci please build toolchain Windows platform

compnerd avatar Jan 03 '25 23:01 compnerd

@swift-ci please smoke test

compnerd avatar Mar 17 '25 00:03 compnerd

PR test failed with:

********************
Failed Tests (1):
  Swift(android-aarch64) :: ClangImporter/availability_custom_domains.swift

********************
Unexpectedly Passed Tests (3):
  Swift(android-aarch64) :: Driver/parseable_output.swift
  Swift(android-aarch64) :: Driver/parseable_output_unicode.swift
  Swift-validation(android-aarch64) :: compiler_crashers_fixed/28795-inprotocol-isrequirementsignaturecomputed-missing-signature.swift

Added 1 more XFAL in https://github.com/swiftlang/swift/pull/80053. The XPASSes are in the filter already and should have been skipped. Not sure why it doesn't apply here. Same code works for LLDB.

weliveindetail avatar Mar 17 '25 08:03 weliveindetail

@swift-ci please test Windows platform

compnerd avatar Mar 18 '25 00:03 compnerd

CC: @shahmishal, @etcwilde

This adds only the ARM64 slice for PR testing (we run through all the architectures on the nightly).

compnerd avatar Mar 18 '25 05:03 compnerd

@swift-ci please test Windows platform

compnerd avatar Mar 20 '25 23:03 compnerd

@swift-ci please test Windows platform

compnerd avatar Mar 21 '25 05:03 compnerd

How much more time does this add to the build?

shahmishal avatar Mar 28 '25 17:03 shahmishal

@swift-ci please test Windows platform

shahmishal avatar Mar 28 '25 17:03 shahmishal

The build will add ~12m for the SDK, and the non-executable testing time (which fluctuates)

compnerd avatar Mar 28 '25 17:03 compnerd

Testing Time: 1266.55s

Build-Runtime             Android  aarch64 00:08:17.95  2.9%  
Build-ExperimentalRuntime Android  aarch64 00:05:23.93  1.9%  
Build-Foundation          Android  aarch64 00:02:25.02  0.8%  
Build-Foundation          Android  aarch64 00:02:20.04  0.8%  
Build-Sanitizers          Android  aarch64 00:00:58.11  0.3%  
Build-LLVM                Android  aarch64 00:00:55.94  0.3%  
Build-CURL                Android  aarch64 00:00:47.73  0.3%  
Build-Dispatch            Android  aarch64 00:00:27.92  0.2%  
Build-Testing             Android  aarch64 00:00:27.17  0.2%  
Build-Inspect             Android  aarch64 00:00:23.69  0.1%  
Build-XML2                Android  aarch64 00:00:17.73  0.1%  
Build-ZLib                Android  aarch64 00:00:14.36  0.1%  
Build-XCTest              Android  aarch64 00:00:06.94  0%    

We are basically building a full Android SDK (Core Libraries, Overlays, Supplemental Libraries, libdispatch, Foundation, XCTest, Testing), building the new experimental runtime build, and running the non-executable tests.

We could shave the time for the experimental runtime builds I suppose, but it takes about 23m to do the build and 21m to run the tests. We could reduce the build times down to 18m by skipping the new runtimes build.

compnerd avatar Mar 29 '25 01:03 compnerd