Skip to content

Commit 48d23a8

Browse files
committed
azure: convert to use Ninja as build tool
While we were still supporting Trusty, using Ninja as a build tool would have required us to first setup pip and then use it to install Ninja. As a result, the speedups from using Ninja were drowned out by the time required to install Ninja. But as we have deprecated Trusty now, both Xenial and Bionic have recent versions of Ninja in their repositories and thus we can now use Ninja.
1 parent 4e07a20 commit 48d23a8

File tree

4 files changed

+18
-20
lines changed

4 files changed

+18
-20
lines changed

azure-pipelines.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
base: ubuntu:xenial
1919
environmentVariables: |
2020
CC=gcc
21-
CMAKE_GENERATOR=Unix Makefiles
21+
CMAKE_GENERATOR=Ninja
2222
CMAKE_OPTIONS=-DUSE_HTTPS=OpenSSL -DREGEX_BACKEND=builtin -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind
2323
2424
- job: linux_amd64_xenial_gcc_mbedtls
@@ -33,7 +33,7 @@ jobs:
3333
base: ubuntu:xenial
3434
environmentVariables: |
3535
CC=gcc
36-
CMAKE_GENERATOR=Unix Makefiles
36+
CMAKE_GENERATOR=Ninja
3737
CMAKE_OPTIONS=-DUSE_HTTPS=mbedTLS -DUSE_SHA1=HTTPS -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind
3838
3939
- job: linux_amd64_xenial_clang_openssl
@@ -48,7 +48,7 @@ jobs:
4848
base: ubuntu:xenial
4949
environmentVariables: |
5050
CC=clang
51-
CMAKE_GENERATOR=Unix Makefiles
51+
CMAKE_GENERATOR=Ninja
5252
CMAKE_OPTIONS=-DUSE_HTTPS=OpenSSL -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind
5353
5454
- job: linux_amd64_xenial_clang_mbedtls
@@ -63,7 +63,7 @@ jobs:
6363
base: ubuntu:xenial
6464
environmentVariables: |
6565
CC=clang
66-
CMAKE_GENERATOR=Unix Makefiles
66+
CMAKE_GENERATOR=Ninja
6767
CMAKE_OPTIONS=-DUSE_HTTPS=mbedTLS -DUSE_SHA1=HTTPS -DREGEX_BACKEND=pcre -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind
6868
6969
- job: macos

azure-pipelines/docker/bionic

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ RUN apt-get update && \
1212
libssh2-1-dev \
1313
libssl-dev \
1414
libz-dev \
15-
make \
15+
ninja-build \
1616
openjdk-8-jre-headless \
1717
openssh-server \
1818
openssl \
@@ -29,8 +29,7 @@ RUN cd /tmp && \
2929
rm -f mbedtls-2.16.2-apache.tgz && \
3030
cd mbedtls-2.16.2 && \
3131
scripts/config.pl set MBEDTLS_MD4_C 1 && \
32-
CFLAGS=-fPIC cmake -DENABLE_PROGRAMS=OFF -DENABLE_TESTING=OFF -DUSE_SHARED_MBEDTLS_LIBRARY=OFF -DUSE_STATIC_MBEDTLS_LIBRARY=ON . && \
33-
cmake --build . && \
34-
make install && \
32+
CFLAGS=-fPIC cmake -G Ninja -DENABLE_PROGRAMS=OFF -DENABLE_TESTING=OFF -DUSE_SHARED_MBEDTLS_LIBRARY=OFF -DUSE_STATIC_MBEDTLS_LIBRARY=ON . && \
33+
ninja install && \
3534
cd .. && \
3635
rm -rf mbedtls-2.16.2

azure-pipelines/docker/xenial

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ RUN echo 'deb http://ppa.launchpad.net/hola-launchpad/valgrind/ubuntu xenial mai
1414
libssh2-1-dev \
1515
libssl-dev \
1616
libz-dev \
17-
make \
17+
ninja-build \
1818
openjdk-8-jre-headless \
1919
openssh-server \
2020
openssl \
@@ -31,9 +31,8 @@ RUN cd /tmp && \
3131
rm -f mbedtls-2.16.2-apache.tgz && \
3232
cd mbedtls-2.16.2 && \
3333
scripts/config.pl set MBEDTLS_MD4_C 1 && \
34-
CFLAGS=-fPIC cmake -DENABLE_PROGRAMS=OFF -DENABLE_TESTING=OFF -DUSE_SHARED_MBEDTLS_LIBRARY=OFF -DUSE_STATIC_MBEDTLS_LIBRARY=ON . && \
35-
cmake --build . && \
36-
make install && \
34+
CFLAGS=-fPIC cmake -G Ninja -DENABLE_PROGRAMS=OFF -DENABLE_TESTING=OFF -DUSE_SHARED_MBEDTLS_LIBRARY=OFF -DUSE_STATIC_MBEDTLS_LIBRARY=ON . && \
35+
ninja install && \
3736
cd .. && \
3837
rm -rf mbedtls-2.16.2
3938

