Skip to content

Commit 7f2a0b1

Browse files
authored
Drop support for Swift 5.4 (#82)
* Drop support for Swift 5.4 * Bump CI same as SQLiteNIO/Kit
1 parent 9439661 commit 7f2a0b1

File tree

2 files changed

+72
-25
lines changed

2 files changed

+72
-25
lines changed

.github/workflows/test.yml

Lines changed: 71 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,96 @@
11
name: test
22
on:
3-
pull_request:
4-
push:
5-
branches:
6-
- main
3+
pull_request: { branches: ['*'] }
4+
push: { branches: [ main ] }
5+
76
env:
87
LOG_LEVEL: debug
98
SWIFT_DETERMINISTIC_HASHING: 1
109

1110
jobs:
12-
linux-all:
11+
12+
codecov:
13+
runs-on: ubuntu-latest
14+
container: swift:5.7-jammy
15+
steps:
16+
# N.B.: When we switch to embedded SQLite, these first two steps should be removed,
17+
# and the version saved to the environment should come from the checked-out package.
18+
- name: Install libsqlite3 dependency
19+
run: apt-get -q update && apt-get -q install -y libsqlite3-dev
20+
- name: Save SQLite version to env
21+
run: |
22+
echo SQLITE_VERSION="$(pkg-config --modversion sqlite3)" >> $GITHUB_ENV
23+
- name: Check out package
24+
uses: actions/checkout@v3
25+
- name: Run local tests with coverage
26+
run: swift test --enable-code-coverage
27+
- name: Submit coverage report to Codecov.io
28+
uses: vapor/swift-codecov-action@v0.2
29+
with:
30+
cc_flags: 'unittests'
31+
cc_env_vars: 'SWIFT_VERSION,SWIFT_PLATFORM,RUNNER_OS,RUNNER_ARCH,SQLITE_VERSION'
32+
cc_fail_ci_if_error: true
33+
cc_verbose: true
34+
cc_dry_run: false
35+
36+
# Check for API breakage versus main
37+
api-breakage:
38+
if: github.event_name == 'pull_request'
39+
runs-on: ubuntu-latest
40+
container: swift:5.7-jammy
41+
steps:
42+
- name: Install libsqlite3 dependency
43+
run: apt-get -q update && apt-get -q install -y libsqlite3-dev
44+
- name: Check out package
45+
uses: actions/checkout@v3
46+
with:
47+
fetch-depth: 0
48+
# https://github.com/actions/checkout/issues/766
49+
- name: Mark the workspace as safe
50+
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
51+
- name: Check for API breaking changes
52+
run: swift package diagnose-api-breaking-changes origin/main
53+
54+
# Run unit tests (Linux)
55+
linux-unit:
56+
if: github.event_name == 'pull_request'
1357
strategy:
1458
fail-fast: false
1559
matrix:
16-
swiftver:
17-
- swift:5.4
18-
- swift:5.5
19-
- swift:5.6
20-
- swiftlang/swift:nightly-main
21-
swiftos:
22-
- focal
23-
container: ${{ format('{0}-{1}', matrix.swiftver, matrix.swiftos) }}
60+
runner:
61+
- swift:5.5-bionic
62+
- swift:5.6-focal
63+
- swift:5.7-jammy
64+
- swiftlang/swift:nightly-main-jammy
65+
container: ${{ matrix.runner }}
2466
runs-on: ubuntu-latest
2567
steps:
26-
- name: Install SQLite dependency
68+
- name: Install libsqlite3 dependency
2769
run: apt-get -q update && apt-get -q install -y libsqlite3-dev
28-
- name: Check out package
70+
- name: Check out code
2971
uses: actions/checkout@v3
30-
- name: Run tests
31-
run: swift test
32-
33-
macos-all:
72+
- name: Run tests with Thread Sanitizer
73+
run: swift test --sanitize=thread
74+
75+
76+
# Run unit tests (macOS).
77+
macos-unit:
78+
if: github.event_name == 'pull_request'
3479
strategy:
3580
fail-fast: false
3681
matrix:
37-
macos: ['macos-11', 'macos-12']
38-
xcode: ['latest-stable', 'latest']
39-
exclude: [{ macos: 'macos-11', xcode: 'latest' }]
82+
macos:
83+
- macos-11
84+
- macos-12
85+
xcode:
86+
- latest-stable
4087
runs-on: ${{ matrix.macos }}
4188
steps:
4289
- name: Select latest available Xcode
4390
uses: maxim-lobanov/setup-xcode@v1
4491
with:
4592
xcode-version: ${{ matrix.xcode }}
46-
- name: Check out package
93+
- name: Check out code
4794
uses: actions/checkout@v3
4895
- name: Run tests with Thread Sanitizer
49-
run: swift test
96+
run: swift test --sanitize=thread

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:5.4
1+
// swift-tools-version:5.5
22
import PackageDescription
33

44
let package = Package(

0 commit comments

Comments
 (0)