Skip to content

Commit

Permalink
Add Swift 5.4 support
Browse files Browse the repository at this point in the history
  • Loading branch information
ffried committed Apr 27, 2021
1 parent 3a84966 commit 877967e
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 28 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Expand Up @@ -10,7 +10,9 @@ jobs:
publish-docs:
runs-on: macos-latest
steps:
- run: sudo xcode-select -s /Applications/Xcode_12.2.app/Contents/Developer
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ^12.4
- uses: dawidd6/action-get-tag@v1
id: get-tag
- uses: actions/checkout@v2
Expand Down
30 changes: 9 additions & 21 deletions .github/workflows/swift-test.yml
Expand Up @@ -7,37 +7,23 @@ on:
branches: [ master ]

jobs:
validate-linux-tests:
runs-on: macos-latest
steps:
- run: sudo xcode-select -s /Applications/Xcode_12.2.app/Contents/Developer
- uses: actions/checkout@v2
- uses: actions/cache@v2.1.5
with:
path: .build
key: ${{runner.os}}-${{github.repository}}-spm-${{hashFiles('**/Package.resolved')}}
restore-keys: |
${{runner.os}}-${{github.repository}}-spm-
- name: Generate Linux Tests
run: swift test --generate-linuxmain
- name: Check for git differences
run: git diff --exit-code

test-spm:
strategy:
matrix:
os: [macos-latest, ubuntu-18.04, ubuntu-20.04]
os: [ macos-latest, ubuntu-18.04, ubuntu-20.04 ]

runs-on: ${{matrix.os}}

steps:
- run: sudo xcode-select -s /Applications/Xcode_12.2.app/Contents/Developer
if: runner.os == 'macOS'
- if: runner.os == 'macOS'
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ^12.4
- name: Install Swift
if: runner.os == 'Linux'
uses: sersoft-gmbh/SwiftyActions@v1
with:
release-version: 5.3.1
release-version: 5.4
platform: ${{matrix.os}}
- uses: actions/checkout@v2
- uses: actions/cache@v2.1.5
Expand Down Expand Up @@ -79,7 +65,9 @@ jobs:
# parallel-testing-enabled: false
# enable-code-coverage: false
steps:
- run: sudo xcode-select -s /Applications/Xcode_12.2.app/Contents/Developer
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ^12.4
- uses: actions/checkout@v2
- uses: sersoft-gmbh/xcodebuild-action@v1
with:
Expand Down
8 changes: 4 additions & 4 deletions Package.resolved
Expand Up @@ -6,17 +6,17 @@
"repositoryURL": "https://github.com/apple/swift-algorithms",
"state": {
"branch": null,
"revision": "bb3bafeca0e164ece3403a9de646b7d38c07dd49",
"version": "0.0.2"
"revision": "04d91803a2dd58c14db9cf66c7412c6dd4a26fc8",
"version": "0.1.1"
}
},
{
"package": "swift-numerics",
"repositoryURL": "https://github.com/apple/swift-numerics",
"state": {
"branch": null,
"revision": "6b24333510e9044cf4716a07bed65eeed6bc6393",
"version": "0.0.8"
"revision": "6583ac70c326c3ee080c1d42d9ca3361dca816cd",
"version": "0.1.0"
}
}
]
Expand Down
4 changes: 2 additions & 2 deletions Package.swift
@@ -1,4 +1,4 @@
// swift-tools-version:5.3
// swift-tools-version:5.4
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription
Expand All @@ -15,7 +15,7 @@ let package = Package(
targets: ["PathWrangler"]),
],
dependencies: [
.package(url: "https://github.com/apple/swift-algorithms", .upToNextMinor(from: "0.0.1")),
.package(url: "https://github.com/apple/swift-algorithms", .upToNextMinor(from: "0.1.0")),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
Expand Down
40 changes: 40 additions & 0 deletions Package@swift-5.3.swift
@@ -0,0 +1,40 @@
// swift-tools-version:5.3
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "path-wrangler",
products: [
// Products define the executables and libraries produced by a package, and make them visible to other packages.
.library(
name: "CorePathWrangler",
targets: ["CorePathWrangler"]),
.library(
name: "PathWrangler",
targets: ["PathWrangler"]),
],
dependencies: [
.package(url: "https://github.com/apple/swift-algorithms", .upToNextMinor(from: "0.0.1")),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target(name: "CPathWrangler"),
.target(
name: "CorePathWrangler",
dependencies: [
.product(name: "Algorithms", package: "swift-algorithms"),
"CPathWrangler",
]),
.target(
name: "PathWrangler",
dependencies: ["CorePathWrangler"]),
.testTarget(
name: "CorePathWranglerTests",
dependencies: ["CorePathWrangler"]),
.testTarget(
name: "PathWranglerTests",
dependencies: ["PathWrangler"]),
]
)

0 comments on commit 877967e

Please sign in to comment.