@@ -16,20 +16,15 @@ $ ./build-docker <version> <workdir>
16
16
for example:
17
17
18
18
```
19
- $ ./build-docker release /tmp/android-sdk
19
+ $ ./build-docker tag:swift-6.2-RELEASE /tmp/android-sdk
20
20
```
21
21
22
22
This will create an Ubuntu 24.04 container with the necessary dependencies
23
23
to build the Android SDK, including a Swift host toolchain and the
24
24
Android NDK that will be used for cross-compilation.
25
25
26
- The ` version ` argument can be one of the following values:
27
-
28
- | version | Swift version example |
29
- | --- | --- |
30
- | ` release ` | swift-6.1-RELEASE |
31
- | ` swift-6.2-branch ` | swift-6.2-DEVELOPMENT-SNAPSHOT-yyyy-mm-dd |
32
- | ` development ` | swift-DEVELOPMENT-SNAPSHOT-yyyy-mm-dd |
26
+ The ` version ` argument can be a branch scheme, like "scheme: release /6.2", or a
27
+ tag, like "tag: swift-6 .2-DEVELOPMENT-SNAPSHOT-2025-09-04-a".
33
28
34
29
> [ !WARNING]
35
30
> The workdir argument must not be located in a git repository (e.g., it cannot be the
@@ -41,7 +36,7 @@ The top-level `./build-docker` script installs a host toolchain and the
41
36
Android NDK, and then invokes ` scripts/fetch-source.sh ` which will
42
37
fetch tagged sources for libxml2, curl, boringssl, and swift.
43
38
44
- It then applies some patches and invokes ` scripts/build.sh ` ,
39
+ It then applies some perl substitutions and invokes ` scripts/build.sh ` ,
45
40
which will build the sources for each of the specified
46
41
architectures and then combines the SDKs into a single
47
42
artifactbundle with targetTriples for each of the supported
@@ -50,7 +45,7 @@ and Android API levels (28-35).
50
45
51
46
## Specifying Architectures
52
47
53
- By default all the supported Android architectures
48
+ By default, all the supported Android architectures
54
49
will be built, but this can be reduced in order to speed
55
50
up the build. This can be useful, e.g., as part of a CI that
56
51
validates a pull request, as building a single architecture
@@ -60,19 +55,20 @@ whereas building for all the architectures takes over an hour.
60
55
To build an artifactbundle for just the ` x86_64 ` architecture, run:
61
56
62
57
```
63
- TARGET_ARCHS=x86_64 ./build-docker release /tmp/android-sdk
58
+ TARGET_ARCHS=x86_64 ./build-docker scheme:main /tmp/android-sdk
64
59
```
65
60
66
- ## Installing and validating the SDK
61
+ ## Building the Swift compiler from source and running the validation suite
67
62
68
- The ` .github/workflows/pull_request.yml ` workflow
69
- will create and upload an installable SDK named something like:
70
- ` swift-6.1-RELEASE_android-0.1.artifactbundle.tar.gz `
63
+ All tags that are specified will download the official release or snapshot
64
+ toolchain and build only the bundle by default, while building from a branch
65
+ scheme always builds the full Swift compiler from the latest commit in that
66
+ branch. If you want to build the Swift compiler from source for a tag also and
67
+ run the compiler validation suite, specify the ` BUILD_COMPILER ` variable:
71
68
72
- The GitHub workflow will also install the SDK locally and use
73
- [ swift-android-action] ( https://github.com/marketplace/actions/swift-android-action )
74
- to build and test various Swift packages in an Android emulator using the
75
- freshly-created SDK bundle.
69
+ ```
70
+ BUILD_COMPILER=yes ./build-docker tag:swift-DEVELOPMENT-SNAPSHOT-2025-09-04-a /tmp/android-sdk
71
+ ```
76
72
77
73
## Building locally
78
74
@@ -85,5 +81,5 @@ a GitHub runner). A local build can be run with the
85
81
` build-local ` script, such as:
86
82
87
83
```
88
- ./build-local swift- 6.2-branch /tmp/android-sdk-devel
84
+ ./build-local scheme:release/ 6.2 /tmp/android-sdk
89
85
```
0 commit comments