-
Notifications
You must be signed in to change notification settings - Fork 271
59 lines (50 loc) · 1.52 KB
/
ci-pgsql.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: CI-PGSQL
on: [ push, pull_request ]
jobs:
build-and-test:
name: ${{ matrix.os }} (${{ matrix.configuration }}) (${{ matrix.compiler }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
compiler: [ gcc, clang ]
configuration: [ Debug, Release ]
os: [ ubuntu-latest ] # macos-latest, ubuntu-latest, windows-latest
include:
- os: ubuntu-latest
compiler: gcc
cc: gcc
cxx: g++
- os: ubuntu-latest
compiler: clang
cc: clang
cxx: clang++
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
env :
CC: ${{ matrix.cc }}
CXX: ${{ matrix.cxx }}
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 1 -V