Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 87 additions & 0 deletions .github/workflows/swift-arm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Swift ARM
on: [push]
jobs:

linux-arm-raspios-build:
name: Linux (Raspian)
runs-on: ubuntu-latest
strategy:
matrix:
config: ["debug" , "release"]
swift: ["6.1.2"]
linux: ["raspios"]
release: ["bookworm"]
arch: ["armv6", "armv7"]
container: swift:${{ matrix.swift }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: apt update -y; apt install wget -y
- name: Install SDK
run: |
wget https://github.com/xtremekforever/swift-armv7/releases/download/${{ matrix.swift }}/swift-${{ matrix.swift }}-RELEASE-${{ matrix.linux }}-${{ matrix.release }}-${{ matrix.arch }}-sdk.tar.gz
tar -xvf swift-${{ matrix.swift }}-RELEASE-${{ matrix.linux }}-${{ matrix.release }}-${{ matrix.arch }}-sdk.tar.gz
mv swift-${{ matrix.swift }}-RELEASE-${{ matrix.linux }}-${{ matrix.release }}-${{ matrix.arch }} /opt/swift-${{ matrix.swift }}-RELEASE-${{ matrix.linux }}-${{ matrix.release }}-${{ matrix.arch }}
- name: Swift Version
run: swift --version
- name: Build
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

linux-arm-debian-build:
name: Linux (Debian)
runs-on: ubuntu-latest
strategy:
matrix:
config: ["debug" , "release"]
swift: ["6.1.2"]
linux: ["debian"]
release: ["bookworm", "bullseye"]
arch: ["armv7"]
container: swift:${{ matrix.swift }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: apt update -y; apt install wget -y
- name: Install SDK
run: |
wget https://github.com/xtremekforever/swift-armv7/releases/download/${{ matrix.swift }}/swift-${{ matrix.swift }}-RELEASE-${{ matrix.linux }}-${{ matrix.release }}-${{ matrix.arch }}-sdk.tar.gz
tar -xvf swift-${{ matrix.swift }}-RELEASE-${{ matrix.linux }}-${{ matrix.release }}-${{ matrix.arch }}-sdk.tar.gz
mv swift-${{ matrix.swift }}-RELEASE-${{ matrix.linux }}-${{ matrix.release }}-${{ matrix.arch }} /opt/swift-${{ matrix.swift }}-RELEASE-${{ matrix.linux }}-${{ matrix.release }}-${{ matrix.arch }}
- name: Swift Version
run: swift --version
- name: Build
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
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: "swift-${{ matrix.swift }}-RELEASE-${{ matrix.linux }}-${{ matrix.release }}-${{ matrix.arch }}-bluetooth-${{ matrix.config }}"
path: .build/armv7-unknown-linux-gnueabihf/${{ matrix.config }}/libSocket.so

linux-arm-test:
name: Linux (Test)
runs-on: ubuntu-latest
strategy:
matrix:
swift: ["6.0.3"]
container: swift:${{ matrix.swift }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: apt update -y; apt install wget -y
- name: Install SDK
run: |
wget https://github.com/xtremekforever/swift-armv7/releases/download/${{ matrix.swift }}/swift-${{ matrix.swift }}-RELEASE-debian-bookworm-armv7-sdk.tar.gz
tar -xvf swift-${{ matrix.swift }}-RELEASE-debian-bookworm-armv7-sdk.tar.gz
mv swift-${{ matrix.swift }}-RELEASE-debian-bookworm-armv7 /opt/swift-${{ matrix.swift }}-RELEASE-debian-bookworm-armv7
- name: Swift Version
run: swift --version
- name: Build
run: SWIFT_BUILD_DYNAMIC_LIBRARY=0 swift build --build-tests --destination /opt/swift-${{ matrix.swift }}-RELEASE-debian-bookworm-armv7/debian-bookworm.json
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: "linux-armv7-bookworm-tests-${{ matrix.swift }}"
path: .build/armv7-unknown-linux-gnueabihf/debug/SocketTests.xctest
56 changes: 29 additions & 27 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,48 +5,50 @@ jobs:
macos:
name: macOS
runs-on: macos-15
strategy:
matrix:
config: ["debug", "release"]
options: ["", "SWIFT_BUILD_DYNAMIC_LIBRARY=1"]
steps:
- name: Checkout
uses: actions/checkout@v4
- 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 -c debug
- name: Build
run: ${{ matrix.options }} swift build -c ${{ matrix.config }}
- name: Test
run: ${{ matrix.options }} swift test -c ${{ matrix.config }}

linux:
name: Linux
strategy:
matrix:
container: ["swift:6.0.3", "swift:6.1.1", "swiftlang/swift:nightly"]
container: ["swift:6.0.3", "swift:6.1.2"]
config: ["debug", "release"]
options: ["", "SWIFT_BUILD_DYNAMIC_LIBRARY=1"]
runs-on: ubuntu-latest
container: ${{ matrix.container }}-jammy
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Swift Version
run: swift --version
- name: Build (Debug)
run: swift build -c debug --build-tests
- name: Build (Release)
run: swift build -c release
- name: Build
run: ${{ matrix.options }} swift build -c ${{ matrix.config }}

android:
name: Android
strategy:
fail-fast: false
matrix:
swift: ['6.1', 'nightly-6.2']
runs-on: macos-15
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: "Build Swift Package for Android"
run: |
brew install skiptools/skip/skip || (brew update && brew install skiptools/skip/skip)
skip android sdk install --version ${{ matrix.swift }}
# https://github.com/swiftlang/swift-driver/pull/1879
ANDROID_NDK_ROOT="" skip android build --build-tests
android-arm:
name: Android
strategy:
fail-fast: false
matrix:
swift: ['6.1', 'nightly-6.2']
arch: ["aarch64", "x86_64"]
runs-on: macos-15
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: "Build Swift Package for Android"
run: |
brew install skiptools/skip/skip || (brew update && brew install skiptools/skip/skip)
skip android sdk install --version ${{ matrix.swift }}
ANDROID_NDK_ROOT="" skip android build --build-tests --arch ${{ matrix.arch }}
9 changes: 0 additions & 9 deletions build-android.sh

This file was deleted.

Loading