Skip to content

Run the compiler validation suite for Android #8

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 44 commits into
base: main
Choose a base branch
from

Conversation

marcprux
Copy link

@marcprux marcprux commented May 26, 2025

Please see if you can get your Docker build to run the compiler validation suite for Android too. That means you can stop downloading the latest Swift toolchain release and snapshots, as we will be building the compiler for linux from source instead, and you can remove these flags

--native-swift-tools-path=$host_toolchain/bin \
            --native-clang-tools-path=$host_toolchain/bin \
            --build-llvm=0 \
            --build-swift-tools=0 \
            --skip-build-cmark \
            --skip-local-build \

to make sure the native compiler is built and add the testing flags. It should mostly work just by changing flags, but will likely require some light patching like this, to avoid unnecessary extra work.

@finagolfin
Copy link

Aah, got much further with the clang package, that shaved 1 hour off the build. 🎆 Add the --skip-test-linux flag to build-script: that will skip running the compiler tests for linux and only run them for Android, as currently done on your community Android CI. Hopefully, that gets us most of the rest of the way,🤞may only be some final installation hiccups then.

@finagolfin
Copy link

Can't read some of the failing logs, I think those runners ran out of disk space and it couldn't extract them. For the docker runs, you can probably delete all of /usr/share/ and /usr/local/share/. Add this pull to the 6.2 branch alone, should fix those tests.

@marcprux
Copy link
Author

marcprux commented Jun 6, 2025

Add this pull to the 6.2 branch alone, should fix those tests.

Do you mean by applying https://patch-diff.githubusercontent.com/raw/swiftlang/swift/pull/81398.patch to release/6.2? It doesn't apply cleanly:

zap swiftlang/swift [release/6.2] % git apply /opt/src/github/swift-android-sdk/swift-android-sdk/swift-android-devel-pr81398.patch
error: patch failed: test/Frontend/default-search-paths.swift:12
error: test/Frontend/default-search-paths.swift: patch does not apply
error: patch failed: test/Interop/Cxx/class/closure-thunk-irgen.swift:41
error: test/Interop/Cxx/class/closure-thunk-irgen.swift: patch does not apply
error: patch failed: test/Interop/Cxx/stdlib/std-span-interface.swift:5
error: test/Interop/Cxx/stdlib/std-span-interface.swift: patch does not apply

I can try to coerce it manually, unless you know of an easier way?

@finagolfin
Copy link

Remove the Frontend/default-search-paths.swift change from that patch, or manually modify it, and apply the rest with the -C2 flag. Then you can run git diff to dump the backported patch for 6.2, to use from then on.

@marcprux
Copy link
Author

marcprux commented Jun 6, 2025

