summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2020-03-02 22:13:31 +0000
committeriphydf <iphydf@users.noreply.github.com>2020-03-05 23:02:54 +0000
commit7923a619597cc9a4e62db65b0f8400176a78dfa3 (patch)
tree4a0ddb4306914f0f9bb171ac716b2269b8643b1f
parente35d70af1822095b7b273f1cec16878645b90078 (diff)
Use ninja build system for the cmake-linux build.
-rw-r--r--.travis.yml8
-rwxr-xr-x.travis/cmake-linux5
2 files changed, 8 insertions, 5 deletions
diff --git a/.travis.yml b/.travis.yml
index a717fe85..17a22e79 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -2,12 +2,13 @@
2# For Pull Requests, we build only the first three jobs: autotools on Linux, 2# For Pull Requests, we build only the first three jobs: autotools on Linux,
3# cmake on Linux, and cmake on Windows 32 bit. 3# cmake on Linux, and cmake on Windows 32 bit.
4# 4#
5# For branch builds and cron builds (once a day), we build all the jobs. This 5# For branch builds and cron builds (once a day), we build all the jobs. This is
6# is achieved using the "if: type IN (push, api, cron)" fields in the matrix. 6# achieved using the "if: type IN (push, api, cron)" fields in the jobs list.
7 7
8language: c 8language: c
9os: linux
9 10
10matrix: 11jobs:
11 include: 12 include:
12 - stage: "Stage 1" 13 - stage: "Stage 1"
13 env: JOB=cmake-linux 14 env: JOB=cmake-linux
@@ -19,6 +20,7 @@ matrix:
19 - libopus-dev # For toxav. 20 - libopus-dev # For toxav.
20 - libgtest-dev # For unit tests. 21 - libgtest-dev # For unit tests.
21 - libvpx-dev # For toxav. 22 - libvpx-dev # For toxav.
23 - ninja-build
22 - pylint 24 - pylint
23 install: .travis/$JOB install 25 install: .travis/$JOB install
24 script: .travis/$JOB script 26 script: .travis/$JOB script
diff --git a/.travis/cmake-linux b/.travis/cmake-linux
index 1d425e54..9b2a1fae 100755
--- a/.travis/cmake-linux
+++ b/.travis/cmake-linux
@@ -87,7 +87,7 @@ travis_script() {
87 87
88 other/analysis/check_logger_levels 88 other/analysis/check_logger_levels
89 89
90 cmake -B_build -H. \ 90 cmake -B_build -H. -GNinja \
91 -DCMAKE_C_FLAGS="$C_FLAGS" \ 91 -DCMAKE_C_FLAGS="$C_FLAGS" \
92 -DCMAKE_CXX_FLAGS="$CXX_FLAGS" \ 92 -DCMAKE_CXX_FLAGS="$CXX_FLAGS" \
93 -DCMAKE_EXE_LINKER_FLAGS="$LD_FLAGS" \ 93 -DCMAKE_EXE_LINKER_FLAGS="$LD_FLAGS" \
@@ -100,8 +100,9 @@ travis_script() {
100 -DUSE_IPV6=OFF \ 100 -DUSE_IPV6=OFF \
101 -DAUTOTEST=ON 101 -DAUTOTEST=ON
102 102
103 cmake --build _build --parallel "$NPROC" --target install -- -k 0
104
103 cd _build # pushd 105 cd _build # pushd
104 make "-j$NPROC" -k install
105 ctest -j50 --output-on-failure || \ 106 ctest -j50 --output-on-failure || \
106 ctest -j50 --output-on-failure --rerun-failed 107 ctest -j50 --output-on-failure --rerun-failed
107 cd - # popd 108 cd - # popd