Skip to content

Commit bc6a86f

Browse files
committed
Updated GitHub CI
1 parent 90b37a3 commit bc6a86f

File tree

3 files changed

+95
-11
lines changed

3 files changed

+95
-11
lines changed

.github/workflows/buildroot.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ on: [push]
44

55
jobs:
66

7-
buildroot-armv7:
8-
name: Buildroot Armv7
7+
buildroot-armv7-build:
8+
name: Build Armv7
99
runs-on: ubuntu-20.04
1010
container: colemancda/swift-buildroot:amd64-prebuilt-armv7
1111
steps:
@@ -22,11 +22,5 @@ jobs:
2222
- name: Archive Build artifacts
2323
uses: actions/upload-artifact@v3
2424
with:
25-
name: swiftpm-build
26-
path: .build/*
27-
- name: Test
28-
run: |
29-
cd /usr/src/buildroot-external
30-
export SWIFT_ARCH=armv7
31-
export BUILDROOT_SRCDIR=./buildroot-${SWIFT_ARCH}
32-
chroot ${BUILDROOT_SRCDIR}/output/target /usr/bin/qemu-arm-static /usr/bin/NetlinkPackageTests.xctest
25+
name: swiftpm-build-armv7
26+
path: .build/*/*.xctest

.github/workflows/swift-arm.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Swift ARM
2+
3+
on: [push]
4+
5+
jobs:
6+
7+
linux-swift-5_6-armv7-debian-build:
8+
name: Build Debian Armv7 (Swift 5.6.1)
9+
runs-on: ubuntu-20.04
10+
container: colemancda/swift-armv7:5.6.1-prebuilt
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v3
14+
- name: Swift Version
15+
run: swift --version
16+
- name: Build
17+
run: |
18+
cd /usr/src/swift-armv7
19+
export SWIFT_PACKAGE_SRCDIR=$GITHUB_WORKSPACE
20+
export SWIFT_PACKAGE_BUILDDIR=$SWIFT_PACKAGE_SRCDIR/.build
21+
mkdir -p $SWIFT_PACKAGE_BUILDDIR
22+
mkdir -p /usr/src/swift-armv7/build/
23+
./generate-swiftpm-toolchain.sh
24+
./build-swift-package.sh
25+
- name: Archive Build artifacts
26+
uses: actions/upload-artifact@v3
27+
with:
28+
name: swiftpm-5_6-build-debian-armv7
29+
path: .build/*/*.xctest
30+
31+
linux-swift-5_6-armv7-debian-armv7-test:
32+
name: Test Armv7
33+
runs-on: [self-hosted, linux, ARM64, debian-unstable]
34+
needs: linux-swift-5_6-armv7-debian-build
35+
steps:
36+
- name: Download artifacts
37+
uses: actions/download-artifact@v3
38+
with:
39+
name: swiftpm-5_6-build-debian-armv7
40+
- name: Test
41+
run: |
42+
chmod +x ./release/NetlinkPackageTests.xctest
43+
schroot -c bullseye-armv7 ./release/NetlinkPackageTests.xctest
44+
45+
linux-swift-5_5-armv7-debian-build:
46+
name: Build Debian Armv7 (Swift 5.5.3)
47+
runs-on: ubuntu-20.04
48+
container: colemancda/swift-armv7:5.5.3-amd64-prebuilt
49+
steps:
50+
- name: Checkout
51+
uses: actions/checkout@v3
52+
- name: Swift Version
53+
run: swift --version
54+
- name: Build
55+
run: |
56+
cd /usr/src/swift-armv7
57+
export SWIFT_PACKAGE_SRCDIR=$GITHUB_WORKSPACE
58+
export SWIFT_PACKAGE_BUILDDIR=$SWIFT_PACKAGE_SRCDIR/.build
59+
mkdir -p $SWIFT_PACKAGE_BUILDDIR
60+
mkdir -p /usr/src/swift-armv7/build/
61+
./generate-swiftpm-toolchain.sh
62+
./build-swift-package.sh
63+
- name: Archive Build artifacts
64+
uses: actions/upload-artifact@v3
65+
with:
66+
name: swiftpm-5_5-build-debian-armv7
67+
path: .build/*/*.xctest

.github/workflows/swift.yml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
run: swift test --configuration release -Xswiftc -enable-testing
2626

2727
linux-swift:
28-
name: Linux
28+
name: Linux (Swift 5.6.1)
2929
runs-on: ubuntu-20.04
3030
container: swift:5.6.1-focal
3131
steps:
@@ -41,5 +41,28 @@ jobs:
4141
run: swift test --configuration debug --enable-code-coverage
4242
- name: Test (Release)
4343
run: swift test --configuration release -Xswiftc -enable-testing --enable-code-coverage
44+
- name: Archive Build artifacts
45+
uses: actions/upload-artifact@v3
46+
with:
47+
name: swiftpm-build-ubuntu-x86_64
48+
path: .build/*/*.xctest
4449
- name: Coverage Report
4550
uses: maxep/[email protected]
51+
52+
linux-swift-5_5:
53+
name: Linux (Swift 5.5.3)
54+
runs-on: ubuntu-20.04
55+
container: swift:5.5.3-focal
56+
steps:
57+
- name: Checkout
58+
uses: actions/checkout@v2
59+
- name: Swift Version
60+
run: swift --version
61+
- name: Build (Debug)
62+
run: swift build -c debug
63+
- name: Build (Release)
64+
run: swift build -c release
65+
- name: Test (Debug)
66+
run: swift test --configuration debug
67+
- name: Test (Release)
68+
run: swift test --configuration release -Xswiftc -enable-testing

0 commit comments

Comments
 (0)