Skip to content

Commit

Permalink
Update min Swift version and platforms requirements (#57)
Browse files Browse the repository at this point in the history
* Update minimum Swift version to 5.6 and make platform versions consistent.

* CI and exports cleanup
  • Loading branch information
gwynne authored May 6, 2023
1 parent 1df1ead commit 6129661
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 43 deletions.
28 changes: 4 additions & 24 deletions .github/workflows/projectboard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,7 @@ on:
types: [reopened, closed, labeled, unlabeled, assigned, unassigned]

jobs:
setup_matrix_input:
runs-on: ubuntu-latest

steps:
- id: set-matrix
run: |
output=$(curl ${{ github.event.issue.url }}/labels | jq '.[] | .name') || output=""
echo '======================'
echo 'Process incoming data'
echo '======================'
json=$(echo $output | sed 's/"\s"/","/g')
echo $json
echo "::set-output name=matrix::$(echo $json)"
outputs:
issueTags: ${{ steps.set-matrix.outputs.matrix }}

Manage_project_issues:
needs: setup_matrix_input
uses: vapor/ci/.github/workflows/issues-to-project-board.yml@main
with:
labelsJson: ${{ needs.setup_matrix_input.outputs.issueTags }}
secrets:
PROJECT_BOARD_AUTOMATION_PAT: "${{ secrets.PROJECT_BOARD_AUTOMATION_PAT }}"
update_project_boards:
name: Update project boards
uses: vapor/ci/.github/workflows/update-project-boards-for-issue.yml@reusable-workflows
secrets: inherit
18 changes: 4 additions & 14 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
api-breakage:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
container: swift:5.7-jammy
container: swift:5.8-jammy
steps:
- name: Check out package
uses: actions/checkout@v3
Expand All @@ -68,9 +68,10 @@ jobs:
dbimage:
- mongo:6
runner:
- swift:5.5-bionic
- swift:5.6-focal
- swift:5.7-jammy
- swift:5.8-jammy
- swiftlang/swift:nightly-5.9-jammy
- swiftlang/swift:nightly-main-jammy
container: ${{ matrix.runner }}
runs-on: ubuntu-latest
Expand All @@ -91,7 +92,7 @@ jobs:
fail-fast: false
matrix:
dbimage: ['mongodb-community']
macos: ['macos-11', 'macos-12']
macos: ['macos-12']
xcode: ['latest-stable']
runs-on: ${{ matrix.macos }}
env:
Expand All @@ -114,14 +115,3 @@ jobs:
uses: actions/checkout@v3
- name: Run all tests
run: swift test --sanitize=thread

test-exports:
name: Test exports
runs-on: ubuntu-latest
steps:
- name: Check out Vapor
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Build
run: swift build -Xswiftc -DBUILDING_DOCC
8 changes: 5 additions & 3 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
// swift-tools-version:5.5
// swift-tools-version:5.6
import PackageDescription

let package = Package(
name: "fluent-mongo-driver",
platforms: [
.macOS(.v10_15)
.macOS(.v10_15),
.iOS(.v13),
.watchOS(.v6),
.tvOS(.v13),
],
products: [
.library(name: "FluentMongoDriver", targets: ["FluentMongoDriver"]),
],
dependencies: [
.package(url: "https://github.com/vapor/fluent-kit.git", from: "1.37.0"),
.package(url: "https://github.com/OpenKitten/MongoKitten.git", from: "6.6.4"),
.package(url: "https://github.com/OpenKitten/BSON.git", from: "7.0.30"),
],
targets: [
.target(
Expand Down
11 changes: 9 additions & 2 deletions Sources/FluentMongoDriver/Exports.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
#if !BUILDING_DOCC
#if swift(>=5.8)

@_documentation(visibility: internal) @_exported import struct BSON.ObjectId
@_documentation(visibility: internal) @_exported import struct MongoKitten.GridFSFile
@_documentation(visibility: internal) @_exported import struct BSON.Document
@_documentation(visibility: internal) @_exported import protocol BSON.Primitive

#else

@_exported import struct BSON.ObjectId
@_exported import struct MongoKitten.GridFSFile
@_exported import struct BSON.Document
@_exported import protocol BSON.Primitive

#endif
#endif

0 comments on commit 6129661

Please sign in to comment.