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
26 changes: 19 additions & 7 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,34 @@ on:

jobs:
run:
name: Test on ${{ matrix.os }} with swift${{ matrix.swift }}
name: Test on ${{ matrix.os }} - ${{ matrix.version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest]
swift: ["5.10", "6.0", "6.1"]
include:
- os: ubuntu-latest
version: "5.10"
- os: ubuntu-latest
version: "6.0"
- os: ubuntu-latest
version: "6.1"
- os: ubuntu-latest
version: "6.2"
- os: macos-latest
version: "16.2" # Swift 6.0
- os: macos-latest
version: "16.4" # Swift 6.1
- os: macos-latest
version: "26.1" # Swift 6.2
steps:
- if: startsWith(matrix.os, 'ubuntu')
uses: vapor/swiftly-action@v0.2
with:
toolchain: ${{ matrix.swift }}
toolchain: ${{ matrix.version }}
- if: startsWith(matrix.os, 'macos')
uses: swift-actions/setup-swift@v2
with:
swift-version: ${{ matrix.swift }}
name: Select Xcode
run: sudo xcode-select -s "/Applications/Xcode_${{ matrix.version }}.app"

- name: Checkout
uses: actions/checkout@v4
Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ on:
release:
types: [published]

env:
SWIFT_VERSION: "6.1.0"

jobs:
build:
name: Build for ${{ matrix.destination.name }}
Expand All @@ -22,9 +19,9 @@ jobs:
- if: startsWith(matrix.destination.name, 'ubuntu')
uses: vapor/swiftly-action@v0.2
with:
toolchain: ${{ env.SWIFT_VERSION }}
toolchain: "6.2"
- if: startsWith(matrix.destination.name, 'macos')
run: sudo xcode-select -s /Applications/Xcode_16.3.app
run: sudo xcode-select -s /Applications/Xcode_26.1.app

- uses: actions/checkout@v4
- name: Create the binary
Expand All @@ -47,9 +44,9 @@ jobs:
- { name: "ubuntu-x86_64", os: ubuntu-22.04 }
- { name: "ubuntu-aarch64", os: ubuntu-24.04-arm }
- { name: "ubuntu-aarch64", os: ubuntu-22.04-arm }
- { name: "macos-universal", os: macos-26 }
- { name: "macos-universal", os: macos-15 }
- { name: "macos-universal", os: macos-14 }
- { name: "macos-universal", os: macos-13 }
steps:
- uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -77,7 +74,7 @@ jobs:
with:
name: mockolo.artifactbundle.zip
path: mockolo.artifactbundle.zip

- name: Compute checksum
id: checksum
run: echo "checksum=$(swift package compute-checksum mockolo.artifactbundle.zip)" >> "$GITHUB_OUTPUT"
Expand Down
4 changes: 3 additions & 1 deletion install-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ echo "OUTPUT FILE = ${OUTFILE}"
cd "$SRCDIR"
rm -rf .build
case $(uname -s) in
Linux*) swift build -c release
Linux*) swift build -c release \
-Xlinker -rpath -Xlinker /usr/lib/swift/linux \
-Xlinker -rpath -Xlinker /usr/share/swift/usr/lib/swift/linux
Comment on lines +68 to +70
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Binaries built with Swiftly set the rpath to Swiftly's toolchain, this has portability issues. So I using a standard rpath instead:

  • /usr/lib/swift/linux
    The standard path used for Linux builds
  • /usr/share/swift/usr/lib/swift/linux
    The path used by GitHub Actions

cd .build/release;;
Darwin*) swift build -c release --arch arm64 --arch x86_64
cd .build/apple/Products/Release;;
Expand Down