Skip to content

Commit bfdd6c5

Browse files
committed
Update GitHub CI for Linux ARM
1 parent 025e3bc commit bfdd6c5

File tree

1 file changed

+88
-0
lines changed

1 file changed

+88
-0
lines changed

.github/workflows/swift-arm.yml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: Swift ARM
2+
on: [push]
3+
jobs:
4+
5+
linux-arm-raspios-build:
6+
name: Linux (Build)
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
config: ["debug" , "release"]
11+
swift: ["6.1.2"]
12+
linux: ["raspios"]
13+
release: ["bookworm"]
14+
arch: ["armv6", "armv7"]
15+
container: swift:${{ matrix.swift }}
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
- name: Install dependencies
20+
run: apt update -y; apt install wget -y
21+
- name: Install SDK
22+
run: |
23+
wget https://github.com/xtremekforever/swift-armv7/releases/download/${{ matrix.swift }}/swift-${{ matrix.swift }}-RELEASE-${{ matrix.linux }}-${{ matrix.release }}-${{ matrix.arch }}-sdk.tar.gz
24+
tar -xvf swift-${{ matrix.swift }}-RELEASE-${{ matrix.linux }}-${{ matrix.release }}-${{ matrix.arch }}-sdk.tar.gz
25+
mv swift-${{ matrix.swift }}-RELEASE-${{ matrix.linux }}-${{ matrix.release }}-${{ matrix.arch }} /opt/swift-${{ matrix.swift }}-RELEASE-${{ matrix.linux }}-${{ matrix.release }}-${{ matrix.arch }}
26+
- name: Swift Version
27+
run: swift --version
28+
- name: Build
29+
run: SWIFT_BUILD_DYNAMIC_LIBRARY=1 swift build -c ${{ matrix.config }} --destination /opt/swift-${{ matrix.swift }}-RELEASE-${{ matrix.linux }}-${{ matrix.release }}-${{ matrix.arch }}/${{ matrix.linux }}-${{ matrix.release }}.json
30+
31+
linux-arm-debian-build:
32+
name: Linux (Build)
33+
runs-on: ubuntu-latest
34+
strategy:
35+
matrix:
36+
config: ["debug" , "release"]
37+
swift: ["6.1.2"]
38+
linux: ["debian"]
39+
release: ["bookworm", "bullseye"]
40+
arch: ["armv7"]
41+
container: swift:${{ matrix.swift }}
42+
steps:
43+
- name: Checkout
44+
uses: actions/checkout@v4
45+
- name: Install dependencies
46+
run: apt update -y; apt install wget -y
47+
- name: Install SDK
48+
run: |
49+
wget https://github.com/xtremekforever/swift-armv7/releases/download/${{ matrix.swift }}/swift-${{ matrix.swift }}-RELEASE-${{ matrix.linux }}-${{ matrix.release }}-${{ matrix.arch }}-sdk.tar.gz
50+
tar -xvf swift-${{ matrix.swift }}-RELEASE-${{ matrix.linux }}-${{ matrix.release }}-${{ matrix.arch }}-sdk.tar.gz
51+
mv swift-${{ matrix.swift }}-RELEASE-${{ matrix.linux }}-${{ matrix.release }}-${{ matrix.arch }} /opt/swift-${{ matrix.swift }}-RELEASE-${{ matrix.linux }}-${{ matrix.release }}-${{ matrix.arch }}
52+
- name: Swift Version
53+
run: swift --version
54+
- name: Build
55+
run: SWIFT_BUILD_DYNAMIC_LIBRARY=1 swift build -c ${{ matrix.config }} --destination /opt/swift-${{ matrix.swift }}-RELEASE-${{ matrix.linux }}-${{ matrix.release }}-${{ matrix.arch }}/${{ matrix.linux }}-${{ matrix.release }}.json
56+
- name: Upload artifacts
57+
uses: actions/upload-artifact@v4
58+
with:
59+
name: "swift-${{ matrix.swift }}-RELEASE-${{ matrix.linux }}-${{ matrix.release }}-${{ matrix.arch }}-coremodel-${{ matrix.config }}"
60+
path: .build/armv7-unknown-linux-gnueabihf/${{ matrix.config }}/libCoreModel.so
61+
62+
63+
linux-arm-test:
64+
name: Linux (Test)
65+
runs-on: ubuntu-latest
66+
strategy:
67+
matrix:
68+
swift: ["6.0.3"]
69+
container: swift:${{ matrix.swift }}
70+
steps:
71+
- name: Checkout
72+
uses: actions/checkout@v4
73+
- name: Install dependencies
74+
run: apt update -y; apt install wget -y
75+
- name: Install SDK
76+
run: |
77+
wget https://github.com/xtremekforever/swift-armv7/releases/download/${{ matrix.swift }}/swift-${{ matrix.swift }}-RELEASE-debian-bookworm-armv7-sdk.tar.gz
78+
tar -xvf swift-${{ matrix.swift }}-RELEASE-debian-bookworm-armv7-sdk.tar.gz
79+
mv swift-${{ matrix.swift }}-RELEASE-debian-bookworm-armv7 /opt/swift-${{ matrix.swift }}-RELEASE-debian-bookworm-armv7
80+
- name: Swift Version
81+
run: swift --version
82+
- name: Build
83+
run: SWIFT_BUILD_DYNAMIC_LIBRARY=0 swift build --build-tests --destination /opt/swift-${{ matrix.swift }}-RELEASE-debian-bookworm-armv7/debian-bookworm.json
84+
- name: Upload artifacts
85+
uses: actions/upload-artifact@v4
86+
with:
87+
name: "linux-armv7-bookworm-tests-${{ matrix.swift }}"
88+
path: .build/armv7-unknown-linux-gnueabihf/debug/CoreModelPackageTests.xctest

0 commit comments

Comments
 (0)