Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revamp CMake support #1118

Draft
wants to merge 79 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
0d85e89
First draft of new cmake
Krzmbrzl Jan 3, 2024
9e7c5db
Fix typo
Krzmbrzl Jan 3, 2024
579a099
Delete FindSoci.cmake - will be replaced by SociConfig
Krzmbrzl Jan 3, 2024
c2dcce7
Updated find modules to define interface targets
Krzmbrzl Jan 3, 2024
4a378ed
Remove redundant condition in endif()
Krzmbrzl Jan 3, 2024
926bfbb
SOCI_HAVE_CXX11 doesn't exist anymore
Krzmbrzl Jan 3, 2024
1ccc218
Configure soci-config.h (empty for now)
Krzmbrzl Jan 3, 2024
ec64b18
Disable Boost support by default
Krzmbrzl Jan 3, 2024
1489077
Oracle: Remove non-existing CPP source
Krzmbrzl Jan 3, 2024
074bdf2
Improved target setup
Krzmbrzl Feb 16, 2024
456a8cc
Include building tests
Krzmbrzl Feb 17, 2024
bb86d44
Add options to configure test connection strings
Krzmbrzl Feb 17, 2024
0e5c799
CI: ODBC now also uses the default runner
Krzmbrzl Feb 17, 2024
f49841c
Bring ODBC tests up to speed
Krzmbrzl Feb 17, 2024
b593a29
Expose ODBC test connector strings
Krzmbrzl Feb 17, 2024
672213c
Use dedicated test context
Krzmbrzl Feb 17, 2024
207e17e
Adapt ODBC test exclusion RegEx
Krzmbrzl Feb 17, 2024
dd5e3dd
Build shared and static libs separately
Krzmbrzl Feb 25, 2024
cd401e4
Add missing include
Krzmbrzl Feb 25, 2024
1564540
Fixed Windows build
Krzmbrzl Feb 25, 2024
342bcb4
Don't overwrite cxx standard
Krzmbrzl Feb 25, 2024
646f2fe
Enable unity builds on CI
Krzmbrzl Feb 25, 2024
921ca59
Specify config for ctest on Windows
Krzmbrzl Feb 25, 2024
1353f18
Fix DSN file paths for ODBC tests
Krzmbrzl Feb 25, 2024
eaf2994
Select ODBC tests based on available drivers
Krzmbrzl Feb 25, 2024
3540780
Use unity builds also on Windows CI
Krzmbrzl Feb 25, 2024
980d4c9
Also skip MS Access ODBC test
Krzmbrzl Feb 25, 2024
5214951
Fix print statement
Krzmbrzl Feb 25, 2024
501be49
Fix driver detection
Krzmbrzl Feb 25, 2024
e96633a
Properly generate soci-config.h
Krzmbrzl Feb 27, 2024
ec3984e
Install recent cmake version on AppVeyor CI
Krzmbrzl Feb 27, 2024
f5ab470
Remove unneeded debug message
Krzmbrzl Feb 29, 2024
241af7d
Configure compiler options
Krzmbrzl Feb 29, 2024
5f65bb5
Update CMake examples
Krzmbrzl Feb 29, 2024
5150a51
Get rid of deprecated Makefiles
Krzmbrzl Feb 29, 2024
acd1294
Build Boost bindings by default on CI
Krzmbrzl Feb 29, 2024
aea1958
Provide compat for old WITH_BOOST var
Krzmbrzl Feb 29, 2024
47c05f3
Add compat to old target names
Krzmbrzl Feb 29, 2024
e2c1a53
Disable Boost bindings on macOS CI
Krzmbrzl Feb 29, 2024
a868715
Properly set ABI version macro
Krzmbrzl Feb 29, 2024
9defe9b
Start setting up install support
Krzmbrzl Mar 1, 2024
35f0f92
More work on installation support
Krzmbrzl Apr 13, 2024
b7d56a0
Make all components installable
Krzmbrzl Apr 23, 2024
baecbb2
Improve config file
Krzmbrzl Apr 23, 2024
eba5926
Remove WITH_BOOST/SOCI_BOOST option
Krzmbrzl Apr 23, 2024
fa97a69
Properly set ABI version & runtime search paths
Krzmbrzl Apr 23, 2024
f9b1805
Move template specialization to cpp file
Krzmbrzl Apr 25, 2024
f4af355
Fix using macro as function
Krzmbrzl Apr 25, 2024
e255daa
CI: Don't use no longer existent WITH_BOOST option
Krzmbrzl Apr 25, 2024
9e123c6
Fix LTO in debug builds
Krzmbrzl Apr 25, 2024
8bceabe
Fix macro name
Krzmbrzl May 1, 2024
d611b7d
AppVeyor: Use actually available Boost versions
Krzmbrzl May 1, 2024
1efdcce
AppVeyor: Use more up-to-date PostgreSQL
Krzmbrzl May 1, 2024
b111ec1
AppVeyor: Properly locate SQLite
Krzmbrzl May 1, 2024
7bcdd9a
Ensure MySQL is found in vcpkg context
Krzmbrzl May 19, 2024
24feb96
Disable Boost autolinking on Windows
Krzmbrzl May 20, 2024
1098208
AppVeyor: Use Ninja for faster builds
Krzmbrzl May 20, 2024
2de4a69
Mark dependency's includes as SYSTEM
Krzmbrzl May 20, 2024
f38e222
Restrict to only using target-specific compiler flags
Krzmbrzl May 20, 2024
81cd483
Base macro defs on platform not compiler
Krzmbrzl May 20, 2024
d5f70a1
Tame the Windows API headers
Krzmbrzl May 20, 2024
7071264
AppVeyor: Use MSVC instead of Clang
Krzmbrzl May 20, 2024
c4895b3
remove unnecessary winsock include
Krzmbrzl May 24, 2024
9231cd0
Fix Windows build with UNICODE macro
Krzmbrzl May 24, 2024
1252be7
Get rid of SOCI_DUMMY_RETURN
Krzmbrzl May 20, 2024
1e0e1dd
Add override specs
Krzmbrzl May 27, 2024
c616644
Make include less confusing
Krzmbrzl May 30, 2024
e8cc701
Improve FindMySQL
Krzmbrzl May 28, 2024
8283a38
Change fatal error to debug message
Krzmbrzl Jun 2, 2024
b6b31be
Prevent compiler flags from propagating to superprojects
Krzmbrzl Jun 2, 2024
08eb273
Link core to DL libraries
Krzmbrzl Jun 2, 2024
21515f2
Remove debug message
Krzmbrzl Aug 25, 2024
a2faea6
Don't set output directories
Krzmbrzl Aug 31, 2024
6a106e7
Also use versioned .so install for MySQL
Krzmbrzl Sep 1, 2024
f4e01a4
Re-introduce explicit build artefact directories
Krzmbrzl Sep 1, 2024
8d14ee4
Rework install paths
Krzmbrzl Sep 1, 2024
a74341c
Update example
Krzmbrzl Sep 1, 2024
6b6db13
Fix not all headers getting installed
Krzmbrzl Sep 1, 2024
efe3a05
Work around bug in VS2015
Krzmbrzl Sep 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 28 additions & 44 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,54 +22,43 @@ on:

