@@ -31,27 +31,26 @@ jobs:
3131 retention-days : 5
3232
3333 linux-amd64 :
34- name : Build Linux AMD64 binary
3534 runs-on : ubuntu-latest
3635 steps :
37- - name : Checkout
38- uses : actions/checkout@v4
39-
40- - name : Set up Docker Buildx
41- uses : docker/setup-buildx-action@v3
42-
43- - name : Build AMD64 binary
44- uses : docker/build-push-action@v5
36+ - uses : actions/checkout@v4
37+ - uses : docker/setup-buildx-action@v3
38+ - uses : docker/build-push-action@v5
4539 with :
4640 context : .
4741 target : output
42+ platforms : linux/amd64
43+ build-args : |
44+ SWIFT_SDK_ID=x86_64-swift-linux-musl
4845 outputs : type=local,dest=artifacts
49-
46+ - name : Assert x86_64 binary
47+ run : |
48+ file artifacts/subtree
49+ file artifacts/subtree | grep -q 'x86-64' # fail if not x86_64
5050 - name : Strip and prepare binary
5151 run : |
5252 strip artifacts/subtree
5353 mv artifacts/subtree subtree_linux
54-
5554 - name : Upload AMD64 Artifact
5655 uses : actions/upload-artifact@v4
5756 with :
@@ -60,27 +59,26 @@ jobs:
6059 retention-days : 5
6160
6261 linux-arm64 :
63- name : Build Linux ARM64 binary
6462 runs-on : ubuntu-24.04-arm
6563 steps :
66- - name : Checkout
67- uses : actions/checkout@v4
68-
69- - name : Set up Docker Buildx
70- uses : docker/setup-buildx-action@v3
71-
72- - name : Build ARM64 binary
73- uses : docker/build-push-action@v5
64+ - uses : actions/checkout@v4
65+ - uses : docker/setup-buildx-action@v3
66+ - uses : docker/build-push-action@v5
7467 with :
7568 context : .
7669 target : output
70+ platforms : linux/arm64
71+ build-args : |
72+ SWIFT_SDK_ID=aarch64-swift-linux-musl
7773 outputs : type=local,dest=artifacts
78-
74+ - name : Assert aarch64 binary
75+ run : |
76+ file artifacts/subtree
77+ file artifacts/subtree | grep -q 'ARM aarch64'
7978 - name : Strip and prepare binary
8079 run : |
8180 strip artifacts/subtree
8281 mv artifacts/subtree subtree_linux_aarch64
83-
8482 - name : Upload ARM64 Artifact
8583 uses : actions/upload-artifact@v4
8684 with :
0 commit comments