@@ -25,11 +25,15 @@ Android NDK that will be used for cross-compilation.
25
25
26
26
The ` version ` argument can be one of the following values:
27
27
28
- | version | Swift version |
28
+ | version | Swift version example |
29
29
| --- | --- |
30
30
| ` release ` | swift-6.1-RELEASE |
31
- | ` devel ` | swift-6.2-DEVELOPMENT-SNAPSHOT-yyyy-mm-dd |
32
- | ` trunk ` | swift-DEVELOPMENT-SNAPSHOT-yyyy-mm-dd |
31
+ | ` swift-6.2-branch ` | swift-6.2-DEVELOPMENT-SNAPSHOT-yyyy-mm-dd |
32
+ | ` development ` | swift-DEVELOPMENT-SNAPSHOT-yyyy-mm-dd |
33
+
34
+ > [ !WARNING]
35
+ > The workdir argument must not be located in a git repository (e.g., it cannot be the
36
+ > current directory)
33
37
34
38
## Running
35
39
@@ -52,12 +56,11 @@ up the build. This can be useful, e.g., as part of a CI that
52
56
validates a pull request, as building a single architecture
53
57
takes around 30 minutes on a standard ubuntu-24.04 GitHub runner,
54
58
whereas building for all the architectures takes over an hour.
55
- Building within a docker container increases this by about 50%.
56
59
57
60
To build an artifactbundle for just the ` x86_64 ` architecture, run:
58
61
59
62
```
60
- TARGET_ARCHS=aarch64 ./build-docker release /tmp/android-sdk
63
+ TARGET_ARCHS=x86_64 ./build-docker release /tmp/android-sdk
61
64
```
62
65
63
66
## Installing and validating the SDK
@@ -66,7 +69,17 @@ The `.github/workflows/pull_request.yml` workflow
66
69
will create and upload an installable SDK named something like:
67
70
` swift-6.1-RELEASE_android-0.1.artifactbundle.tar.gz `
68
71
69
- The workflow will also install the SDK locally and use
72
+ The GitHub workflow will also install the SDK locally and use
70
73
[ swift-android-action] ( https://github.com/marketplace/actions/swift-android-action )
71
74
to build and test various Swift packages in an Android emulator using the
72
75
freshly-created SDK bundle.
76
+
77
+ ## Building locally
78
+
79
+ Instead of building within a Docker container, the script can also
80
+ perform the build locally on an Ubuntu 24.04 machine with all the
81
+ build prerequisites already installed. This will generate
82
+ the same artifacts in approximately half the time, and
83
+ may be suitable to an already containerized envrionment (such as
84
+ a GitHub runner).
85
+
0 commit comments