5
5
build-swift-armv7 :
6
6
name : Build Swift
7
7
runs-on : [Linux, X64]
8
- container : colemancda /swift-armv7
8
+ container : orobio /swift-armv7:5.10
9
9
timeout-minutes : 480
10
10
steps :
11
11
- name : Checkout
@@ -14,71 +14,11 @@ jobs:
14
14
run : swift --version
15
15
- name : Build
16
16
run : |
17
+ export SWIFT_NATIVE_PATH=/opt/swift/5.10/usr/bin
17
18
export SRC_ROOT=$GITHUB_WORKSPACE
18
- rm -rf /usr/bin/swift-def-to-yaml-converter
19
- ln -s $SRC_ROOT/build/swift-linux-armv7/bin/swift-def-to-yaml-converter /usr/bin/swift-def-to-yaml-converter
20
- rm -rf /usr/bin/swift-serialize-diagnostics
21
- ln -s $SRC_ROOT/build/swift-linux-armv7/bin/swift-serialize-diagnostics /usr/bin/swift-serialize-diagnostics
22
19
./build.sh
23
20
- name : Archive Swift Build artifacts
24
21
uses : actions/upload-artifact@v3
25
22
with :
26
23
name : swift-armv7
27
- path : ./build/swift-armv7.tar.gz
28
-
29
- build-xctoolchain-armv7 :
30
- name : Build Xcode toolchain
31
- runs-on : macos-latest
32
- needs : build-swift-armv7
33
- steps :
34
- - name : Checkout
35
- uses : actions/checkout@v3
36
- - name : Swift Version
37
- run : swift --version
38
- - name : Download artifacts
39
- uses : actions/download-artifact@v3
40
- with :
41
- name : swift-armv7
42
- path : ./build/
43
- - name : Generate Xcode toolchain
44
- run : |
45
- export SRC_ROOT=$GITHUB_WORKSPACE
46
- ./generate-xcode-toolchain.sh
47
- - name : Cross compile Swift package
48
- run : |
49
- export SRC_ROOT=$GITHUB_WORKSPACE
50
- ./build-swift-hello.sh
51
- - name : Archive swift-hello
52
- uses : actions/upload-artifact@v3
53
- with :
54
- name : swift-hello
55
- path : ./build/swift-hello/armv7-unknown-linux-gnueabihf/release/swift-hello
56
-
57
- test-swift-hello-armv7 :
58
- name : Test Swift runtime
59
- runs-on : [self-hosted, Linux, ARM]
60
- container : colemancda/swift-armv7:latest-runtime
61
- needs : build-xctoolchain-armv7
62
- steps :
63
- - name : Download Swift runtime
64
- uses : actions/download-artifact@v3
65
- with :
66
- name : swift-armv7
67
- path : /tmp/
68
- - name : Install Swift
69
- run : |
70
- rm -rf /usr/lib/swift*
71
- rm -rf /usr/bin/swift*
72
- cd /tmp/
73
- tar -xf /tmp/swift-armv7.tar.gz
74
- cp -rf /tmp/usr/* /usr/
75
- rm -rf /tmp/usr
76
- - name : Download swift-hello
77
- uses : actions/download-artifact@v3
78
- with :
79
- name : swift-hello
80
- path : /tmp/
81
- - name : Test
82
- run : |
83
- chmod +x /tmp/swift-hello
84
- /tmp/swift-hello
24
+ path : ./workspace/build/swift-armv7.tar.gz
0 commit comments