Skip to content

Commit

Permalink
Update min Swift version to 5.6 and make platform versions consistent (
Browse files Browse the repository at this point in the history
…#93)

* Update minimum Swift version to 5.6 and make platform versions consistent.
  • Loading branch information
gwynne authored Apr 14, 2023
1 parent 5180069 commit fee3f5f
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 10 deletions.
41 changes: 34 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,30 @@ env:
MYSQL_HOSTNAME_B: 'mysql-b'

jobs:
api-breakage:
if: ${{ !(github.event.pull_request.draft || false) }}
runs-on: ubuntu-latest
container: swift:5.8-jammy
steps:
- name: Check out code
uses: actions/checkout@v3
with: { 'fetch-depth': 0 }
- name: Run API breakage check action
uses: vapor/ci/.github/actions/ci-swift-check-api-breakage@reusable-workflows

imports-check:
if: ${{ !(github.event.pull_request.draft || false) }}
runs-on: ubuntu-latest
container: swift:5.8-jammy
steps:
- name: Check out code
uses: actions/checkout@v3
with: { 'fetch-depth': 0 }
- name: Build with re-export disabled
run: swift build -Xswiftc -DBUILDING_DOCC

linux-all:
if: github.event.pull_request.draft == false
if: ${{ github.event.pull_request.draft == false }}
strategy:
fail-fast: false
matrix:
Expand All @@ -33,10 +55,10 @@ jobs:
- mariadb:10.11
- percona:8.0
swiftver:
- swift:5.5-bionic
- swift:5.6-focal
- swift:5.7-jammy
- swiftlang/swift:nightly-5.8-jammy
- swift:5.8-jammy
- swiftlang/swift:nightly-5.9-jammy
- swiftlang/swift:nightly-main-jammy
container: ${{ matrix.swiftver }}
runs-on: ubuntu-latest
Expand All @@ -59,8 +81,15 @@ jobs:
- name: Check out package
uses: actions/checkout@v3
with: { path: 'mysql-nio' }
- name: Run tests
run: swift test --package-path mysql-nio
- name: Run unit tests
run: swift test --package-path mysql-nio --enable-code-coverage --sanitize=thread
- name: Upload code coverage
if: ${{ !contains(matrix.swiftver, '5.8') }}
uses: vapor/swift-codecov-action@v0.2
with: {
package_path: 'mysql-nio', cc_flags: 'unittests', cc_verbose: true,
cc_env_vars: 'SWIFT_VERSION,SWIFT_PLATFORM,RUNNER_OS,RUNNER_ARCH,MYSQL_VERSION'
}
- name: Check out mysql-kit dependent
uses: actions/checkout@v3
with: { repository: 'vapor/mysql-kit', path: 'mysql-kit' }
Expand All @@ -87,9 +116,7 @@ jobs:
- percona-server
xcode:
- latest-stable
- latest
macos:
- macos-11
- macos-12
include:
- username: root
Expand Down
6 changes: 3 additions & 3 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// swift-tools-version:5.2
// swift-tools-version:5.6
import PackageDescription

let package = Package(
name: "mysql-nio",
platforms: [
.macOS(.v10_15),
.iOS(.v13),
.tvOS(.v13),
.watchOS(.v6),
.macOS(.v10_15)
.tvOS(.v13),
],
products: [
.library(name: "MySQLNIO", targets: ["MySQLNIO"]),
Expand Down

0 comments on commit fee3f5f

Please # to comment.