forked from swiftlang/swift-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Merged
Merged
Changes from 56 commits
Commits
Show all changes
62 commits
Select commit
Hold shift + click to select a range
69800e6
Run the compiler validation suite for Android
marcprux e350942
Add --build-compiler option
marcprux fcde0f1
Add --cross-compile-build-swift-tools=0 from https://github.com/swift…
marcprux 53aa633
Build with --build-llvm=0
marcprux 60c3370
Check out Yams for Swift 6.1.1 build
marcprux 63f3750
Add --llvm-ninja-targets-for-cross-compile-hosts=help
marcprux bfb9e50
Install pre-requisites
marcprux c527b1d
Install build prerequisites
marcprux ef3f51e
Only setup local toolchain if build-compiler is not 0
marcprux 84e885a
Fix Yams version checkout
marcprux cdbd187
Quote arguments to build scripts
marcprux 060c871
Permit empty host-toolchain argument in build.sh
marcprux 163220d
Fix check for BUILD_COMPILER
marcprux f8db216
Re-order Docker PATH to system clang is used before Swift toolchain c…
marcprux a9942a2
Use --host-test to skip attempt to test on connected device/emulator
marcprux 1cbf01e
Install clang in Dockerfile
marcprux 383fb46
Add --skip-test-linux flag to build
marcprux af85033
Remove more folders to free up space
marcprux d78eb9e
Update patches
marcprux f7d1437
Add docker-specific CI variants that run the compiler validation tests
marcprux 4e6f935
meaningless edit
finagolfin 1692659
Update pull_request.yml to stop the 6.1 release builds
finagolfin 287e81d
Update pull_request.yml to really only build the full docker compiler…
finagolfin e438467
Update README.md with meaningless edit to bump build
finagolfin 324a3b7
Update build.sh to skip testing XCTest for linux, as a handful of the…
finagolfin 02485be
Update build.sh to disable building libTesting and for 16K memory pag…
finagolfin d070103
Update build.sh to skip testing Foundation for linux, which requires …
finagolfin ee9529b
Update build.sh to not build each arch in a separate build directory
finagolfin 4b99b11
Update Dockerfile to use clang 19 instead
finagolfin 896ba60
Add self-hosted runner CI variant
marcprux 9b9d56b
Fix CI workflow syntax
marcprux a157ab3
Update CI runner config
marcprux f8c0ffd
Update CI runner config
marcprux 73ccf2e
Fix name of self-hosted CI runner
marcprux 4af2892
Re-order arch run sequence
marcprux 60e2543
Update CI for self-hosted runner
marcprux 87b297a
Build for self-hosted runner
marcprux 67a5291
Add swift-6.2-branch to self-hosted run matrix
marcprux 6c3a1ba
Update build.sh to disable aarch64 temporarily, as we know it built fine
finagolfin b30c138
Update pull_request.yml to disable non-compiler builds, as they all w…
finagolfin 3a0189b
Run compiler validation on self-hosted with increased timeout
marcprux 929ff18
Update build-docker to only build for armv7
finagolfin 28fbe55
Update pull_request.yml to disable self-hosted builds temporarily
finagolfin eaa140e
Update pull_request.yml to build the full compiler in github runners …
finagolfin f0b6057
Update build-docker to build for aarch64 first
finagolfin 1161e56
Update toolchain-vars.sh to use older trunk snapahot toolchain that d…
finagolfin 52108a8
Update toolchain-vars.sh to only download the latest release compiler…
finagolfin 718b96c
Update build-docker to only build for armv7 again
finagolfin 8eb389a
Update toolchain-vars.sh to fix setting branch variable
finagolfin 86dff6b
Update build-docker to build for all three supported arches
finagolfin 16c19f5
Update pull_request.yml to try self-hosted runs again
finagolfin ae32e31
Update build.sh to only install SDK components and remove linux stdlib
finagolfin 0346d7f
Tolerate missing linux folder when attempting to clean up unnecessary…
marcprux c6e85b8
Fix extraCLIOptions in swift-toolset.json
marcprux c01a313
gcpdw
marcprux d0d85bb
Fix patch application
marcprux 341bf54
Update apply-patches.sh to remove unused changes
finagolfin b77748a
Update swift-android-testing-except-release.patch to add Testing fix
finagolfin 1bbe96b
Update swift-android.patch to remove unneeded patches
finagolfin 3006f75
Update build.sh to try and fix Testing and clean up the bundle more
finagolfin d413bdb
266ecdb
Fix README.md
marcprux File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash -ex | ||
|
||
patches_dir=$(dirname $(realpath -- "${BASH_SOURCE[0]}")) | ||
cd ${1} | ||
|
||
case "${BUILD_SCHEME}" in | ||
swift-*-branch) | ||
git apply -v -C1 ${patches_dir}/swift-android.patch | ||
git apply -v -C1 ${patches_dir}/swift-android-testing-except-release.patch | ||
;; | ||
development) | ||
git apply -v -C1 ${patches_dir}/swift-android.patch | ||
git apply -v -C1 ${patches_dir}/swift-android-trunk-libdispatch.patch | ||
git apply -v -C1 ${patches_dir}/swift-android-testing-except-release.patch | ||
;; | ||
*) | ||
echo "$0: invalid BUILD_SCHEME=${BUILD_SCHEME}" | ||
exit 1 | ||
;; | ||
esac | ||
|
||
# disable backtrace() for Android (needs either API33+ or libandroid-execinfo, or to manually add in backtrace backport) | ||
perl -pi -e 's;os\(Android\);os\(AndroidDISABLED\);g' swift-testing/Sources/Testing/SourceAttribution/Backtrace.swift | ||
|
||
# need to un-apply libandroid-spawn since we don't need it for API28+ | ||
perl -pi -e 's;MATCHES "Android";MATCHES "AndroidDISABLED";g' llbuild/lib/llvm/Support/CMakeLists.txt | ||
perl -pi -e 's; STREQUAL Android\); STREQUAL AndroidDISABLED\);g' swift-corelibs-foundation/Sources/Foundation/CMakeLists.txt | ||
|
||
|
143 changes: 143 additions & 0 deletions
143
swift-ci/sdks/android/patches/swift-android-testing-except-release.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
diff --git a/swift/test/ClangImporter/pcm-emit-direct-cc1-mode.swift b/swift/test/ClangImporter/pcm-emit-direct-cc1-mode.swift | ||
index f5048b9e3d5..c227ef7b77d 100644 | ||
--- a/swift/test/ClangImporter/pcm-emit-direct-cc1-mode.swift | ||
+++ b/swift/test/ClangImporter/pcm-emit-direct-cc1-mode.swift | ||
@@ -9,7 +9,7 @@ | ||
// CHECK-DUMP: Module map file: {{.*[/\\]}}Inputs{{/|\\}}custom-modules{{/|\\}}module.modulemap | ||
|
||
// Verify that the clang command-line used is cc1 | ||
-// RUN: %FileCheck -check-prefix CHECK-CLANG -DTRIPLE=%target-triple %s < %t.diags.txt | ||
+// RUN: %FileCheck -check-prefix CHECK-CLANG -DTRIPLE=%module-target-triple %s < %t.diags.txt | ||
// CHECK-CLANG: clang importer cc1 args | ||
// CHECK-CLANG-SAME: '-o' '{{.*[/\\]}}script.pcm' '-fsyntax-only' '-x' 'objective-c' '{{.*[/\\]}}module.modulemap' '-triple' '[[TRIPLE]]' | ||
// CHECK-CLANG-SAME: '-fmodules' | ||
diff --git a/swift/test/IRGen/abitypes_arm.swift b/swift/test/IRGen/abitypes_arm.swift | ||
index 9428294483d..52bd8b10145 100644 | ||
--- a/swift/test/IRGen/abitypes_arm.swift | ||
+++ b/swift/test/IRGen/abitypes_arm.swift | ||
@@ -11,6 +11,6 @@ class Foo { | ||
} | ||
} | ||
|
||
-// armv7: define internal void @makeOne(ptr noalias sret({{.*}}) align 4 %agg.result, float{{( noundef)?}} %f, float{{( noundef)?}} %s) | ||
+// armv7: define internal void @makeOne(ptr{{( dead_on_unwind)?}} noalias{{( writable)?}} sret({{.*}}) align 4 %agg.result, float{{( noundef)?}} %f, float{{( noundef)?}} %s) | ||
// armv7s: define internal void @makeOne(ptr noalias sret({{.*}}) align 4 %agg.result, float %f, float %s) | ||
// armv7k: define internal %struct.One @makeOne(float {{.*}}%f, float {{.*}}%s) | ||
diff --git a/swift/test/Interop/Cxx/class/constructors-copy-module-interface.swift b/swift/test/Interop/Cxx/class/constructors-copy-module-interface.swift | ||
index 042c10e7d1d..254f6543b58 100644 | ||
--- a/swift/test/Interop/Cxx/class/constructors-copy-module-interface.swift | ||
+++ b/swift/test/Interop/Cxx/class/constructors-copy-module-interface.swift | ||
@@ -1,4 +1,5 @@ | ||
// RUN: %target-swift-ide-test -print-module -module-to-print=Constructors -I %S/Inputs -source-filename=x -enable-experimental-cxx-interop | %FileCheck %s | ||
+// XFAIL: OS=linux-androideabi | ||
|
||
// CHECK: struct TemplatedCopyConstructor | ||
// CHECK: struct TemplatedCopyConstructorWithExtraArg | ||
diff --git a/swift/test/Interop/Cxx/class/constructors-diagnostics.swift b/swift/test/Interop/Cxx/class/constructors-diagnostics.swift | ||
index aac01480660..8fa99fae7fb 100644 | ||
--- a/swift/test/Interop/Cxx/class/constructors-diagnostics.swift | ||
+++ b/swift/test/Interop/Cxx/class/constructors-diagnostics.swift | ||
@@ -2,6 +2,7 @@ | ||
|
||
// This test uses -verify-additional-file, which do not work well on Windows. | ||
// UNSUPPORTED: OS=windows-msvc | ||
+// XFAIL: OS=linux-androideabi | ||
|
||
import Constructors | ||
|
||
diff --git a/swift/test/Interop/Cxx/class/constructors-module-interface.swift b/swift/test/Interop/Cxx/class/constructors-module-interface.swift | ||
index bf189b6e302..d2c3d65f03e 100644 | ||
--- a/swift/test/Interop/Cxx/class/constructors-module-interface.swift | ||
+++ b/swift/test/Interop/Cxx/class/constructors-module-interface.swift | ||
@@ -1,4 +1,5 @@ | ||
// RUN: %target-swift-ide-test -print-module -module-to-print=Constructors -I %S/Inputs/ -source-filename=x -enable-experimental-cxx-interop | %FileCheck %s | ||
+// XFAIL: OS=linux-androideabi | ||
|
||
// CHECK: struct ExplicitDefaultConstructor { | ||
// CHECK-NEXT: init() | ||
diff --git a/swift/test/Interop/Cxx/class/constructors-silgen.swift b/swift/test/Interop/Cxx/class/constructors-silgen.swift | ||
index b1624ccccfe..79cbdf170de 100644 | ||
--- a/swift/test/Interop/Cxx/class/constructors-silgen.swift | ||
+++ b/swift/test/Interop/Cxx/class/constructors-silgen.swift | ||
@@ -1,4 +1,5 @@ | ||
// RUN: %target-swiftxx-frontend -I %S/Inputs -Xllvm -sil-print-types -emit-silgen %s | %FileCheck %s | ||
+// XFAIL: OS=linux-androideabi | ||
|
||
import Constructors | ||
|
||
diff --git a/swift/test/Interop/Cxx/class/constructors-typechecker.swift b/swift/test/Interop/Cxx/class/constructors-typechecker.swift | ||
index 8ce10b1ca75..52ff4104b83 100644 | ||
--- a/swift/test/Interop/Cxx/class/constructors-typechecker.swift | ||
+++ b/swift/test/Interop/Cxx/class/constructors-typechecker.swift | ||
@@ -1,4 +1,5 @@ | ||
// RUN: %target-typecheck-verify-swift -verify-ignore-unknown -I %S/Inputs -enable-experimental-cxx-interop | ||
+// XFAIL: OS=linux-androideabi | ||
|
||
import Constructors | ||
|
||
diff --git a/swift/test/Interop/Cxx/class/custom-new-operator-irgen.swift b/swift/test/Interop/Cxx/class/custom-new-operator-irgen.swift | ||
index 74e692c9db2..0423493afac 100644 | ||
--- a/swift/test/Interop/Cxx/class/custom-new-operator-irgen.swift | ||
+++ b/swift/test/Interop/Cxx/class/custom-new-operator-irgen.swift | ||
@@ -5,4 +5,4 @@ import CustomNewOperator | ||
var x = callsCustomNew() | ||
|
||
// Make sure the definition of `operator new` is emitted. | ||
-// CHECK: define {{.*}} @{{_ZnwmPv15container_new_t|"\?\?2@YAPEAX_KPEAXUcontainer_new_t@@@Z"}} | ||
+// CHECK: define {{.*}} @{{_Znw(j|m)Pv15container_new_t|"\?\?2@YAPEAX_KPEAXUcontainer_new_t@@@Z"}} | ||
diff --git a/swift/test/SILOptimizer/package-cmo-serialize-tables.swift b/swift/test/SILOptimizer/package-cmo-serialize-tables.swift | ||
index 382ff2e8080..f061374b2a1 100644 | ||
--- a/swift/test/SILOptimizer/package-cmo-serialize-tables.swift | ||
+++ b/swift/test/SILOptimizer/package-cmo-serialize-tables.swift | ||
@@ -19,7 +19,7 @@ | ||
|
||
// Temporarily disabling on watchOS (both arm64_32 & armv7k): | ||
// rdar://140330692 (🟠 OSS Swift CI: oss-swift_tools-RA_stdlib-DA_test-device-non_executable failed... | ||
-// UNSUPPORTED: OS=watchos | ||
+// UNSUPPORTED: OS=watchos, OS=linux-androideabi | ||
|
||
//--- main.swift | ||
|
||
diff --git a/swift/test/SILOptimizer/throws_prediction.swift b/swift/test/SILOptimizer/throws_prediction.swift | ||
index f7f2664b2de..01d36e127c6 100644 | ||
--- a/swift/test/SILOptimizer/throws_prediction.swift | ||
+++ b/swift/test/SILOptimizer/throws_prediction.swift | ||
@@ -16,7 +16,7 @@ | ||
// RUN: -sil-verify-all -module-name=test -emit-sil \ | ||
// RUN: | %FileCheck --check-prefix CHECK-DISABLED %s | ||
|
||
-// UNSUPPORTED: CPU=armv7k || CPU=arm64_32 | ||
+// UNSUPPORTED: CPU=armv7k, CPU=arm64_32, CPU=armv7 | ||
|
||
// CHECK-DISABLED-NOT: normal_count | ||
|
||
diff --git a/swift-corelibs-xctest/cmake/modules/PlatformInfo.cmake b/swift-corelibs-xctest/cmake/modules/PlatformInfo.cmake | ||
index 468dc61..a90ae3d 100644 | ||
--- a/swift-corelibs-xctest/cmake/modules/PlatformInfo.cmake | ||
+++ b/swift-corelibs-xctest/cmake/modules/PlatformInfo.cmake | ||
@@ -2,6 +2,10 @@ | ||
set(print_target_info_invocation "${CMAKE_Swift_COMPILER}" -print-target-info) | ||
if(CMAKE_Swift_COMPILER_TARGET) | ||
list(APPEND print_target_info_invocation -target ${CMAKE_Swift_COMPILER_TARGET}) | ||
+else() | ||
+ set(arg_list ${CMAKE_Swift_FLAGS}) | ||
+ separate_arguments(arg_list) | ||
+ list(APPEND print_target_info_invocation ${arg_list}) | ||
endif() | ||
execute_process(COMMAND ${print_target_info_invocation} OUTPUT_VARIABLE target_info_json) | ||
message(CONFIGURE_LOG "Swift Target Info: ${print_target_info_invocation}\n" | ||
diff --git a/swift-testing/cmake/modules/PlatformInfo.cmake b/swift-testing/cmake/modules/PlatformInfo.cmake | ||
index 94c60ef..ab8a491 100644 | ||
--- a/swift-testing/cmake/modules/PlatformInfo.cmake | ||
+++ b/swift-testing/cmake/modules/PlatformInfo.cmake | ||
@@ -9,6 +9,10 @@ | ||
set(print_target_info_invocation "${CMAKE_Swift_COMPILER}" -print-target-info) | ||
if(CMAKE_Swift_COMPILER_TARGET) | ||
list(APPEND print_target_info_invocation -target ${CMAKE_Swift_COMPILER_TARGET}) | ||
+else() | ||
+ set(arg_list ${CMAKE_Swift_FLAGS}) | ||
+ separate_arguments(arg_list) | ||
+ list(APPEND print_target_info_invocation ${arg_list}) | ||
endif() | ||
execute_process(COMMAND ${print_target_info_invocation} OUTPUT_VARIABLE target_info_json) | ||
message(CONFIGURE_LOG "Swift Target Info: ${print_target_info_invocation}\n" |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.