Skip to content

Commit

Permalink
Updated GitHub CI
Browse files Browse the repository at this point in the history
  • Loading branch information
colemancda committed May 28, 2022
1 parent 90b37a3 commit bc6a86f
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 11 deletions.
14 changes: 4 additions & 10 deletions .github/workflows/buildroot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ on: [push]

jobs:

buildroot-armv7:
name: Buildroot Armv7
buildroot-armv7-build:
name: Build Armv7
runs-on: ubuntu-20.04
container: colemancda/swift-buildroot:amd64-prebuilt-armv7
steps:
Expand All @@ -22,11 +22,5 @@ jobs:
- name: Archive Build artifacts
uses: actions/upload-artifact@v3
with:
name: swiftpm-build
path: .build/*
- name: Test
run: |
cd /usr/src/buildroot-external
export SWIFT_ARCH=armv7
export BUILDROOT_SRCDIR=./buildroot-${SWIFT_ARCH}
chroot ${BUILDROOT_SRCDIR}/output/target /usr/bin/qemu-arm-static /usr/bin/NetlinkPackageTests.xctest
name: swiftpm-build-armv7
path: .build/*/*.xctest
67 changes: 67 additions & 0 deletions .github/workflows/swift-arm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Swift ARM

on: [push]

jobs:

linux-swift-5_6-armv7-debian-build:
name: Build Debian Armv7 (Swift 5.6.1)
runs-on: ubuntu-20.04
container: colemancda/swift-armv7:5.6.1-prebuilt
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Swift Version
run: swift --version
- name: Build
run: |
cd /usr/src/swift-armv7
export SWIFT_PACKAGE_SRCDIR=$GITHUB_WORKSPACE
export SWIFT_PACKAGE_BUILDDIR=$SWIFT_PACKAGE_SRCDIR/.build
mkdir -p $SWIFT_PACKAGE_BUILDDIR
mkdir -p /usr/src/swift-armv7/build/
./generate-swiftpm-toolchain.sh
./build-swift-package.sh
- name: Archive Build artifacts
uses: actions/upload-artifact@v3
with:
name: swiftpm-5_6-build-debian-armv7
path: .build/*/*.xctest

linux-swift-5_6-armv7-debian-armv7-test:
name: Test Armv7
runs-on: [self-hosted, linux, ARM64, debian-unstable]
needs: linux-swift-5_6-armv7-debian-build
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: swiftpm-5_6-build-debian-armv7
- name: Test
run: |
chmod +x ./release/NetlinkPackageTests.xctest
schroot -c bullseye-armv7 ./release/NetlinkPackageTests.xctest
linux-swift-5_5-armv7-debian-build:
name: Build Debian Armv7 (Swift 5.5.3)
runs-on: ubuntu-20.04
container: colemancda/swift-armv7:5.5.3-amd64-prebuilt
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Swift Version
run: swift --version
- name: Build
run: |
cd /usr/src/swift-armv7
export SWIFT_PACKAGE_SRCDIR=$GITHUB_WORKSPACE
export SWIFT_PACKAGE_BUILDDIR=$SWIFT_PACKAGE_SRCDIR/.build
mkdir -p $SWIFT_PACKAGE_BUILDDIR
mkdir -p /usr/src/swift-armv7/build/
./generate-swiftpm-toolchain.sh
./build-swift-package.sh
- name: Archive Build artifacts
uses: actions/upload-artifact@v3
with:
name: swiftpm-5_5-build-debian-armv7
path: .build/*/*.xctest
25 changes: 24 additions & 1 deletion .github/workflows/swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
run: swift test --configuration release -Xswiftc -enable-testing

linux-swift:
name: Linux
name: Linux (Swift 5.6.1)
runs-on: ubuntu-20.04
container: swift:5.6.1-focal
steps:
Expand All @@ -41,5 +41,28 @@ jobs:
run: swift test --configuration debug --enable-code-coverage
- name: Test (Release)
run: swift test --configuration release -Xswiftc -enable-testing --enable-code-coverage
- name: Archive Build artifacts
uses: actions/upload-artifact@v3
with:
name: swiftpm-build-ubuntu-x86_64
path: .build/*/*.xctest
- name: Coverage Report
uses: maxep/[email protected]

linux-swift-5_5:
name: Linux (Swift 5.5.3)
runs-on: ubuntu-20.04
container: swift:5.5.3-focal
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Swift Version
run: swift --version
- name: Build (Debug)
run: swift build -c debug
- name: Build (Release)
run: swift build -c release
- name: Test (Debug)
run: swift test --configuration debug
- name: Test (Release)
run: swift test --configuration release -Xswiftc -enable-testing

0 comments on commit bc6a86f

Please sign in to comment.