Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
helje5 committed Sep 19, 2024
2 parents 48f667b + 9a04b62 commit f821b84
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 28 deletions.
19 changes: 13 additions & 6 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,17 @@ jobs:
fail-fast: false
matrix:
image:
- swift:5.3.2-xenial
- swift:5.3.2-bionic
- swift:5.9.2-focal
- swift:5.10-jammy
- swift:6.0-noble
container: ${{ matrix.image }}
steps:
- name: Install SQLite & PG Dev
run: |
apt-get update
apt-get -y install libsqlite3-dev libpq-dev
- name: Checkout Repository
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Build Swift Debug Package
run: swift build -c debug
- name: Build Swift Release Package
Expand All @@ -31,11 +32,17 @@ jobs:
runs-on: macos-latest
steps:
- name: Select latest available Xcode
uses: maxim-lobanov/setup-xcode@v1.2.1
uses: maxim-lobanov/setup-xcode@v1.5.1
with:
xcode-version: 12.2
xcode-version: latest
- name: Update Homebrew
run: brew update
- name: Install PQ
run: brew install libpq
- name: Link PQ
run: brew link --force libpq
- name: Checkout Repository
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Build Swift Debug Package
run: swift build -c debug
- name: Build Swift Release Package
Expand Down
4 changes: 2 additions & 2 deletions CLibPQ/brew/module.private.modulemap
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
//
// Copyright (C) 2017 ZeeZide GmbH, All Rights Reserved
// Copyright (C) 2017-2024 ZeeZide GmbH, All Rights Reserved
// Created by Helge Hess on 2017-04-02.
//

module CLibPQ [system] {
//header "/usr/local/opt/postgresql/include/libpq-fe.h"
header "/usr/local/opt/libpq/include/libpq-fe.h"
header "/opt/homebrew/include/libpq-fe.h"
export *
link "pq"
}
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ let package = Package(
.library(name: "PostgreSQLAdaptor", targets: [ "PostgreSQLAdaptor" ])
],
dependencies: [
.package(url: "https://github.com/ZeeQL/CLibPQ.git", from: "2.0.1"),
.package(url: "https://github.com/ZeeQL/ZeeQL3.git", from: "0.8.0")
.package(url: "https://github.com/ZeeQL/CLibPQ.git", from: "2.0.4"),
.package(url: "https://github.com/ZeeQL/ZeeQL3.git", from: "0.9.6")
],
targets: [
.target(name: "PostgreSQLAdaptor", dependencies: [ "CLibPQ", "ZeeQL" ])
Expand Down
7 changes: 7 additions & 0 deletions Sources/PostgreSQLAdaptor/PostgreSQLAdaptorChannel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
// Copyright © 2017 ZeeZide GmbH. All rights reserved.
//

#if os(Windows)
import WinSDK
#elseif os(Linux)
import Glibc
#else
import Darwin
#endif
import struct Foundation.Data
import ZeeQL
import CLibPQ
Expand Down
6 changes: 0 additions & 6 deletions ZeeQL3PG.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,6 @@
"DEBUG=1",
"$(inherited)",
);
MACOSX_DEPLOYMENT_TARGET = 10.11;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
REEXPORTED_LIBRARY_PATHS = "";
Expand All @@ -364,7 +363,6 @@
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
MACOSX_DEPLOYMENT_TARGET = 10.11;
MTL_ENABLE_DEBUG_INFO = NO;
REEXPORTED_LIBRARY_PATHS = "";
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
Expand All @@ -375,10 +373,8 @@
isa = XCBuildConfiguration;
baseConfigurationReference = E80CE0201EA181F000347D7B /* SwiftShared.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = Tests/PostgreSQLAdaptorTests/Info.plist;
MACOSX_DEPLOYMENT_TARGET = 10.12;
PRODUCT_BUNDLE_IDENTIFIER = de.zeezide.zeeql.APRAdaptorTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
Expand All @@ -389,10 +385,8 @@
isa = XCBuildConfiguration;
baseConfigurationReference = E80CE0201EA181F000347D7B /* SwiftShared.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = Tests/PostgreSQLAdaptorTests/Info.plist;
MACOSX_DEPLOYMENT_TARGET = 10.12;
PRODUCT_BUNDLE_IDENTIFIER = de.zeezide.zeeql.APRAdaptorTests;
PRODUCT_NAME = "$(TARGET_NAME)";
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1240"
LastUpgradeVersion = "1600"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1240"
LastUpgradeVersion = "1600"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
18 changes: 10 additions & 8 deletions xcconfig/Base.xcconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright (C) 2017-2021 ZeeZide GmbH, All Rights Reserved
// Copyright (C) 2017-2024 ZeeZide GmbH, All Rights Reserved
// Created by Helge Hess on 23/01/2017.
//

Expand Down Expand Up @@ -58,21 +58,23 @@ CLANG_ANALYZER_NONNULL = YES
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES

// Swift Optimization
SWIFT_OPTIMIZATION_LEVEL_Release = -Owholemodule
SWIFT_OPTIMIZATION_LEVEL_Debug = -Onone
SWIFT_OPTIMIZATION_LEVEL = $(SWIFT_OPTIMIZATION_LEVEL_$(CONFIGURATION))
SWIFT_OPTIMIZATION_LEVEL[config=Debug] = -O
SWIFT_OPTIMIZATION_LEVEL[config=Release] = -Owholemodule

SWIFT_VERSION = 5.0
// SWIFT_VERSION = 4.2
// SWIFT_VERSION = 4.0
// SWIFT_VERSION = 3.0


// Deployment Targets
MACOSX_DEPLOYMENT_TARGET = 10.11
MACOSX_DEPLOYMENT_TARGET = 10.13
IPHONEOS_DEPLOYMENT_TARGET = 10.2
WATCHOS_DEPLOYMENT_TARGET = 6.0
TVOS_DEPLOYMENT_TARGET = 13.0

// 2019-08-07: why?
//SDKROOT = macosx

// Xcode 16
DEAD_CODE_STRIPPING = YES
ENABLE_MODULE_VERIFIER = YES
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu99 gnu++14"
ENABLE_USER_SCRIPT_SANDBOXING = YES
4 changes: 2 additions & 2 deletions xcconfig/SwiftShared.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// ZeeQL3
//
// Created by Helge Hess on 05/04/17.
// Copyright © 2017 ZeeZide GmbH. All rights reserved.
// Copyright © 2017-2024 ZeeZide GmbH. All rights reserved.
//

LIBRARY_SEARCH_PATHS = $(inherited) $(TOOLCHAIN_DIR)/usr/lib/swift/macosx
LIBRARY_SEARCH_PATHS = $(inherited) $(TOOLCHAIN_DIR)/usr/lib/swift/macosx /opt/homebrew/lib
LD_RUNPATH_SEARCH_PATHS = $(inherited) $(TOOLCHAIN_DIR)/usr/lib/swift/macosx

0 comments on commit f821b84

Please sign in to comment.