Skip to content

Commit

Permalink
Merge branch 'develop' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
helje5 committed Jan 28, 2021
2 parents 30233f6 + 585d24d commit 48f667b
Show file tree
Hide file tree
Showing 11 changed files with 190 additions and 114 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build and Test

on:
push:
pull_request:
schedule:
- cron: "50 8 * * 1"

jobs:
linux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
image:
- swift:5.3.2-xenial
- swift:5.3.2-bionic
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
- name: Build Swift Debug Package
run: swift build -c debug
- name: Build Swift Release Package
run: swift build -c release
nextstep:
runs-on: macos-latest
steps:
- name: Select latest available Xcode
uses: maxim-lobanov/[email protected]
with:
xcode-version: 12.2
- name: Checkout Repository
uses: actions/checkout@v2
- name: Build Swift Debug Package
run: swift build -c debug
- name: Build Swift Release Package
run: swift build -c release
7 changes: 7 additions & 0 deletions .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions .travis.d/before-install.sh

This file was deleted.

35 changes: 0 additions & 35 deletions .travis.d/install.sh

This file was deleted.

31 changes: 0 additions & 31 deletions .travis.yml

This file was deleted.

69 changes: 69 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Makefile

# local config
SWIFT_BUILD=swift build
SWIFT_CLEAN=swift package clean
SWIFT_BUILD_DIR=.build
SWIFT_TEST=swift test
CONFIGURATION=debug
DOCKER=/usr/local/bin/docker
#DOCKER=docker

# docker config
SWIFT_BUILD_IMAGE="swift:5.3.1"
DOCKER_BUILD_DIR=".docker$(SWIFT_BUILD_DIR)"
SWIFT_DOCKER_BUILD_DIR="$(DOCKER_BUILD_DIR)/x86_64-unknown-linux/$(CONFIGURATION)"
DOCKER_BUILD_PRODUCT="$(DOCKER_BUILD_DIR)/$(TOOL_NAME)"


