Skip to content

Commit b10aadd

Browse files
authored
ci: parallelize docker RUN builds whenver possible (#7060)
1 parent 04b9b79 commit b10aadd

13 files changed

Lines changed: 45 additions & 45 deletions

ci/cloudbuild/dockerfiles/demo-centos-7.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ RUN curl -sSL https://github.com/nlohmann/json/archive/v3.9.1.tar.gz | \
195195
-DBUILD_SHARED_LIBS=yes \
196196
-DBUILD_TESTING=OFF \
197197
-H. -Bcmake-out/nlohmann/json && \
198-
cmake --build cmake-out/nlohmann/json --target install -- -j ${NCPU} && \
198+
cmake --build cmake-out/nlohmann/json --target install -- -j ${NCPU:-4} && \
199199
ldconfig
200200
# ```
201201

ci/cloudbuild/dockerfiles/demo-debian-buster.Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ RUN curl -sSL https://github.com/nlohmann/json/archive/v3.9.1.tar.gz | \
8484
-DBUILD_SHARED_LIBS=yes \
8585
-DBUILD_TESTING=OFF \
8686
-H. -Bcmake-out/nlohmann/json && \
87-
cmake --build cmake-out/nlohmann/json --target install -- -j ${NCPU} && \
87+
cmake --build cmake-out/nlohmann/json --target install -- -j ${NCPU:-4} && \
8888
ldconfig
8989
# ```
9090

@@ -104,7 +104,7 @@ RUN curl -sSL https://github.com/google/protobuf/archive/v3.15.8.tar.gz | \
104104
-DBUILD_SHARED_LIBS=yes \
105105
-Dprotobuf_BUILD_TESTS=OFF \
106106
-Hcmake -Bcmake-out && \
107-
cmake --build cmake-out --target install && \
107+
cmake --build cmake-out --target install -- -j ${NCPU:-4} && \
108108
ldconfig
109109
# ```
110110

@@ -128,7 +128,7 @@ RUN curl -sSL https://github.com/grpc/grpc/archive/v1.35.0.tar.gz | \
128128
-DgRPC_SSL_PROVIDER=package \
129129
-DgRPC_ZLIB_PROVIDER=package \
130130
-H. -Bcmake-out && \
131-
cmake --build cmake-out --target install && \
131+
cmake --build cmake-out --target install -- -j ${NCPU:-4} && \
132132
ldconfig
133133
# ```
134134

ci/cloudbuild/dockerfiles/demo-debian-stretch.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ RUN curl -sSL https://github.com/nlohmann/json/archive/v3.9.1.tar.gz | \
170170
-DBUILD_SHARED_LIBS=yes \
171171
-DBUILD_TESTING=OFF \
172172
-H. -Bcmake-out/nlohmann/json && \
173-
cmake --build cmake-out/nlohmann/json --target install -- -j ${NCPU} && \
173+
cmake --build cmake-out/nlohmann/json --target install -- -j ${NCPU:-4} && \
174174
ldconfig
175175
# ```
176176

ci/cloudbuild/dockerfiles/demo-fedora.Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ RUN curl -sSL https://github.com/nlohmann/json/archive/v3.9.1.tar.gz | \
9898
-DBUILD_SHARED_LIBS=yes \
9999
-DBUILD_TESTING=OFF \
100100
-H. -Bcmake-out/nlohmann/json && \
101-
cmake --build cmake-out/nlohmann/json --target install -- -j ${NCPU} && \
101+
cmake --build cmake-out/nlohmann/json --target install -- -j ${NCPU:-4} && \
102102
ldconfig
103103
# ```
104104

@@ -118,7 +118,7 @@ RUN curl -sSL https://github.com/google/protobuf/archive/v3.15.8.tar.gz | \
118118
-DBUILD_SHARED_LIBS=yes \
119119
-Dprotobuf_BUILD_TESTS=OFF \
120120
-Hcmake -Bcmake-out && \
121-
cmake --build cmake-out --target install && \
121+
cmake --build cmake-out --target install -- -j ${NCPU:-4} && \
122122
ldconfig
123123
# ```
124124

@@ -142,7 +142,7 @@ RUN curl -sSL https://github.com/grpc/grpc/archive/v1.35.0.tar.gz | \
142142
-DgRPC_SSL_PROVIDER=package \
143143
-DgRPC_ZLIB_PROVIDER=package \
144144
-H. -Bcmake-out && \
145-
cmake --build cmake-out --target install && \
145+
cmake --build cmake-out --target install -- -j ${NCPU:-4} && \
146146
ldconfig
147147
# ```
148148

ci/cloudbuild/dockerfiles/demo-opensuse-leap.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ RUN curl -sSL https://github.com/nlohmann/json/archive/v3.9.1.tar.gz | \
155155
-DBUILD_SHARED_LIBS=yes \
156156
-DBUILD_TESTING=OFF \
157157
-H. -Bcmake-out/nlohmann/json && \
158-
cmake --build cmake-out/nlohmann/json --target install -- -j ${NCPU} && \
158+
cmake --build cmake-out/nlohmann/json --target install -- -j ${NCPU:-4} && \
159159
ldconfig
160160
# ```
161161

ci/cloudbuild/dockerfiles/demo-rockylinux-8.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ RUN curl -sSL https://github.com/nlohmann/json/archive/v3.9.1.tar.gz | \
142142
-DBUILD_SHARED_LIBS=yes \
143143
-DBUILD_TESTING=OFF \
144144
-H. -Bcmake-out/nlohmann/json && \
145-
cmake --build cmake-out/nlohmann/json --target install -- -j ${NCPU} && \
145+
cmake --build cmake-out/nlohmann/json --target install -- -j ${NCPU:-4} && \
146146
ldconfig
147147
# ```
148148

ci/cloudbuild/dockerfiles/demo-ubuntu-bionic.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ RUN curl -sSL https://github.com/nlohmann/json/archive/v3.9.1.tar.gz | \
145145
-DBUILD_SHARED_LIBS=yes \
146146
-DBUILD_TESTING=OFF \
147147
-H. -Bcmake-out/nlohmann/json && \
148-
cmake --build cmake-out/nlohmann/json --target install -- -j ${NCPU} && \
148+
cmake --build cmake-out/nlohmann/json --target install -- -j ${NCPU:-4} && \
149149
ldconfig
150150
# ```
151151

ci/cloudbuild/dockerfiles/demo-ubuntu-focal.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ RUN curl -sSL https://github.com/nlohmann/json/archive/v3.9.1.tar.gz | \
129129
-DBUILD_SHARED_LIBS=yes \
130130
-DBUILD_TESTING=OFF \
131131
-H. -Bcmake-out/nlohmann/json && \
132-
cmake --build cmake-out/nlohmann/json --target install -- -j ${NCPU} && \
132+
cmake --build cmake-out/nlohmann/json --target install -- -j ${NCPU:-4} && \
133133
ldconfig
134134
# ```
135135

ci/cloudbuild/dockerfiles/demo-ubuntu-xenial.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ RUN curl -sSL https://github.com/nlohmann/json/archive/v3.9.1.tar.gz | \
163163
-DBUILD_SHARED_LIBS=yes \
164164
-DBUILD_TESTING=OFF \
165165
-H. -Bcmake-out/nlohmann/json && \
166-
cmake --build cmake-out/nlohmann/json --target install -- -j ${NCPU} && \
166+
cmake --build cmake-out/nlohmann/json --target install -- -j ${NCPU:-4} && \
167167
ldconfig
168168
# ```
169169

ci/cloudbuild/dockerfiles/fedora-34.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ RUN curl -sSL https://github.com/grpc/grpc/archive/v1.35.0.tar.gz | \
133133
-DgRPC_SSL_PROVIDER=package \
134134
-DgRPC_ZLIB_PROVIDER=package \
135135
-H. -Bcmake-out -GNinja && \
136-
cmake --build cmake-out --target install && \
136+
cmake --build cmake-out --target install -- -j ${NCPU} && \
137137
ldconfig && \
138138
cd /var/tmp && rm -fr build
139139

0 commit comments

Comments
 (0)