mirror of
https://github.com/allankoechke/soci.git
synced 2026-11-30 10:58:24 +00:00
Merge branch 'gha-msvs'
Make Windows GitHub Actions workflow work and remove some builds from AppVeyor CI to make it faster. See #1270.
This commit is contained in:
@@ -10,6 +10,7 @@ env:
|
||||
WITH_BOOST: OFF
|
||||
|
||||
task:
|
||||
skip: "changesIncludeOnly('.github/workflows/*')"
|
||||
matrix:
|
||||
- name: Cirrus CI / Empty FreeBSD
|
||||
env:
|
||||
|
||||
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@@ -1,5 +1,5 @@
|
||||
# Continuous integration workflow for SOCI Unix builds.
|
||||
name: Unix builds
|
||||
name: Unix CI
|
||||
|
||||
on:
|
||||
push:
|
||||
|
||||
25
.github/workflows/ci_msw.yml
vendored
25
.github/workflows/ci_msw.yml
vendored
@@ -1,5 +1,5 @@
|
||||
# Continuous integration workflow for SOCI Windows builds.
|
||||
name: Windows builds
|
||||
name: Windows CI
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -33,9 +33,11 @@ jobs:
|
||||
- lib_type: shared
|
||||
build_type: Release
|
||||
unity_build: true
|
||||
- lib_type: static
|
||||
build_type: Release
|
||||
|
||||
runs-on: windows-2022
|
||||
name: MSVS ${{ matrix.lib_type }} ${{ matrix.build_type }} ${{ matrix.unity_build ? '(unity build)' : '' }}
|
||||
name: MSVS ${{ matrix.lib_type }} ${{ matrix.build_type }} ${{ matrix.unity_build && '(unity build)' || '' }}
|
||||
|
||||
env:
|
||||
SOCI_CI: true
|
||||
@@ -43,18 +45,31 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
|
||||
- name: Set up MSVS environment
|
||||
uses: seanmiddleditch/gha-setup-vsdevenv@v5
|
||||
|
||||
- name: Set up PostgreSQL
|
||||
run: |
|
||||
$pgService = Get-Service -Name postgresql*
|
||||
Set-Service -InputObject $pgService -Status running -StartupType automatic
|
||||
Start-Process -FilePath "$env:PGBIN\pg_isready" -Wait
|
||||
& $env:PGBIN\createdb soci_test
|
||||
|
||||
- name: Configure
|
||||
run: |
|
||||
$soci_shared = "${{ matrix.lib_type == shared }}" ? "ON" : "OFF"
|
||||
$soci_shared = "${{ matrix.lib_type }}" -eq "shared" ? "ON" : "OFF"
|
||||
$soci_enable_unity_build = "${{ matrix.unity_build }}" ? "ON" : "OFF"
|
||||
cmake -S . -B build .. -GNinja `
|
||||
cmake -S . -B build -GNinja `
|
||||
-DCMAKE_VERBOSE_MAKEFILE=ON `
|
||||
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} `
|
||||
-DCMAKE_UNITY_BUILD=$soci_enable_unity_build `
|
||||
-DWITH_BOOST=OFF `
|
||||
-DSOCI_DB2=OFF `
|
||||
-DSOCI_FIREBIRD=OFF `
|
||||
-DSOCI_ORACLE=OFF `
|
||||
-DSOCI_SHARED=$soci_shared `
|
||||
-DSOCI_ENABLE_WERROR=ON
|
||||
|
||||
@@ -64,4 +79,4 @@ jobs:
|
||||
|
||||
- name: Test
|
||||
run: |
|
||||
ctest --test-dir build -V --timeout 300 --output-on-failure
|
||||
ctest --test-dir build -V --timeout 300 --output-on-failure --exclude-regex "soci_mysql_test|soci_odbc_test_.*"
|
||||
|
||||
18
appveyor.yml
18
appveyor.yml
@@ -8,15 +8,6 @@ configuration: Release
|
||||
|
||||
environment:
|
||||
matrix:
|
||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
|
||||
G: "Ninja"
|
||||
BOOST_ROOT: C:\Libraries\boost_1_84_0
|
||||
MSSQL_VER: 2019
|
||||
POSTGRESQL_ROOT: C:\Program Files\PostgreSQL\15
|
||||
POSTGRESQL_VER: 15
|
||||
MYSQL_VER: 80
|
||||
MYSQL_DIR: C:\Program Files\MySql\MySQL Server 8.0
|
||||
VCVARS_SCRIPT: "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Auxiliary/Build"
|
||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
||||
G: "Ninja"
|
||||
BOOST_ROOT: C:\Libraries\boost_1_77_0
|
||||
@@ -35,15 +26,6 @@ environment:
|
||||
MYSQL_VER: 57
|
||||
MYSQL_DIR: C:\Program Files\MySql\MySQL Server 5.7
|
||||
VCVARS_SCRIPT: "C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Auxiliary/Build"
|
||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||
G: "Ninja"
|
||||
BOOST_ROOT: C:\Libraries\boost_1_60_0
|
||||
MSSQL_VER: 2014
|
||||
POSTGRESQL_ROOT: C:\Program Files\PostgreSQL\11
|
||||
POSTGRESQL_VER: 11
|
||||
MYSQL_VER: 57
|
||||
MYSQL_DIR: C:\Program Files\MySql\MySQL Server 5.7
|
||||
VCVARS_SCRIPT: "C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC"
|
||||
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
|
||||
G: "MinGW Makefiles"
|
||||
MINGW_BIN: C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin
|
||||
|
||||
@@ -55,7 +55,7 @@ if (MSVC)
|
||||
message(FATAL_ERROR "Using a non-default linker is not supported when using MSVC")
|
||||
endif()
|
||||
|
||||
target_compile_options(soci_compiler_interface INTERFACE "/bigobj" "/utf-8")
|
||||
target_compile_options(soci_compiler_interface INTERFACE "/nologo" "/bigobj" "/utf-8")
|
||||
else()
|
||||
|
||||
if (SOCI_ENABLE_WERROR)
|
||||
|
||||
@@ -180,6 +180,7 @@ TEST_CASE("MS SQL table records count", "[odbc][mssql][count]")
|
||||
soci::rowset<soci::row> rs = (sql.prepare << sql_query);
|
||||
|
||||
// Check that we can access the results.
|
||||
bool hasTables = false;
|
||||
for (soci::row const& row : rs)
|
||||
{
|
||||
std::string instance_name = row.get<std::string>(0);
|
||||
@@ -193,10 +194,10 @@ TEST_CASE("MS SQL table records count", "[odbc][mssql][count]")
|
||||
INFO("Table " << instance_name << "." << table_name <<
|
||||
" has " << number_of_records << " records");
|
||||
CHECK( database_name == "master" );
|
||||
return;
|
||||
hasTables = true;
|
||||
}
|
||||
|
||||
FAIL("No tables found in the master database");
|
||||
CHECK(hasTables);
|
||||
}
|
||||
|
||||
// DDL Creation objects for common tests
|
||||
|
||||
Reference in New Issue
Block a user