SWIFT_SOURCES=\
Sources/*/*/*.swift \
Sources/*/*/*/*.swift

all: all-native

#all: docker-all

all-native:
$(SWIFT_BUILD) -c $(CONFIGURATION)

# Cannot test in `release` configuration?!
test:
$(SWIFT_TEST)

clean :
$(SWIFT_CLEAN)
# We have a different definition of "clean", might be just German
# pickyness.
rm -rf $(SWIFT_BUILD_DIR)

$(DOCKER_BUILD_PRODUCT): $(SWIFT_SOURCES)
$(DOCKER) run --rm \
-v "$(PWD):/src" \
-v "$(PWD)/$(DOCKER_BUILD_DIR):/src/.build" \
"$(SWIFT_BUILD_IMAGE)" \
bash -c 'cd /src && swift build -c $(CONFIGURATION)'

docker-all: $(DOCKER_BUILD_PRODUCT)

docker-test: docker-all
$(DOCKER) run --rm \
-v "$(PWD):/src" \
-v "$(PWD)/$(DOCKER_BUILD_DIR):/src/.build" \
"$(SWIFT_BUILD_IMAGE)" \
bash -c 'cd /src && swift test -c $(CONFIGURATION)'

docker-clean:
rm $(DOCKER_BUILD_PRODUCT)

docker-distclean:
rm -rf $(DOCKER_BUILD_DIR)

distclean: clean docker-distclean

docker-emacs:
$(DOCKER) run --rm -it \
-v "$(PWD):/src" \
-v "$(PWD)/$(DOCKER_BUILD_DIR):/src/.build" \
"$(SWIFT_BUILD_IMAGE)" \
emacs /src
14 changes: 13 additions & 1 deletion ZeeQL3PG.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
E80CE01F1EA1811E00347D7B /* libZeeQL.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = E80CE01E1EA1811E00347D7B /* libZeeQL.dylib */; };
E80CE0221EA1871900347D7B /* PostgreSQLModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E80CE0211EA1871900347D7B /* PostgreSQLModelTests.swift */; };
E80CE0241EA1897400347D7B /* PostgreSQLModelFetch.swift in Sources */ = {isa = PBXBuildFile; fileRef = E80CE0231EA1897400347D7B /* PostgreSQLModelFetch.swift */; };
E85E927025C31FE1006CEB40 /* libpq.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E85E926F25C31FE1006CEB40 /* libpq.a */; };
E870FC391E9BA1E800A038AF /* PostgreSQLAdaptor.swift in Sources */ = {isa = PBXBuildFile; fileRef = E870FC361E9BA1E800A038AF /* PostgreSQLAdaptor.swift */; };
E870FC3A1E9BA1E800A038AF /* PostgreSQLAdaptorChannel.swift in Sources */ = {isa = PBXBuildFile; fileRef = E870FC371E9BA1E800A038AF /* PostgreSQLAdaptorChannel.swift */; };
E870FC3B1E9BA1E800A038AF /* PostgreSQLExpression.swift in Sources */ = {isa = PBXBuildFile; fileRef = E870FC381E9BA1E800A038AF /* PostgreSQLExpression.swift */; };
Expand Down Expand Up @@ -41,6 +42,7 @@
E80CE0201EA181F000347D7B /* SwiftShared.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = SwiftShared.xcconfig; path = xcconfig/SwiftShared.xcconfig; sourceTree = "<group>"; };
E80CE0211EA1871900347D7B /* PostgreSQLModelTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PostgreSQLModelTests.swift; sourceTree = "<group>"; };
E80CE0231EA1897400347D7B /* PostgreSQLModelFetch.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = PostgreSQLModelFetch.swift; path = PostgreSQLAdaptor/PostgreSQLModelFetch.swift; sourceTree = "<group>"; };
E85E926F25C31FE1006CEB40 /* libpq.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libpq.a; path = ../../../../../../usr/local/Cellar/libpq/13.1/lib/libpq.a; sourceTree = "<group>"; };
E870FC361E9BA1E800A038AF /* PostgreSQLAdaptor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = PostgreSQLAdaptor.swift; path = PostgreSQLAdaptor/PostgreSQLAdaptor.swift; sourceTree = "<group>"; };
E870FC371E9BA1E800A038AF /* PostgreSQLAdaptorChannel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = PostgreSQLAdaptorChannel.swift; path = PostgreSQLAdaptor/PostgreSQLAdaptorChannel.swift; sourceTree = "<group>"; };
E870FC381E9BA1E800A038AF /* PostgreSQLExpression.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = PostgreSQLExpression.swift; path = PostgreSQLAdaptor/PostgreSQLExpression.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -76,6 +78,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
E85E927025C31FE1006CEB40 /* libpq.a in Frameworks */,
E8D95FC91E91A7AD0072FF09 /* libZeeQL.dylib in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -179,6 +182,7 @@
E8D95FC71E91A7AD0072FF09 /* Frameworks */ = {
isa = PBXGroup;
children = (
E85E926F25C31FE1006CEB40 /* libpq.a */,
E80CE01E1EA1811E00347D7B /* libZeeQL.dylib */,
E8D95FC81E91A7AD0072FF09 /* libZeeQL.dylib */,
);
Expand Down Expand Up @@ -240,7 +244,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0820;
LastUpgradeCheck = 1100;
LastUpgradeCheck = 1240;
ORGANIZATIONNAME = "ZeeZide GmbH";
TargetAttributes = {
E8DDEE261E5FA12C00EC1DD8 = {
Expand Down Expand Up @@ -402,6 +406,10 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
EXECUTABLE_PREFIX = lib;
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
/usr/local/opt/libpq/lib,
);
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
Expand All @@ -414,6 +422,10 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
EXECUTABLE_PREFIX = lib;
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
/usr/local/opt/libpq/lib,
);
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1100"
LastUpgradeVersion = "1240"
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 = "1100"
LastUpgradeVersion = "1240"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -15,7 +15,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "E8D279521E5504FA00453BBE"
BuildableName = "libZeeQL.dylib"
BuildableName = "libZeeQL.a"
BlueprintName = "ZeeQL"
ReferencedContainer = "container:../ZeeQL3/ZeeQL3.xcodeproj">
</BuildableReference>
Expand Down
Loading

0 comments on commit 48f667b

Please sign in to comment.