Skip to content

Commit 7d3c007

Browse files
authored
Fixed container build trigger and cleanup containers (#875)
* Fixed container build trigger and cleanup containers * fixed gtest * Normalized rapidjson across all distros to use latest
1 parent 17e3436 commit 7d3c007

File tree

28 files changed

+57
-431
lines changed

28 files changed

+57
-431
lines changed

.github/workflows/build-containers.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- devops/docker/**/Dockerfile
77
push:
88
branches:
9-
- main
9+
- dev
1010
paths:
1111
- devops/docker/**/Dockerfile
1212
workflow_dispatch:

devops/docker/almalinux-9-amd64/Dockerfile

+3-2
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,6 @@ RUN git clone https://github.com/google/googletest --recursive -b v1.12.0
2424
RUN cd googletest && cmake . && cmake --build . --parallel --target install && rm -rf /git/googletest
2525

2626
# rapidjson
27-
RUN git clone https://github.com/Tencent/rapidjson --recursive
28-
RUN cd rapidjson && cmake . && cmake --build . --parallel --target install && rm -rf /git/rapidjson
27+
RUN git clone --no-checkout https://github.com/Tencent/rapidjson
28+
RUN cd rapidjson && git checkout 24b5e7a8b27f42fa16b96fc70aade9106cf7102f && git submodule update --init --recursive
29+
RUN cd rapidjson && cmake . -DRAPIDJSON_BUILD_EXAMPLES=OFF -DRAPIDJSON_BUILD_TESTS=OFF && cmake --build . --parallel --target install && rm -rf /git/rapidjson

devops/docker/amazonlinux-2-amd64/Dockerfile

+3-2
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,6 @@ RUN git clone https://github.com/google/googletest --recursive -b v1.12.0
2424
RUN cd googletest && cmake . && cmake --build . --parallel --target install && rm -rf /git/googletest
2525

2626
# rapidjson
27-
RUN git clone https://github.com/Tencent/rapidjson --recursive
28-
RUN cd rapidjson && cmake . && cmake --build . --parallel --target install && rm -rf /git/rapidjson
27+
RUN git clone --no-checkout https://github.com/Tencent/rapidjson
28+
RUN cd rapidjson && git checkout 24b5e7a8b27f42fa16b96fc70aade9106cf7102f && git submodule update --init --recursive
29+
RUN cd rapidjson && cmake . -DRAPIDJSON_BUILD_EXAMPLES=OFF -DRAPIDJSON_BUILD_TESTS=OFF && cmake --build . --parallel --target install && rm -rf /git/rapidjson

devops/docker/azurelinux-3-amd64/Dockerfile

+6-3
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ RUN tdnf install -y \
1010
file \
1111
gcovr \
1212
git \
13-
gmock-devel \
14-
gtest-devel \
1513
jq \
1614
ninja-build \
1715
openssl-devel \
@@ -22,7 +20,12 @@ RUN tdnf install -y \
2220
tree \
2321
unzip \
2422
util-linux \
23+
uuid-devel \
2524
wget \
2625
zip && \
2726
tdnf upgrade -y && \
28-
tdnf clean all
27+
tdnf clean all
28+
29+
# GTest
30+
RUN git clone https://github.com/google/googletest --recursive -b release-1.12.0
31+
RUN cd googletest && cmake . && cmake --build . --parallel --target install && rm -rf /git/googletest

devops/docker/centos-7-amd64/Dockerfile

+3-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ RUN git clone https://github.com/Kitware/CMake --recursive -b v3.21.7
2323
RUN cd CMake && ./bootstrap && make -j$(nproc) && make install && hash -r && rm -rf /git/CMake
2424

2525
# rapidjson
26-
RUN git clone https://github.com/Tencent/rapidjson --recursive -b v1.1.0
27-
RUN cd rapidjson && cmake -DRAPIDJSON_BUILD_TESTS=0 . && cmake --build . --parallel --target install && rm -rf /git/rapidjson
26+
RUN git clone --no-checkout https://github.com/Tencent/rapidjson
27+
RUN cd rapidjson && git checkout 24b5e7a8b27f42fa16b96fc70aade9106cf7102f && git submodule update --init --recursive
28+
RUN cd rapidjson && cmake . -DRAPIDJSON_BUILD_EXAMPLES=OFF -DRAPIDJSON_BUILD_TESTS=OFF && cmake --build . --parallel --target install && rm -rf /git/rapidjson
2829

2930
# GTest
3031
RUN git clone https://github.com/google/googletest --recursive -b release-1.10.0

devops/docker/centos-8-amd64/Dockerfile

+3-2
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,6 @@ RUN git clone https://github.com/google/googletest --recursive -b release-1.10.0
3333
RUN cd googletest && cmake . && cmake --build . --parallel --target install && rm -rf /git/googletest
3434

3535
# rapidjson
36-
RUN git clone https://github.com/Tencent/rapidjson --recursive
37-
RUN cd rapidjson && cmake . && cmake --build . --parallel --target install && rm -rf /git/rapidjson
36+
RUN git clone --no-checkout https://github.com/Tencent/rapidjson
37+
RUN cd rapidjson && git checkout 24b5e7a8b27f42fa16b96fc70aade9106cf7102f && git submodule update --init --recursive
38+
RUN cd rapidjson && cmake . -DRAPIDJSON_BUILD_EXAMPLES=OFF -DRAPIDJSON_BUILD_TESTS=OFF && cmake --build . --parallel --target install && rm -rf /git/rapidjson

devops/docker/debian-10-amd64/Dockerfile

+3-2
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,6 @@ RUN git clone https://github.com/google/googletest --recursive -b release-1.10.0
2828
RUN cd googletest && cmake . -G Ninja && cmake --build . --target install && rm -rf /git/googletest
2929

3030
# rapidjson
31-
RUN git clone https://github.com/Tencent/rapidjson --recursive
32-
RUN cd rapidjson && cmake . -G Ninja && cmake --build . --target install && rm -rf /git/rapidjson
31+
RUN git clone --no-checkout https://github.com/Tencent/rapidjson
32+
RUN cd rapidjson && git checkout 24b5e7a8b27f42fa16b96fc70aade9106cf7102f && git submodule update --init --recursive
33+
RUN cd rapidjson && cmake . -DRAPIDJSON_BUILD_EXAMPLES=OFF -DRAPIDJSON_BUILD_TESTS=OFF && cmake --build . --parallel --target install && rm -rf /git/rapidjson

devops/docker/debian-10-arm/Dockerfile

-34
This file was deleted.

devops/docker/debian-10-arm64/Dockerfile

-34
This file was deleted.

devops/docker/debian-11-amd64/Dockerfile

+3-2
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,6 @@ RUN git clone https://github.com/google/googletest --recursive -b release-1.10.0
2929
RUN cd googletest && cmake . -G Ninja && cmake --build . --target install && rm -rf /git/googletest
3030

3131
# rapidjson
32-
RUN git clone https://github.com/Tencent/rapidjson --recursive
33-
RUN cd rapidjson && cmake . -G Ninja && cmake --build . --target install && rm -rf /git/rapidjson
32+
RUN git clone --no-checkout https://github.com/Tencent/rapidjson
33+
RUN cd rapidjson && git checkout 24b5e7a8b27f42fa16b96fc70aade9106cf7102f && git submodule update --init --recursive
34+
RUN cd rapidjson && cmake . -DRAPIDJSON_BUILD_EXAMPLES=OFF -DRAPIDJSON_BUILD_TESTS=OFF && cmake --build . --parallel --target install && rm -rf /git/rapidjson

devops/docker/debian-11-arm/Dockerfile

-35
This file was deleted.

devops/docker/debian-11-arm64/Dockerfile

-35
This file was deleted.

devops/docker/debian-12-arm64/Dockerfile

-34
This file was deleted.

devops/docker/debian-9-amd64/Dockerfile

+11-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
FROM debian:stretch
22
ARG DEBIAN_FRONTEND=noninteractive
3+
4+
# debian-9 is EOL, update sources.list to use snapshot.debian.org mirrors
5+
RUN cat <<EOF > /etc/apt/sources.list
6+
deb [check-valid-until=no] http://snapshot.debian.org/archive/debian/20220622T000000Z stretch main
7+
deb [check-valid-until=no] http://snapshot.debian.org/archive/debian-security/20220622T000000Z stretch/updates main
8+
deb [check-valid-until=no] http://snapshot.debian.org/archive/debian/20220622T000000Z stretch-updates main
9+
EOF
10+
311
RUN apt -y update && apt-get -y install software-properties-common
412
RUN apt -y update && apt-get -y install \
513
git \
@@ -28,5 +36,6 @@ RUN git clone https://github.com/google/googletest --recursive -b release-1.10.0
2836
RUN cd googletest && cmake . -G Ninja && cmake --build . --target install && rm -rf /git/googletest
2937

3038
# rapidjson
31-
RUN git clone https://github.com/Tencent/rapidjson --recursive
32-
RUN cd rapidjson && cmake . -G Ninja && cmake --build . --target install && rm -rf /git/rapidjson
39+
RUN git clone --no-checkout https://github.com/Tencent/rapidjson
40+
RUN cd rapidjson && git checkout 24b5e7a8b27f42fa16b96fc70aade9106cf7102f && git submodule update --init --recursive
41+
RUN cd rapidjson && cmake . -DRAPIDJSON_BUILD_EXAMPLES=OFF -DRAPIDJSON_BUILD_TESTS=OFF && cmake --build . --parallel --target install && rm -rf /git/rapidjson

devops/docker/debian-9-arm/Dockerfile

-34
This file was deleted.

devops/docker/debian-9-arm64/Dockerfile

-34
This file was deleted.

devops/docker/oraclelinux-7-amd64/Dockerfile

+3-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ RUN git clone https://github.com/Kitware/CMake --recursive -b v3.21.7
2020
RUN cd CMake && ./bootstrap && make -j$(nproc) && make install && hash -r && rm -rf /git/CMake
2121

2222
# rapidjson
23-
RUN git clone https://github.com/Tencent/rapidjson --recursive -b v1.1.0
24-
RUN cd rapidjson && cmake -DRAPIDJSON_BUILD_TESTS=0 . && cmake --build . --parallel --target install && rm -rf /git/rapidjson
23+
RUN git clone --no-checkout https://github.com/Tencent/rapidjson
24+
RUN cd rapidjson && git checkout 24b5e7a8b27f42fa16b96fc70aade9106cf7102f && git submodule update --init --recursive
25+
RUN cd rapidjson && cmake . -DRAPIDJSON_BUILD_EXAMPLES=OFF -DRAPIDJSON_BUILD_TESTS=OFF && cmake --build . --parallel --target install && rm -rf /git/rapidjson
2526

2627
# GTest
2728
RUN git clone https://github.com/google/googletest --recursive -b release-1.10.0

0 commit comments

Comments
 (0)