azure-pipelines/nightly.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
base: ubuntu:xenial
1515
environmentVariables: |
1616
CC=gcc
17-
CMAKE_GENERATOR=Unix Makefiles
17+
CMAKE_GENERATOR=Ninja
1818
CMAKE_OPTIONS=-DUSE_HTTPS=OpenSSL -DREGEX_BACKEND=builtin -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind
1919
RUN_INVASIVE_TESTS=true
2020
@@ -30,7 +30,7 @@ jobs:
3030
base: ubuntu:xenial
3131
environmentVariables: |
3232
CC=gcc
33-
CMAKE_GENERATOR=Unix Makefiles
33+
CMAKE_GENERATOR=Ninja
3434
CMAKE_OPTIONS=-DUSE_HTTPS=mbedTLS -DUSE_SHA1=HTTPS -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind
3535
RUN_INVASIVE_TESTS=true
3636
@@ -46,7 +46,7 @@ jobs:
4646
base: ubuntu:xenial
4747
environmentVariables: |
4848
CC=clang
49-
CMAKE_GENERATOR=Unix Makefiles
49+
CMAKE_GENERATOR=Ninja
5050
CMAKE_OPTIONS=-DUSE_HTTPS=OpenSSL -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind
5151
RUN_INVASIVE_TESTS=true
5252
@@ -62,7 +62,7 @@ jobs:
6262
base: ubuntu:xenial
6363
environmentVariables: |
6464
CC=clang
65-
CMAKE_GENERATOR=Unix Makefiles
65+
CMAKE_GENERATOR=Ninja
6666
CMAKE_OPTIONS=-DUSE_HTTPS=mbedTLS -DUSE_SHA1=HTTPS -DREGEX_BACKEND=pcre -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind
6767
RUN_INVASIVE_TESTS=true
6868
@@ -157,7 +157,7 @@ jobs:
157157
base: multiarch/ubuntu-core:x86-bionic
158158
environmentVariables: |
159159
CC=gcc
160-
CMAKE_GENERATOR=Unix Makefiles
160+
CMAKE_GENERATOR=Ninja
161161
CMAKE_OPTIONS=-DUSE_HTTPS=OpenSSL -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind
162162
RUN_INVASIVE_TESTS=true
163163
@@ -174,7 +174,7 @@ jobs:
174174
base: multiarch/ubuntu-core:x86-bionic
175175
environmentVariables: |
176176
CC=clang
177-
CMAKE_GENERATOR=Unix Makefiles
177+
CMAKE_GENERATOR=Ninja
178178
CMAKE_OPTIONS=-DUSE_HTTPS=OpenSSL -DDEPRECATE_HARD=ON -DUSE_LEAK_CHECKER=valgrind
179179
RUN_INVASIVE_TESTS=true
180180
@@ -191,7 +191,7 @@ jobs:
191191
base: multiarch/ubuntu-core:armhf-bionic
192192
environmentVariables: |
193193
CC=gcc
194-
CMAKE_GENERATOR=Unix Makefiles
194+
CMAKE_GENERATOR=Ninja
195195
CMAKE_OPTIONS=-DUSE_HTTPS=OpenSSL -DDEPRECATE_HARD=ON
196196
RUN_INVASIVE_TESTS=true
197197
SKIP_PROXY_TESTS=true
@@ -209,7 +209,7 @@ jobs:
209209
base: multiarch/ubuntu-core:arm64-bionic
210210
environmentVariables: |
211211
CC=gcc
212-
CMAKE_GENERATOR=Unix Makefiles
212+
CMAKE_GENERATOR=Ninja
213213
CMAKE_OPTIONS=-DUSE_HTTPS=OpenSSL -DDEPRECATE_HARD=ON
214214
RUN_INVASIVE_TESTS=true
215215
SKIP_PROXY_TESTS=true

0 commit comments

Comments
 (0)