-
Notifications
You must be signed in to change notification settings - Fork 268
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #122 from Jacyking/master
add pg ci
- Loading branch information
Showing
12 changed files
with
363 additions
and
243 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: CI-PGSQL | ||
|
||
on: [ push, pull_request ] | ||
|
||
jobs: | ||
build-and-test: | ||
|
||
name: ${{ matrix.os }} (${{ matrix.configuration }}) | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
configuration: [ Debug, Release ] | ||
os: [ ubuntu-latest ] # macos-latest, ubuntu-latest, windows-latest | ||
|
||
services: | ||
postgres: | ||
image: postgres | ||
env: | ||
POSTGRES_USER: root | ||
POSTGRES_PASSWORD: 123456 | ||
POSTGRES_DB: test_ormppdb | ||
options: >- | ||
--health-cmd pg_isready | ||
--health-interval 10s | ||
--health-timeout 5s | ||
--health-retries 5 | ||
ports: | ||
- 5432:5432 | ||
|
||
steps: | ||
- name: Checkout Code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Configure cmake | ||
run: cmake -B${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DENABLE_PG=ON | ||
|
||
- name: Build | ||
run: cmake --build ${{github.workspace}}/build --config ${{ matrix.configuration }} | ||
|
||
- name: Test | ||
working-directory: ${{github.workspace}}/build | ||
env: | ||
CTEST_OUTPUT_ON_FAILURE: 1 | ||
run: ctest -C ${{ matrix.configuration }} -j `nproc` -V |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# - Find pq | ||
# Find the native PGSQL includes and library | ||
# | ||
# PGSQL_INCLUDE_DIR - where to find libpq-fe.h, etc. | ||
# PGSQL_LIBRARIES - List of libraries when using PGSQL. | ||
# PGSQL_FOUND - True if PGSQL found. | ||
|
||
IF (PGSQL_INCLUDE_DIR) | ||
# Already in cache, be silent | ||
SET(PGSQL_FIND_QUIETLY TRUE) | ||
ENDIF (PGSQL_INCLUDE_DIR) | ||
|
||
IF (WIN32) | ||
FIND_PATH(PGSQL_INCLUDE_DIR libpq-fe.h | ||
$ENV{PROGRAMFILES}/PostgreSQL/*/include | ||
$ENV{SYSTEMDRIVE}/PostgreSQL/*/include) | ||
ELSE (WIN32) | ||
FIND_PATH(PGSQL_INCLUDE_DIR libpq-fe.h | ||
/opt/homebrew/include/postgresql | ||
/usr/local/include/postgresql | ||
/usr/include/postgresql) | ||
ENDIF(WIN32) | ||
|
||
IF (WIN32) | ||
SET(PGSQL_NAMES libpq) | ||
FIND_LIBRARY(PGSQL_LIBRARY | ||
NAMES ${PGSQL_NAMES} | ||
PATHS $ENV{PROGRAMFILES}/PostgreSQL/*/lib | ||
$ENV{SYSTEMDRIVE}/PostgreSQL/*/lib) | ||
ELSE (WIN32) | ||
SET(PGSQL_NAMES pq) | ||
FIND_LIBRARY(PGSQL_LIBRARY | ||
NAMES ${PGSQL_NAMES} | ||
PATHS /usr/lib | ||
/usr/local/lib | ||
/opt/homebrew/lib) | ||
ENDIF(WIN32) | ||
|
||
IF (PGSQL_INCLUDE_DIR AND PGSQL_LIBRARY) | ||
SET(PGSQL_FOUND TRUE) | ||
SET(PGSQL_LIBRARIES ${PGSQL_LIBRARY}) | ||
ELSE (PGSQL_INCLUDE_DIR AND PGSQL_LIBRARY) | ||
SET(PGSQL_FOUND FALSE) | ||
SET(PGSQL_LIBRARIES) | ||
ENDIF (PGSQL_INCLUDE_DIR AND PGSQL_LIBRARY) | ||
|
||
IF (PGSQL_FOUND) | ||
IF (NOT PGSQL_FIND_QUIETLY) | ||
MESSAGE(STATUS "Found PGSQL: ${PGSQL_LIBRARY}") | ||
ENDIF (NOT PGSQL_FIND_QUIETLY) | ||
ELSE (PGSQL_FOUND) | ||
IF (PGSQL_FIND_REQUIRED) | ||
MESSAGE(STATUS "Looked for PGSQL libraries named ${PGSQL_NAMES}.") | ||
MESSAGE(FATAL_ERROR "Could NOT find PGSQL library") | ||
ENDIF (PGSQL_FIND_REQUIRED) | ||
ENDIF (PGSQL_FOUND) | ||
|
||
MARK_AS_ADVANCED(PGSQL_LIBRARY PGSQL_INCLUDE_DIR) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
coverage: | ||
status: | ||
patch: off | ||
project: off |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.