jobs:
build:
runs-on: ${{ matrix.runner || 'ubuntu-22.04' }}
container: ${{ matrix.container }}
name: ${{ matrix.name }}
strategy:
fail-fast: false
matrix:
lib_type: [shared, static]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doubles the number of builds and I'm not sure if it's worth it... Maybe it would be enough to test just some static builds instead of testing all of them?

# Can't test DB2 as required db2exc package is no longer available after Ubuntu 14.04
backend: [sqlite3, postgresql, mysql, firebird, oracle, odbc, empty, valgrind]
runner: [ubuntu-22.04]
cxxstd: [14]
test_release_package: [false]
build_examples: [false]
Comment on lines +33 to +34
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just out of curiosity, why do we define these ones here but not no_boost which looks like a similar boolean option?

include:
# Note: the jobs are ordered in the order of decreasing running
# time, as this should minimize the total run-time of all jobs.
- backend: postgresql
- backend: empty
runner: macos-12
name: PostgreSQL macOS
- backend: oracle
name: Oracle 11
no_boost: true
- backend: valgrind
name: Valgrind
- backend: odbc
# There are many leak reports under Ubuntu 22.04, see #1008.
container: ubuntu:18.04
name: ODBC
- backend: firebird
name: Firebird
- backend: postgresql
name: PostgreSQL Linux
- backend: mysql
name: MySQL
- backend: sqlite3
runner: macos-12
name: SQLite3 macOS
- backend: sqlite3
name: SQLite3 C++17
cxxstd: 17
no_boost: true
- backend: sqlite3
name: SQLite3
- backend: empty
runner: macos-12
name: Empty macOS
- backend: empty
name: Empty
no_boost: true
- backend: oracle
no_boost: true
runner: ubuntu-22.04
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems redundant as this is the default anyhow?

(also below)

- name: SQLite3 Cxx17
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This name is not used in the summary pane any longer, but the summary looked much nicer when it was, e.g. compare the current summary
image with the new one image.

Could we please use the names in the summary again?

backend: sqlite3
cxxstd: 17
runner: ubuntu-22.04
- name: Release package
backend: empty
test_release_package: true
# Unsupported: db2exc package is only available in Ubuntu 14.04 not
# supported by GitHub Actions any longer, we'd need to run it in
# Docker container if we really need it.
# backend: db2
- backend: empty
name: Examples
runner: ubuntu-22.04
- name: Examples
backend: empty
build_examples: true
runner: ubuntu-22.04

runs-on: ${{ matrix.runner }}

env:
SOCI_CI: true
Expand Down Expand Up @@ -120,14 +109,6 @@ jobs:
;;
esac

case "${{matrix.container}}" in
ubuntu:18.04)
# We need to use this option as GitHub certificate is not recognized by
# wget in this old container otherwise.
set_env_var SOCI_WGET_OPTIONS --no-check-certificate
;;
esac

if [ -n "${{matrix.cxxstd}}" ]; then
set_env_var SOCI_CXXSTD ${{matrix.cxxstd}}
fi
Expand All @@ -140,6 +121,9 @@ jobs:
if [ "${{matrix.build_examples}}" = true ]; then
set_env_var BUILD_EXAMPLES YES
fi
if [ "${{matrix.lib_type}}" = "static" ]; then
set_env_var SOCI_BUILD_STATIC YES
fi

- name: Install dependencies under Linux
if: runner.os == 'Linux'
Expand Down
Loading