Skip to content

Commit

Permalink
Use ninja to build project (#3538)
Browse files Browse the repository at this point in the history
* Use ninja to build project

* Replace clang dir with gcc dir

* Update gcc version
  • Loading branch information
yixinglu authored Dec 23, 2021
1 parent 408d731 commit 5d5f841
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
- centos7
- ubuntu2004
compiler:
- gcc-9.2
- gcc-9.3
- clang-10
exclude:
- os: centos7
Expand Down Expand Up @@ -91,21 +91,23 @@ jobs:
centos7)
# build with Release type
cmake \
-DCMAKE_CXX_COMPILER=$TOOLSET_CLANG_DIR/bin/g++ \
-DCMAKE_C_COMPILER=$TOOLSET_CLANG_DIR/bin/gcc \
-DCMAKE_CXX_COMPILER=$TOOLSET_GCC_DIR/bin/g++ \
-DCMAKE_C_COMPILER=$TOOLSET_GCC_DIR/bin/gcc \
-DCMAKE_BUILD_TYPE=Release \
-DENABLE_TESTING=on \
-GNinja \
-B build
echo "::set-output name=j::10"
;;
ubuntu2004)
# build with Debug type
cmake \
-DCMAKE_CXX_COMPILER=$TOOLSET_CLANG_DIR/bin/g++ \
-DCMAKE_C_COMPILER=$TOOLSET_CLANG_DIR/bin/gcc \
-DCMAKE_CXX_COMPILER=$TOOLSET_GCC_DIR/bin/g++ \
-DCMAKE_C_COMPILER=$TOOLSET_GCC_DIR/bin/gcc \
-DCMAKE_BUILD_TYPE=Debug \
-DENABLE_TESTING=on \
-DENABLE_COVERAGE=on \
-GNinja \
-B build
echo "::set-output name=j::10"
;;
Expand All @@ -119,15 +121,17 @@ jobs:
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DENABLE_ASAN=on \
-DENABLE_TESTING=on \
-GNinja \
-B build
echo "::set-output name=j::6"
;;
esac
- name: Make
run: |
ccache -z
cmake --build build/ -j $(nproc)
ninja -j $(nproc)
ccache -s
working-directory: build/
- name: CTest
env:
ASAN_OPTIONS: fast_unwind_on_malloc=1
Expand Down

0 comments on commit 5d5f841

Please sign in to comment.