Skip to content

Commit

Permalink
fix pg complier error on clang
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacyking committed Apr 8, 2024
1 parent 74cbd12 commit d2b469f
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 20 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci-mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ jobs:
database: test_ormppdb

- name: Configure cmake
run: cmake -B${{ github.workspace }}/build -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DENABLE_MYSQL=ON
run : cmake -B${{ github.workspace }}/build -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DENABLE_MYSQL=ON

- name: Build
run: cmake --build ${{ github.workspace }}/build --config ${{ matrix.configuration }}
run : cmake --build ${{ github.workspace }}/build --config ${{ matrix.configuration }}

- name: Test
working-directory: ${{ github.workspace }}/build
env:
env :
CTEST_OUTPUT_ON_FAILURE: 1
run: ctest -C ${{ matrix.configuration }} -j 1 -V
run : ctest -C ${{ matrix.configuration }} -j 1 -V
21 changes: 16 additions & 5 deletions .github/workflows/ci-pgsql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,17 @@ jobs:
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: g++
cxx: g++
- os: ubuntu-latest
compiler: clang
cc: clang++
cxx: clang++

services:
postgres:
Expand All @@ -35,13 +43,16 @@ jobs:
uses: actions/checkout@v2

- name: Configure cmake
run: cmake -B${{ github.workspace }}/build -DCMAKE_C_COMPILER=${{ matrix.compiler }} -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DENABLE_PG=ON
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 }}
run : cmake --build ${{ github.workspace }}/build --config ${{ matrix.configuration }}

- name: Test
working-directory: ${{ github.workspace }}/build
env:
env :
CTEST_OUTPUT_ON_FAILURE: 1
run: ctest -C ${{ matrix.configuration }} -j 1 -V
run : ctest -C ${{ matrix.configuration }} -j 1 -V
8 changes: 4 additions & 4 deletions .github/workflows/ci-sqlite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ jobs:
uses: actions/checkout@v2

- name: Configure cmake
run: cmake -B${{ github.workspace }}/build -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DENABLE_SQLITE3=ON
run : cmake -B${{ github.workspace }}/build -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -DENABLE_SQLITE3=ON

- name: Build
run: cmake --build ${{ github.workspace }}/build --config ${{ matrix.configuration }}
run : cmake --build ${{ github.workspace }}/build --config ${{ matrix.configuration }}

- name: Test
working-directory: ${{ github.workspace }}/build
env:
env :
CTEST_OUTPUT_ON_FAILURE: 1
run: ctest -C ${{ matrix.configuration }} -j 1 -V
run : ctest -C ${{ matrix.configuration }} -j 1 -V
4 changes: 2 additions & 2 deletions .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
fetch-depth: 0

- name: install clang-format
run: sudo apt install clang-format
run : sudo apt install clang-format

- name: check-diff
run: |
run : |
diff=`git-clang-format --diff HEAD^`
if ! [[ "$diff" = "no modified files to format" || "$diff" = "clang-format did not modify any files" ]]; then
echo "The diff you sent is not formatted correctly."
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@ jobs:
database: test_ormppdb

- name: Verify MySQL
run: mysql -uroot -e'show databases;'
run : mysql -uroot -e'show databases;'

- name: Configure cmake
run: cmake -B${{ github.workspace }}/build -DCOVERAGE_TEST=ON -DENABLE_MYSQL=ON -DCMAKE_BUILD_TYPE=Debug
run : cmake -B${{ github.workspace }}/build -DCOVERAGE_TEST=ON -DENABLE_MYSQL=ON -DCMAKE_BUILD_TYPE=Debug

- name: Build
run: cmake --build ${{ github.workspace }}/build --config Debug
run : cmake --build ${{ github.workspace }}/build --config Debug

- name: Test
working-directory: ${{ github.workspace }}/build
env:
env :
CTEST_OUTPUT_ON_FAILURE: 1
run: ctest -C Debug -j `nproc` -V
run : ctest -C Debug -j `nproc` -V

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1

0 comments on commit d2b469f

Please sign in to comment.