That reduced the number of failures for the 6.2 branch from 90 (https://github.com/swift-android-sdk/swift-docker/actions/runs/15475430398/job/43569489696):

90 failures
2025-06-06T01:39:56.2835115Z Failed Tests (90):
2025-06-06T01:39:56.2835550Z   Swift(android-x86_64) :: ClangImporter/cfuncs_parse.swift
2025-06-06T01:39:56.2836355Z   Swift(android-x86_64) :: Frontend/embed-bitcode.swift
2025-06-06T01:39:56.2836686Z   Swift(android-x86_64) :: IRGen/condfail.sil
2025-06-06T01:39:56.2837112Z   Swift(android-x86_64) :: IRGen/framepointer.sil
2025-06-06T01:39:56.2837416Z   Swift(android-x86_64) :: IRGen/static_initializer.sil
2025-06-06T01:39:56.2837794Z   Swift(android-x86_64) :: Interop/Cxx/class/closure-thunk-irgen.swift
2025-06-06T01:39:56.2838183Z   Swift(android-x86_64) :: Interop/Cxx/class/function-call-irgen.swift
2025-06-06T01:39:56.2838561Z   Swift(android-x86_64) :: Interop/Cxx/stdlib/std-span-interface.swift
2025-06-06T01:39:56.2838991Z   Swift(android-x86_64) :: Interop/CxxToSwiftToCxx/bridge-cxx-struct-back-to-cxx.swift
2025-06-06T01:39:56.2839589Z   Swift(android-x86_64) :: Interop/SwiftToCxx/class/nested-classes-in-cxx.swift
2025-06-06T01:39:56.2840015Z   Swift(android-x86_64) :: Interop/SwiftToCxx/class/swift-actor-in-cxx.swift
2025-06-06T01:39:56.2840477Z   Swift(android-x86_64) :: Interop/SwiftToCxx/class/swift-class-availability-in-cxx.swift
2025-06-06T01:39:56.2841294Z   Swift(android-x86_64) :: Interop/SwiftToCxx/class/swift-class-in-cxx.swift
2025-06-06T01:39:56.2841792Z   Swift(android-x86_64) :: Interop/SwiftToCxx/class/swift-class-inheritance-in-cxx.swift
2025-06-06T01:39:56.2842264Z   Swift(android-x86_64) :: Interop/SwiftToCxx/class/swift-class-ordering.swift
2025-06-06T01:39:56.2842827Z   Swift(android-x86_64) :: Interop/SwiftToCxx/class/swift-class-static-variables.swift
2025-06-06T01:39:56.2843352Z   Swift(android-x86_64) :: Interop/SwiftToCxx/class/swift-class-virtual-method-dispatch.swift
2025-06-06T01:39:56.2843942Z   Swift(android-x86_64) :: Interop/SwiftToCxx/class/swift-resilient-class-virtual-method-dispatch.swift
2025-06-06T01:39:56.2844619Z   Swift(android-x86_64) :: Interop/SwiftToCxx/class/swift-subclass-of-resilient-class-virtual-method-dispatch.swift
2025-06-06T01:39:56.2845225Z   Swift(android-x86_64) :: Interop/SwiftToCxx/core/swift-impl-defs-in-cxx-64-bit.swift
2025-06-06T01:39:56.2845677Z   Swift(android-x86_64) :: Interop/SwiftToCxx/core/swift-impl-defs-in-cxx.swift
2025-06-06T01:39:56.2846217Z   Swift(android-x86_64) :: Interop/SwiftToCxx/cross-module-refs/do-not-expose-imported-api-by-default.swift
2025-06-06T01:39:56.2846814Z   Swift(android-x86_64) :: Interop/SwiftToCxx/cross-module-refs/imported-enum-refs-in-cxx.swift
2025-06-06T01:39:56.2847372Z   Swift(android-x86_64) :: Interop/SwiftToCxx/cross-module-refs/imported-struct-refs-in-cxx.swift
2025-06-06T01:39:56.2847960Z   Swift(android-x86_64) :: Interop/SwiftToCxx/cross-module-refs/not-referenced-cross-module-import.swift
2025-06-06T01:39:56.2848580Z   Swift(android-x86_64) :: Interop/SwiftToCxx/enums/enum-associated-value-class-type-cxx.swift
2025-06-06T01:39:56.2849121Z   Swift(android-x86_64) :: Interop/SwiftToCxx/enums/enum-member-param-no-shadow-case.swift
2025-06-06T01:39:56.2849641Z   Swift(android-x86_64) :: Interop/SwiftToCxx/enums/large-enums-pass-return-in-cxx.swift
2025-06-06T01:39:56.2850114Z   Swift(android-x86_64) :: Interop/SwiftToCxx/enums/resilient-enum-in-cxx.swift
2025-06-06T01:39:56.2850592Z   Swift(android-x86_64) :: Interop/SwiftToCxx/enums/small-enums-generated-stub-64bit.swift
2025-06-06T01:39:56.2851307Z   Swift(android-x86_64) :: Interop/SwiftToCxx/enums/small-enums-pass-return-in-cxx.swift
2025-06-06T01:39:56.2851959Z   Swift(android-x86_64) :: Interop/SwiftToCxx/enums/swift-enum-implementation.swift
2025-06-06T01:39:56.2852500Z   Swift(android-x86_64) :: Interop/SwiftToCxx/expose-attr/expose-rename-to-unavailable-decl.swift
2025-06-06T01:39:56.2853033Z   Swift(android-x86_64) :: Interop/SwiftToCxx/expose-attr/expose-swift-decls-to-cxx.swift
2025-06-06T01:39:56.2853539Z   Swift(android-x86_64) :: Interop/SwiftToCxx/extension/struct-extension-in-cxx.swift
2025-06-06T01:39:56.2853966Z   Swift(android-x86_64) :: Interop/SwiftToCxx/functions/cdecl.swift
2025-06-06T01:39:56.2854375Z   Swift(android-x86_64) :: Interop/SwiftToCxx/functions/function-availability.swift
2025-06-06T01:39:56.2854985Z   Swift(android-x86_64) :: Interop/SwiftToCxx/functions/swift-function-argument-keyword-in-cxx.swift
2025-06-06T01:39:56.2855532Z   Swift(android-x86_64) :: Interop/SwiftToCxx/functions/swift-function-overloads.swift
2025-06-06T01:39:56.2856056Z   Swift(android-x86_64) :: Interop/SwiftToCxx/functions/swift-function-unsupported-cxx-type.swift
2025-06-06T01:39:56.2856565Z   Swift(android-x86_64) :: Interop/SwiftToCxx/functions/swift-functions.swift
2025-06-06T01:39:56.2857126Z   Swift(android-x86_64) :: Interop/SwiftToCxx/functions/swift-no-expose-unsupported-alwaysEmitInClient-func.swift
2025-06-06T01:39:56.2857778Z   Swift(android-x86_64) :: Interop/SwiftToCxx/functions/swift-no-expose-unsupported-async-func.swift
2025-06-06T01:39:56.2858353Z   Swift(android-x86_64) :: Interop/SwiftToCxx/functions/swift-operators.swift
2025-06-06T01:39:56.2858856Z   Swift(android-x86_64) :: Interop/SwiftToCxx/functions/swift-primitive-functions-cxx-bridging.swift
2025-06-06T01:39:56.2859483Z   Swift(android-x86_64) :: Interop/SwiftToCxx/functions/swift-primitive-inout-functions-cxx-bridging.swift
2025-06-06T01:39:56.2860106Z   Swift(android-x86_64) :: Interop/SwiftToCxx/functions/swift-simd-vector-functions-cxx-bridging.swift
2025-06-06T01:39:56.2860719Z   Swift(android-x86_64) :: Interop/SwiftToCxx/functions/swift-transparent-functions-cxx-bridging.swift
2025-06-06T01:39:56.2861477Z   Swift(android-x86_64) :: Interop/SwiftToCxx/generics/generic-enum-in-cxx.swift
2025-06-06T01:39:56.2861938Z   Swift(android-x86_64) :: Interop/SwiftToCxx/generics/generic-function-in-cxx.swift
2025-06-06T01:39:56.2862404Z   Swift(android-x86_64) :: Interop/SwiftToCxx/generics/generic-struct-in-cxx.swift
2025-06-06T01:39:56.2862941Z   Swift(android-x86_64) :: Interop/SwiftToCxx/generics/generic-struct-known-layout-direct-in-cxx.swift
2025-06-06T01:39:56.2863553Z   Swift(android-x86_64) :: Interop/SwiftToCxx/generics/generic-struct-known-layout-indirect-in-cxx.swift
2025-06-06T01:39:56.2864103Z   Swift(android-x86_64) :: Interop/SwiftToCxx/generics/generic-type-traits-fwd.swift
2025-06-06T01:39:56.2864542Z   Swift(android-x86_64) :: Interop/SwiftToCxx/initializers/init-in-cxx.swift
2025-06-06T01:39:56.2865026Z   Swift(android-x86_64) :: Interop/SwiftToCxx/initializers/swift-init-availability-in-cxx.swift
2025-06-06T01:39:56.2865526Z   Swift(android-x86_64) :: Interop/SwiftToCxx/macros/macro-name-collision.swift
2025-06-06T01:39:56.2865940Z   Swift(android-x86_64) :: Interop/SwiftToCxx/methods/method-in-cxx.swift
2025-06-06T01:39:56.2866370Z   Swift(android-x86_64) :: Interop/SwiftToCxx/methods/mutating-method-in-cxx.swift
2025-06-06T01:39:56.2866862Z   Swift(android-x86_64) :: Interop/SwiftToCxx/methods/swift-method-availability-in-cxx.swift
2025-06-06T01:39:56.2867344Z   Swift(android-x86_64) :: Interop/SwiftToCxx/module/module-to-namespace.swift
2025-06-06T01:39:56.2867808Z   Swift(android-x86_64) :: Interop/SwiftToCxx/ownership/consuming-parameter-in-cxx.swift
2025-06-06T01:39:56.2868277Z   Swift(android-x86_64) :: Interop/SwiftToCxx/properties/bool-is-has-in-cxx.swift
2025-06-06T01:39:56.2868708Z   Swift(android-x86_64) :: Interop/SwiftToCxx/properties/getter-in-cxx.swift
2025-06-06T01:39:56.2869113Z   Swift(android-x86_64) :: Interop/SwiftToCxx/properties/setter-in-cxx.swift
2025-06-06T01:39:56.2869609Z   Swift(android-x86_64) :: Interop/SwiftToCxx/properties/swift-property-availability-in-cxx.swift
2025-06-06T01:39:56.2870272Z   Swift(android-x86_64) :: Interop/SwiftToCxx/stdlib/combination-of-stdlib-generics-in-cxx.swift
2025-06-06T01:39:56.2870779Z   Swift(android-x86_64) :: Interop/SwiftToCxx/stdlib/optional/optional-in-cxx.swift
2025-06-06T01:39:56.2871517Z   Swift(android-x86_64) :: Interop/SwiftToCxx/stdlib/stdlib-dep-inline-in-cxx.swift
2025-06-06T01:39:56.2872166Z   Swift(android-x86_64) :: Interop/SwiftToCxx/stdlib/swift-stdlib-in-cxx.swift
2025-06-06T01:39:56.2872691Z   Swift(android-x86_64) :: Interop/SwiftToCxx/structs/large-structs-pass-return-indirect-in-cxx.swift
2025-06-06T01:39:56.2873220Z   Swift(android-x86_64) :: Interop/SwiftToCxx/structs/nested-structs-in-cxx.swift
2025-06-06T01:39:56.2873758Z   Swift(android-x86_64) :: Interop/SwiftToCxx/structs/resilient-struct-in-cxx.swift
2025-06-06T01:39:56.2874293Z   Swift(android-x86_64) :: Interop/SwiftToCxx/structs/small-structs-pass-return-direct-in-cxx.swift
2025-06-06T01:39:56.2874928Z   Swift(android-x86_64) :: Interop/SwiftToCxx/structs/struct-with-opaque-layout-resilient-member-in-cxx.swift
2025-06-06T01:39:56.2875518Z   Swift(android-x86_64) :: Interop/SwiftToCxx/structs/struct-with-refcounted-member.swift
2025-06-06T01:39:56.2876067Z   Swift(android-x86_64) :: Interop/SwiftToCxx/structs/swift-struct-availability-in-cxx.swift
2025-06-06T01:39:56.2876616Z   Swift(android-x86_64) :: Interop/SwiftToCxx/structs/swift-struct-circular-dependent-defs.swift
2025-06-06T01:39:56.2877182Z   Swift(android-x86_64) :: Interop/SwiftToCxx/structs/swift-struct-in-cxx.swift
2025-06-06T01:39:56.2877649Z   Swift(android-x86_64) :: Interop/SwiftToCxx/unsupported/unsupported-enums-in-cxx.swift
2025-06-06T01:39:56.2878155Z   Swift(android-x86_64) :: Interop/SwiftToCxx/unsupported/unsupported-funcs-in-cxx.swift
2025-06-06T01:39:56.2878670Z   Swift(android-x86_64) :: Interop/SwiftToCxx/unsupported/unsupported-generics-in-cxx.swift
2025-06-06T01:39:56.2879180Z   Swift(android-x86_64) :: Interop/SwiftToCxx/unsupported/unsupported-types-in-cxx.swift
2025-06-06T01:39:56.2879773Z   Swift(android-x86_64) :: Interop/SwiftToCxxToSwift/hide-swift-module-namespace-in-swift.swift
2025-06-06T01:39:56.2880246Z   Swift(android-x86_64) :: Parse/enum_floating_point_raw_value.swift
2025-06-06T01:39:56.2880613Z   Swift(android-x86_64) :: Profiler/coverage_inlined_counters.swift
2025-06-06T01:39:56.2881114Z   Swift(android-x86_64) :: Reflection/typeref_decoding_asan.swift
2025-06-06T01:39:56.2881480Z   Swift(android-x86_64) :: SIL/clang-function-types-android.swift
2025-06-06T01:39:56.2881907Z   Swift(android-x86_64) :: SILOptimizer/diagnostic_constant_propagation_floats_x86.swift
2025-06-06T01:39:56.2882324Z   Swift(android-x86_64) :: stdlib/FloatingPointIR_FP80.swift
2025-06-06T01:39:56.2882534Z 
2025-06-06T01:39:56.2882598Z ********************
2025-06-06T01:39:56.2882788Z Unexpectedly Passed Tests (1):
2025-06-06T01:39:56.2883010Z   Swift(android-x86_64) :: IRGen/pic.swift
2025-06-06T01:39:56.2883176Z 
2025-06-06T01:39:56.2883182Z 
2025-06-06T01:39:56.2883250Z Testing Time: 1162.68s
2025-06-06T01:39:56.2883366Z 
2025-06-06T01:39:56.2883445Z Total Discovered Tests: 19579
2025-06-06T01:39:56.2883658Z   Unsupported        :  4851 (24.78%)
2025-06-06T01:39:56.2883875Z   Passed             : 14606 (74.60%)
2025-06-06T01:39:56.2884087Z   Expectedly Failed  :    31 (0.16%)
2025-06-06T01:39:56.2884297Z   Failed             :    90 (0.46%)
2025-06-06T01:39:56.2884507Z   Unexpectedly Passed:     1 (0.01%)

to 77 (https://github.com/swift-android-sdk/swift-docker/actions/runs/15495418271/job/43630847780):

77 failures
2025-06-06T22:57:36.3581068Z Failed Tests (77):
2025-06-06T22:57:36.3581718Z   Swift(android-x86_64) :: IRGen/framepointer.sil
2025-06-06T22:57:36.3582544Z   Swift(android-x86_64) :: Interop/CxxToSwiftToCxx/bridge-cxx-struct-back-to-cxx.swift
2025-06-06T22:57:36.3583614Z   Swift(android-x86_64) :: Interop/SwiftToCxx/class/nested-classes-in-cxx.swift
2025-06-06T22:57:36.3584293Z   Swift(android-x86_64) :: Interop/SwiftToCxx/class/swift-actor-in-cxx.swift
2025-06-06T22:57:36.3585033Z   Swift(android-x86_64) :: Interop/SwiftToCxx/class/swift-class-availability-in-cxx.swift
2025-06-06T22:57:36.3585742Z   Swift(android-x86_64) :: Interop/SwiftToCxx/class/swift-class-in-cxx.swift
2025-06-06T22:57:36.3586435Z   Swift(android-x86_64) :: Interop/SwiftToCxx/class/swift-class-inheritance-in-cxx.swift
2025-06-06T22:57:36.3587388Z   Swift(android-x86_64) :: Interop/SwiftToCxx/class/swift-class-ordering.swift
2025-06-06T22:57:36.3588148Z   Swift(android-x86_64) :: Interop/SwiftToCxx/class/swift-class-static-variables.swift
2025-06-06T22:57:36.3588949Z   Swift(android-x86_64) :: Interop/SwiftToCxx/class/swift-class-virtual-method-dispatch.swift
2025-06-06T22:57:36.3589869Z   Swift(android-x86_64) :: Interop/SwiftToCxx/class/swift-resilient-class-virtual-method-dispatch.swift
2025-06-06T22:57:36.3591076Z   Swift(android-x86_64) :: Interop/SwiftToCxx/class/swift-subclass-of-resilient-class-virtual-method-dispatch.swift
2025-06-06T22:57:36.3592169Z   Swift(android-x86_64) :: Interop/SwiftToCxx/core/swift-impl-defs-in-cxx-64-bit.swift
2025-06-06T22:57:36.3592953Z   Swift(android-x86_64) :: Interop/SwiftToCxx/core/swift-impl-defs-in-cxx.swift
2025-06-06T22:57:36.3593837Z   Swift(android-x86_64) :: Interop/SwiftToCxx/cross-module-refs/do-not-expose-imported-api-by-default.swift
2025-06-06T22:57:36.3595004Z   Swift(android-x86_64) :: Interop/SwiftToCxx/cross-module-refs/imported-enum-refs-in-cxx.swift
2025-06-06T22:57:36.3595881Z   Swift(android-x86_64) :: Interop/SwiftToCxx/cross-module-refs/imported-struct-refs-in-cxx.swift
2025-06-06T22:57:36.3596785Z   Swift(android-x86_64) :: Interop/SwiftToCxx/cross-module-refs/not-referenced-cross-module-import.swift
2025-06-06T22:57:36.3597702Z   Swift(android-x86_64) :: Interop/SwiftToCxx/enums/enum-associated-value-class-type-cxx.swift
2025-06-06T22:57:36.3598531Z   Swift(android-x86_64) :: Interop/SwiftToCxx/enums/enum-member-param-no-shadow-case.swift
2025-06-06T22:57:36.3599373Z   Swift(android-x86_64) :: Interop/SwiftToCxx/enums/large-enums-pass-return-in-cxx.swift
2025-06-06T22:57:36.3600192Z   Swift(android-x86_64) :: Interop/SwiftToCxx/enums/resilient-enum-in-cxx.swift
2025-06-06T22:57:36.3601105Z   Swift(android-x86_64) :: Interop/SwiftToCxx/enums/small-enums-generated-stub-64bit.swift
2025-06-06T22:57:36.3601908Z   Swift(android-x86_64) :: Interop/SwiftToCxx/enums/small-enums-pass-return-in-cxx.swift
2025-06-06T22:57:36.3602812Z   Swift(android-x86_64) :: Interop/SwiftToCxx/enums/swift-enum-implementation.swift
2025-06-06T22:57:36.3603717Z   Swift(android-x86_64) :: Interop/SwiftToCxx/expose-attr/expose-rename-to-unavailable-decl.swift
2025-06-06T22:57:36.3604560Z   Swift(android-x86_64) :: Interop/SwiftToCxx/expose-attr/expose-swift-decls-to-cxx.swift
2025-06-06T22:57:36.3605382Z   Swift(android-x86_64) :: Interop/SwiftToCxx/extension/struct-extension-in-cxx.swift
2025-06-06T22:57:36.3606104Z   Swift(android-x86_64) :: Interop/SwiftToCxx/functions/cdecl.swift
2025-06-06T22:57:36.3606764Z   Swift(android-x86_64) :: Interop/SwiftToCxx/functions/function-availability.swift
2025-06-06T22:57:36.3607741Z   Swift(android-x86_64) :: Interop/SwiftToCxx/functions/swift-function-argument-keyword-in-cxx.swift
2025-06-06T22:57:36.3608644Z   Swift(android-x86_64) :: Interop/SwiftToCxx/functions/swift-function-overloads.swift
2025-06-06T22:57:36.3609540Z   Swift(android-x86_64) :: Interop/SwiftToCxx/functions/swift-function-unsupported-cxx-type.swift
2025-06-06T22:57:36.3610390Z   Swift(android-x86_64) :: Interop/SwiftToCxx/functions/swift-functions.swift
2025-06-06T22:57:36.3611486Z   Swift(android-x86_64) :: Interop/SwiftToCxx/functions/swift-no-expose-unsupported-alwaysEmitInClient-func.swift
2025-06-06T22:57:36.3612522Z   Swift(android-x86_64) :: Interop/SwiftToCxx/functions/swift-no-expose-unsupported-async-func.swift
2025-06-06T22:57:36.3613369Z   Swift(android-x86_64) :: Interop/SwiftToCxx/functions/swift-operators.swift
2025-06-06T22:57:36.3614234Z   Swift(android-x86_64) :: Interop/SwiftToCxx/functions/swift-primitive-functions-cxx-bridging.swift
2025-06-06T22:57:36.3615317Z   Swift(android-x86_64) :: Interop/SwiftToCxx/functions/swift-primitive-inout-functions-cxx-bridging.swift
2025-06-06T22:57:36.3616350Z   Swift(android-x86_64) :: Interop/SwiftToCxx/functions/swift-simd-vector-functions-cxx-bridging.swift
2025-06-06T22:57:36.3617502Z   Swift(android-x86_64) :: Interop/SwiftToCxx/functions/swift-transparent-functions-cxx-bridging.swift
2025-06-06T22:57:36.3618397Z   Swift(android-x86_64) :: Interop/SwiftToCxx/generics/generic-enum-in-cxx.swift
2025-06-06T22:57:36.3619175Z   Swift(android-x86_64) :: Interop/SwiftToCxx/generics/generic-function-in-cxx.swift
2025-06-06T22:57:36.3619916Z   Swift(android-x86_64) :: Interop/SwiftToCxx/generics/generic-struct-in-cxx.swift
2025-06-06T22:57:36.3620788Z   Swift(android-x86_64) :: Interop/SwiftToCxx/generics/generic-struct-known-layout-direct-in-cxx.swift
2025-06-06T22:57:36.3622010Z   Swift(android-x86_64) :: Interop/SwiftToCxx/generics/generic-struct-known-layout-indirect-in-cxx.swift
2025-06-06T22:57:36.3622994Z   Swift(android-x86_64) :: Interop/SwiftToCxx/generics/generic-type-traits-fwd.swift
2025-06-06T22:57:36.3623750Z   Swift(android-x86_64) :: Interop/SwiftToCxx/initializers/init-in-cxx.swift
2025-06-06T22:57:36.3624560Z   Swift(android-x86_64) :: Interop/SwiftToCxx/initializers/swift-init-availability-in-cxx.swift
2025-06-06T22:57:36.3625478Z   Swift(android-x86_64) :: Interop/SwiftToCxx/macros/macro-name-collision.swift
2025-06-06T22:57:36.3626191Z   Swift(android-x86_64) :: Interop/SwiftToCxx/methods/method-in-cxx.swift
2025-06-06T22:57:36.3626878Z   Swift(android-x86_64) :: Interop/SwiftToCxx/methods/mutating-method-in-cxx.swift
2025-06-06T22:57:36.3627721Z   Swift(android-x86_64) :: Interop/SwiftToCxx/methods/swift-method-availability-in-cxx.swift
2025-06-06T22:57:36.3628526Z   Swift(android-x86_64) :: Interop/SwiftToCxx/module/module-to-namespace.swift
2025-06-06T22:57:36.3629310Z   Swift(android-x86_64) :: Interop/SwiftToCxx/ownership/consuming-parameter-in-cxx.swift
2025-06-06T22:57:36.3630088Z   Swift(android-x86_64) :: Interop/SwiftToCxx/properties/bool-is-has-in-cxx.swift
2025-06-06T22:57:36.3630778Z   Swift(android-x86_64) :: Interop/SwiftToCxx/properties/getter-in-cxx.swift
2025-06-06T22:57:36.3631680Z   Swift(android-x86_64) :: Interop/SwiftToCxx/properties/setter-in-cxx.swift
2025-06-06T22:57:36.3632490Z   Swift(android-x86_64) :: Interop/SwiftToCxx/properties/swift-property-availability-in-cxx.swift
2025-06-06T22:57:36.3633568Z   Swift(android-x86_64) :: Interop/SwiftToCxx/stdlib/combination-of-stdlib-generics-in-cxx.swift
2025-06-06T22:57:36.3634444Z   Swift(android-x86_64) :: Interop/SwiftToCxx/stdlib/optional/optional-in-cxx.swift
2025-06-06T22:57:36.3635223Z   Swift(android-x86_64) :: Interop/SwiftToCxx/stdlib/stdlib-dep-inline-in-cxx.swift
2025-06-06T22:57:36.3635975Z   Swift(android-x86_64) :: Interop/SwiftToCxx/stdlib/swift-stdlib-in-cxx.swift
2025-06-06T22:57:36.3636812Z   Swift(android-x86_64) :: Interop/SwiftToCxx/structs/large-structs-pass-return-indirect-in-cxx.swift
2025-06-06T22:57:36.3637722Z   Swift(android-x86_64) :: Interop/SwiftToCxx/structs/nested-structs-in-cxx.swift
2025-06-06T22:57:36.3638466Z   Swift(android-x86_64) :: Interop/SwiftToCxx/structs/resilient-struct-in-cxx.swift
2025-06-06T22:57:36.3639337Z   Swift(android-x86_64) :: Interop/SwiftToCxx/structs/small-structs-pass-return-direct-in-cxx.swift
2025-06-06T22:57:36.3640400Z   Swift(android-x86_64) :: Interop/SwiftToCxx/structs/struct-with-opaque-layout-resilient-member-in-cxx.swift
2025-06-06T22:57:36.3641556Z   Swift(android-x86_64) :: Interop/SwiftToCxx/structs/struct-with-refcounted-member.swift
2025-06-06T22:57:36.3642409Z   Swift(android-x86_64) :: Interop/SwiftToCxx/structs/swift-struct-availability-in-cxx.swift
2025-06-06T22:57:36.3643336Z   Swift(android-x86_64) :: Interop/SwiftToCxx/structs/swift-struct-circular-dependent-defs.swift
2025-06-06T22:57:36.3644215Z   Swift(android-x86_64) :: Interop/SwiftToCxx/structs/swift-struct-in-cxx.swift
2025-06-06T22:57:36.3644974Z   Swift(android-x86_64) :: Interop/SwiftToCxx/unsupported/unsupported-enums-in-cxx.swift
2025-06-06T22:57:36.3645839Z   Swift(android-x86_64) :: Interop/SwiftToCxx/unsupported/unsupported-funcs-in-cxx.swift
2025-06-06T22:57:36.3646745Z   Swift(android-x86_64) :: Interop/SwiftToCxx/unsupported/unsupported-generics-in-cxx.swift
2025-06-06T22:57:36.3647739Z   Swift(android-x86_64) :: Interop/SwiftToCxx/unsupported/unsupported-types-in-cxx.swift
2025-06-06T22:57:36.3648666Z   Swift(android-x86_64) :: Interop/SwiftToCxxToSwift/hide-swift-module-namespace-in-swift.swift
2025-06-06T22:57:36.3649266Z 
2025-06-06T22:57:36.3649271Z 
2025-06-06T22:57:36.3649383Z Testing Time: 1149.92s
2025-06-06T22:57:36.3649568Z 
2025-06-06T22:57:36.3649696Z Total Discovered Tests: 19579
2025-06-06T22:57:36.3650026Z   Unsupported      :  4866 (24.85%)
2025-06-06T22:57:36.3650377Z   Passed           : 14605 (74.60%)
2025-06-06T22:57:36.3650732Z   Expectedly Failed:    31 (0.16%)
2025-06-06T22:57:36.3651197Z   Failed           :    77 (0.39%)

@marcprux
Copy link
Author

marcprux commented Jun 6, 2025

There's only 2 failures on development (https://github.com/swift-android-sdk/swift-docker/actions/runs/15495418271/job/43630847776):

2 failures
2025-06-06T22:02:58.7512291Z Failed Tests (2):
2025-06-06T22:02:58.7512786Z   Swift(android-x86_64) :: Misc/verify-swift-feature-testing.test-sh
2025-06-06T22:02:58.7513778Z   Swift-validation(android-x86_64) :: compiler_crashers_2/a07eb9e27e229d9.swift
2025-06-06T22:02:58.7514254Z 
2025-06-06T22:02:58.7514373Z 
2025-06-06T22:02:58.7514501Z Testing Time: 1215.24s
2025-06-06T22:02:58.7514701Z 
2025-06-06T22:02:58.7514832Z Total Discovered Tests: 19714
2025-06-06T22:02:58.7515205Z   Unsupported      :  4947 (25.09%)
2025-06-06T22:02:58.7515495Z   Passed           : 14734 (74.74%)
2025-06-06T22:02:58.7515733Z   Expectedly Failed:    31 (0.16%)
2025-06-06T22:02:58.7515949Z   Failed           :     2 (0.01%)

@finagolfin
Copy link

Looks like you'll need swiftlang/swift#81312 for 6.2 also, plus some additional tweaks for the last 2-3 failing tests, will look at those.

@finagolfin
Copy link

OK, strangely you will need swiftlang/swift#81643 also for 6.2, those two pulls should get 6.2 passing the compiler validation suite.

I will roll up all the 6.2 commits we need into an upstream pull and submit it later.

Swift(android-x86_64) :: Misc/verify-swift-feature-testing.test-sh
Swift-validation(android-x86_64) :: compiler_crashers_2/a07eb9e27e229d9.swift

These are not reproducible on the community Android CI or 6.2, so they appear to be trunk regressions related to Docker? Reverting swiftlang/swift@a65912f09 in 6.3 alone should fix the first one, whereas I have no idea about that new trunk crasher test only failing in Docker: simply patch it with // XFAIL: OS=linux-android for 6.3 and we can look into it later.

@marcprux
Copy link
Author

marcprux commented Jun 7, 2025

OK, strangely you will need swiftlang/swift#81643 also for 6.2, those two pulls should get 6.2 passing the compiler validation suite.

OK, but I won't be able to work on it until Tuesday at the earliest, so if you want to give it a shot before then, you can update the patch at https://github.com/swift-android-sdk/swift-android-sdk/blob/main/swift-android-devel-pr81398.patch 1 and re-run the swift-docker action (https://github.com/swift-android-sdk/swift-docker/actions/workflows/pull_request.yml) to see what happens.

Footnotes

  1. The patches will automatically be applied by https://github.com/swift-android-sdk/swift-docker/blob/main/swift-ci/sdks/android/build-docker#L30, which runs https://github.com/swift-android-sdk/swift-android-sdk/blob/main/apply-patches.sh

@finagolfin
Copy link

I'm unable to push to this repo:

remote: Permission to swift-android-sdk/swift-docker.git denied to finagolfin.
fatal: unable to access 'https://github.com/swift-android-sdk/swift-docker.git/': The requested URL returned error: 403

@finagolfin
Copy link

Alright, we're in pretty good shape at this point: it simply keeps timing out because it takes forever to build the host Swift compiler for some reason, with 75+% of the six-hour github free time limit eaten up just for that!

I'm going to move on to upstreaming patches and integrating the NDK CMake toolchain file, which we'll need when we re-enable libTesting again too.

Three things you might want to look at:

  1. Figure out why building the Swift compiler takes forever in this environment.
  2. Check the results of the first installed AArch64 SDK to make sure the files are correct and in the right place.
  3. Why do those two trunk tests I disabled only fail in Docker?

This mostly works now, just need to clean it up and run it to completion, maybe locally if nothing else.

@marcprux
Copy link
Author

This mostly works now, just need to clean it up and run it to completion, maybe locally if nothing else.

Yeah, I was just thinking that maybe I should try setting up a self-hosted runner for this, which at least won't time out. I'll look into it later today.

@marcprux
Copy link
Author

I'm working on getting this back up to date and get at least one of the build variants green, as well as enable a self-hosted runner that can hopefully get around the 6-hour time limit so we can get a full compiler validation build running to completion.

There are a couple new problems. On the 6.2 branch, there's a failure applying swift-android-devel.patch:

+ git apply -v -C1 /home/runner/work/_temp/swift-android-sdk/source/swift-android-patches/swift-android-devel.patch
Checking patch swift/utils/build-script-impl...
Hunk #2 succeeded at 1707 (offset 12 lines).
Hunk #3 succeeded at 1786 (offset 12 lines).
Checking patch swift-corelibs-foundation/Sources/CoreFoundation/CFPlatform.c...
error: while searching for:
#endif
}

#if TARGET_OS_ANDROID

#include <dlfcn.h>
#include <spawn.h>

error: patch failed: swift-corelibs-foundation/Sources/CoreFoundation/CFPlatform.c:1948
error: swift-corelibs-foundation/Sources/CoreFoundation/CFPlatform.c: patch does not apply

and on trunk, there's a different failure:

+ git apply -v -C1 /home/runner/work/_temp/swift-android-sdk/source/swift-android-patches/swift-android-build-script.patch
Checking patch swift/utils/build-script-impl...
Hunk #1 succeeded at 1373 (offset 1 line).
error: while searching for:
                    continue
                fi

                if [[ "${BUILD_SWIFT_TOOLS}" == "0" ]]; then
                    echo "Skipping building Foundation Macros for ${host}, because the host tools are not being built"
                    continue
                fi

error: patch failed: swift/utils/build-script-impl:2331
error: swift/utils/build-script-impl: patch does not apply
Checking patch swift/utils/swift_build_support/swift_build_support/targets.py...

These seem to be new as of last night, which seems to be why https://github.com/finagolfin/swift-android-sdk/actions passed.

@finagolfin
Copy link

Looks like some upstreamed patches have hit the source snapshots finally, so I will update my patches upstream. You'll need to rebase your patches then and remove that failing build-script-impl patch from this fork.

Also, we know the AArch64 compiler validation suite passed, but I suspect armv7 won't. So change the order to build that SDK arch first, then x86_64, and AArch64 last in this build script, so we can fail fast if we need to fix that too.

@finagolfin
Copy link

Alright, updated my patches, you can rebase. You should also stop applying my swift-android-ci-* patches, which aren't built here, and stop applying the swift-android-build-script.patch you added, as it no longer does anything and conflicts with one of my patches.

@marcprux
Copy link
Author

We're getting close. Self-hosted had only one test failure:

2025-06-15T00:43:19.2878397Z Failed Tests (1):
2025-06-15T00:43:19.2878790Z   Swift(android-aarch64) :: Misc/verify-swift-feature-testing.test-sh
2025-06-15T00:43:19.2879108Z 
2025-06-15T00:43:19.2879124Z 
2025-06-15T00:43:19.2879205Z Testing Time: 1143.69s
2025-06-15T00:43:19.2879340Z 
2025-06-15T00:43:19.2879430Z Total Discovered Tests: 19806
2025-06-15T00:43:19.2879703Z   Unsupported      :  5133 (25.92%)
2025-06-15T00:43:19.2879966Z   Passed           : 14638 (73.91%)
2025-06-15T00:43:19.2880229Z   Expectedly Failed:    34 (0.17%)
2025-06-15T00:43:19.2880484Z   Failed           :     1 (0.01%)

@finagolfin
Copy link

OK, and that too only because you accidentally reverted one of the Docker patches when you rebased and the other compiler crasher I disabled before now strangely works. I notice that it's still building aarch64 first, as the bash loop probably always runs alpabetically on the passed-in words.

I will update that patch and kick off another build.

@marcprux
Copy link
Author

I notice that it's still building aarch64 first, as the bash loop probably always runs alpabetically on the passed-in words.

I don't see how that could be happening (the script just does for arch in $archs; …), but I also don't have any other hypothesis. Fine to leave aarch64 disabled for now.

I will update that patch and kick off another build.

Did you mean to disable the self-hosted variants? The GitHub hosted ones are still timing out after 6 hours. I'll put back the self-hosted options to see if we can get them to run to completion.

@marcprux
Copy link
Author

I also added back the two non-compiler-validation docker builds to the matrix. I want to keep running those to ensure that everything else is working, and I'm also using the bundle artifacts that they create for additional (out of band) testing. They are relatively quick to run and don't otherwise interfere with the compiler validation builds, so I don't see any harm in keeping them going.

@finagolfin
Copy link

I don't see how that could be happening

You were right, that wasn't the issue. The issue is we didn't read the code closely, as that was just the default set of arches we were modifying. The actual arches are set here and override the defaults when passed in to build.sh later in that script.

Did you mean to disable the self-hosted variants?

Yes, I figured all would fail on armv7, so I didn't want to waste self-hosted runs to get the same data I would get from the github runners.

I also added back the two non-compiler-validation docker builds to the matrix. I want to keep running those to ensure that everything else is working, and I'm also using the bundle artifacts that they create for additional (out of band) testing.

I figured those added no value since they always complete successfully now, and we won't be using anything but the SDKs from the compiler validation builds from now on.

The longer 12-hour timeout you just added also wasn't enough, as the self-hosted compiler build was even slower, now taking almost 8 hours.

Kicking off another pair of non-self-hosted builds just to check armv7 and once any issues there are fixed, we can try self-hosted again with a 15-hour timeout.

@marcprux
Copy link
Author

I figured those added no value since they always complete successfully now, and we won't be using anything but the SDKs from the compiler validation builds from now on.

There is still value to a fast-track (i.e., non compiler-validated) option for the SDK generation. For example, if we want to iterate on getting 16kb page size compatible SDKs built and tested, being able to get that done in ~1h:30m is a lot better than 6h+.

The longer 12-hour timeout you just added also wasn't enough, as the self-hosted compiler build was even slower, now taking almost 8 hours.

Kicking off another pair of non-self-hosted builds just to check armv7 and once any issues there are fixed, we can try self-hosted again with a 15-hour timeout.

The self-hosted machine is the same one that is simultaneously running the Swift Android Community CI, and the most recent runs of that have gone from ~5h to ~10h, so the machine is probably overwhelmed. I can disable the community CI temporarily if we want to see if it helps?

@finagolfin
Copy link

There is still value to a fast-track (i.e., non compiler-validated) option for the SDK generation.

Oh, of course, I just disabled those temporarily here while I iterate on the full compiler-validated builds in this pull. Do whatever you like once I get those working. 👍

I can disable the community CI temporarily if we want to see if it helps?

Sounds good, I will let you know when I kick off another self-hosted run later today and then maybe you can temporarily switch off the community CI runners.

The good news is that once we get this Docker pull in upstream, we can turn off the community CI permanently. 😃

@marcprux
Copy link
Author

armv7 finally finished after 12h:

2025-06-16T15:06:46.0898839Z Failed Tests (10):
2025-06-16T15:06:46.0903999Z   Swift(android-armv7) :: ClangImporter/pcm-emit-direct-cc1-mode.swift
2025-06-16T15:06:46.0904531Z   Swift(android-armv7) :: IRGen/abitypes_arm.swift
2025-06-16T15:06:46.0905088Z   Swift(android-armv7) :: Interop/Cxx/class/constructors-copy-module-interface.swift
2025-06-16T15:06:46.0905741Z   Swift(android-armv7) :: Interop/Cxx/class/constructors-diagnostics.swift
2025-06-16T15:06:46.0908607Z   Swift(android-armv7) :: Interop/Cxx/class/constructors-module-interface.swift
2025-06-16T15:06:46.0909207Z   Swift(android-armv7) :: Interop/Cxx/class/constructors-silgen.swift
2025-06-16T15:06:46.0909764Z   Swift(android-armv7) :: Interop/Cxx/class/constructors-typechecker.swift
2025-06-16T15:06:46.0910349Z   Swift(android-armv7) :: Interop/Cxx/class/custom-new-operator-irgen.swift
2025-06-16T15:06:46.0910936Z   Swift(android-armv7) :: SILOptimizer/package-cmo-serialize-tables.swift
2025-06-16T15:06:46.0911556Z   Swift(android-armv7) :: SILOptimizer/throws_prediction.swift
2025-06-16T15:06:46.0915837Z 
2025-06-16T15:06:46.0915865Z 
2025-06-16T15:06:46.0916046Z Testing Time: 2068.45s
2025-06-16T15:06:46.0916213Z 
2025-06-16T15:06:46.0916324Z Total Discovered Tests: 19806
2025-06-16T15:06:46.0916614Z   Unsupported      :  5189 (26.20%)
2025-06-16T15:06:46.0916896Z   Passed           : 14575 (73.59%)
2025-06-16T15:06:46.0935764Z   Expectedly Failed:    32 (0.16%)
2025-06-16T15:06:46.0936483Z   Failed           :    10 (0.05%)

I've temporarily disabled the community Swift CI, so future self-hosted runs should be a bit faster until I re-enable it.

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.

2 participants