Skip to content

Commit 9f510d6

Browse files
Extra. Install Clang 9, Clang-Tidy and Clang-Format. Add more GTest with Clang.
1 parent 6da8e1e commit 9f510d6

File tree

13 files changed

+65
-1
lines changed

13 files changed

+65
-1
lines changed

extra/Dockerfile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,12 @@ RUN set -xe && \
6969
apt-get install -y --no-install-recommends libgtest-dev && \
7070
rm -rf /var/lib/apt/lists/*
7171

72+
# Clang, Clang-Format and Clang-Tidy
73+
RUN set -xe && \
74+
apt-get update -o Acquire::Check-Valid-Until=false && \
75+
apt-get install -y --no-install-recommends clang clang-tidy clang-format && \
76+
rm -rf /var/lib/apt/lists/*
77+
7278
COPY cron /etc/cron.d
7379
RUN set -xe && \
7480
apt-get update -o Acquire::Check-Valid-Until=false && \
@@ -80,4 +86,4 @@ COPY docker-entrypoint.sh /
8086
ENTRYPOINT ["/docker-entrypoint.sh"]
8187

8288
LABEL maintainer="Herman Zvonimir Došilović <[email protected]>"
83-
LABEL version="1.4.0-extra"
89+
LABEL version="1.5.0-extra"
File renamed without changes.

extra/tests/clang++-9/lang.properties

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
VERSIONS="9.0.1"
2+
NAME="C++ (Clang $VERSION)"
3+
SOURCE_FILE="main.cpp"
4+
BINARY_FILE="a.out"
5+
COMPILE_CMD="/usr/bin/clang++-9 $ARGS $SOURCE_FILE"
6+
RUN_CMD="./$BINARY_FILE $ARGS"

extra/tests/clang++-9/main.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#include <iostream>
2+
#include <string>
3+
4+
int main()
5+
{
6+
std::string name;
7+
std::cin >> name;
8+
std::cout << "hello, " << name << '\n';
9+
return 0;
10+
}
File renamed without changes.

extra/tests/clang-9/lang.properties

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
VERSIONS="9.0.1"
2+
NAME="C (Clang $VERSION)"
3+
SOURCE_FILE="main.c"
4+
BINARY_FILE="a.out"
5+
COMPILE_CMD="/usr/bin/clang-9 $ARGS $SOURCE_FILE"
6+
RUN_CMD="./$BINARY_FILE $ARGS"

extra/tests/clang-9/main.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#include <stdio.h>
2+
3+
int main()
4+
{
5+
char name[10];
6+
scanf("%s", name);
7+
printf("hello, %s\n", name);
8+
return 0;
9+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
VERSIONS="10.0.1"
2+
NAME="C++ Test (Clang $VERSION, Google Test 1.8.1)"
3+
SOURCE_FILE="main.cpp"
4+
BINARY_FILE="a.out"
5+
COMPILE_CMD="/usr/bin/clang++-10 $ARGS $SOURCE_FILE -lgtest -lgtest_main -lpthread"
6+
RUN_CMD="./$BINARY_FILE $ARGS"
7+
RUN_CMD_ISOLATE="GTEST_COLOR=no ./$BINARY_FILE $ARGS"

0 commit comments

Comments
 (0)