File tree Expand file tree Collapse file tree 12 files changed +47
-51
lines changed Expand file tree Collapse file tree 12 files changed +47
-51
lines changed Original file line number Diff line number Diff line change 20
20
uses :
tj-actions/[email protected]
21
21
- name : Build & Test (Publish)
22
22
run : |
23
- docker login -u= ${{ secrets.DOCKER_USERNAME }} -p= ${{ secrets.DOCKER_PASSWORD }}
23
+ docker login -u ' ${{ secrets.DOCKER_USERNAME }}' -p ' ${{ secrets.DOCKER_PASSWORD }}'
24
24
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
25
25
if [[ "$file" == *"Dockerfile" ]]; then
26
26
set -e
@@ -32,10 +32,10 @@ jobs:
32
32
echo "start to test ..."
33
33
tag=`dirname $file`
34
34
if [ $tag == "all" ]; then
35
- versions ="14 13 12 11 10 9 8"
36
- for version in ${versions }; do
37
- docker run clang-tools:$tag clang-format-$version --version | grep -E "clang-format version $version "
38
- docker run clang-tools:$tag clang-tidy-$version --version | grep "LLVM version $version "
35
+ clang_versions ="14 13 12 11 10 9 8"
36
+ for clang_version in ${clang_versions }; do
37
+ docker run clang-tools:$tag clang-format-$clang_version --version | grep -E "clang-format version $clang_version "
38
+ docker run clang-tools:$tag clang-tidy-$clang_version --version | grep "LLVM version $clang_version "
39
39
done
40
40
elif [[ "$tag" == *"alpine"* ]]; then
41
41
docker run clang-tools:$tag clang-format --version | grep -E "clang-format version"
Original file line number Diff line number Diff line change 34
34
with :
35
35
image : xianpengshen/clang-tools:all
36
36
args : --severity-threshold=high --file=all/Dockerfile
37
- - name : Upload result to GitHub Code Scanning
38
- uses : github/codeql-action/upload-sarif@v1
39
- with :
40
- sarif_file : snyk.sarif
Original file line number Diff line number Diff line change 1
1
FROM ubuntu:20.04
2
2
3
- ENV VERSION 10
3
+ ENV CLANG_VERSION 10
4
4
5
5
RUN apt-get update \
6
- && apt-get --no-install-recommends -y install clang-format-$VERSION clang-tidy-$VERSION \
7
- && ln -s /usr/bin/clang-format-$VERSION /usr/bin/clang-format \
8
- && ln -s /usr/bin/clang-tidy-$VERSION /usr/bin/clang-tidy \
6
+ && apt-get --no-install-recommends -y install clang-format-$CLANG_VERSION clang-tidy-$CLANG_VERSION \
7
+ && ln -s /usr/bin/clang-format-$CLANG_VERSION /usr/bin/clang-format \
8
+ && ln -s /usr/bin/clang-tidy-$CLANG_VERSION /usr/bin/clang-tidy \
9
9
&& echo "--- Clang-format version ---" \
10
10
&& clang-format --version \
11
11
&& echo "--- Clang-tidy version ---" \
Original file line number Diff line number Diff line change 1
1
FROM ubuntu:20.04
2
2
3
- ENV VERSION 11
3
+ ENV CLANG_VERSION 11
4
4
5
5
RUN apt-get update \
6
- && apt-get --no-install-recommends -y install clang-format-$VERSION clang-tidy-$VERSION \
7
- && ln -s /usr/bin/clang-format-$VERSION /usr/bin/clang-format \
8
- && ln -s /usr/bin/clang-tidy-$VERSION /usr/bin/clang-tidy \
6
+ && apt-get --no-install-recommends -y install clang-format-$CLANG_VERSION clang-tidy-$CLANG_VERSION \
7
+ && ln -s /usr/bin/clang-format-$CLANG_VERSION /usr/bin/clang-format \
8
+ && ln -s /usr/bin/clang-tidy-$CLANG_VERSION /usr/bin/clang-tidy \
9
9
&& echo "--- Clang-format version ---" \
10
10
&& clang-format --version \
11
11
&& echo "--- Clang-tidy version ---" \
Original file line number Diff line number Diff line change 1
1
FROM ubuntu:20.04
2
2
3
- ENV VERSION 12
3
+ ENV CLANG_VERSION 12
4
4
5
5
RUN apt-get update \
6
- && apt-get --no-install-recommends -y install clang-format-$VERSION clang-tidy-$VERSION \
7
- && ln -s /usr/bin/clang-format-$VERSION /usr/bin/clang-format \
8
- && ln -s /usr/bin/clang-tidy-$VERSION /usr/bin/clang-tidy \
6
+ && apt-get --no-install-recommends -y install clang-format-$CLANG_VERSION clang-tidy-$CLANG_VERSION \
7
+ && ln -s /usr/bin/clang-format-$CLANG_VERSION /usr/bin/clang-format \
8
+ && ln -s /usr/bin/clang-tidy-$CLANG_VERSION /usr/bin/clang-tidy \
9
9
&& echo "--- Clang-format version ---" \
10
10
&& clang-format --version \
11
11
&& echo "--- Clang-tidy version ---" \
Original file line number Diff line number Diff line change 1
1
FROM ubuntu:20.04
2
2
3
- ENV VERSION 13
3
+ ENV CLANG_VERSION 13
4
4
5
5
RUN mv /etc/apt/sources.list /etc/apt/sources.list.focal
6
6
7
7
COPY sources.list.jammy /etc/apt/sources.list
8
8
9
9
RUN apt-get update \
10
- && apt-get --no-install-recommends -y install clang-format-$VERSION clang-tidy-$VERSION \
10
+ && apt-get --no-install-recommends -y install clang-format-$CLANG_VERSION clang-tidy-$CLANG_VERSION \
11
11
&& mv /etc/apt/sources.list.focal /etc/apt/sources.list \
12
- && ln -s /usr/bin/clang-format-$VERSION /usr/bin/clang-format \
13
- && ln -s /usr/bin/clang-tidy-$VERSION /usr/bin/clang-tidy \
12
+ && ln -s /usr/bin/clang-format-$CLANG_VERSION /usr/bin/clang-format \
13
+ && ln -s /usr/bin/clang-tidy-$CLANG_VERSION /usr/bin/clang-tidy \
14
14
&& echo "--- Clang-format version ---" \
15
15
&& clang-format --version \
16
16
&& echo "--- Clang-tidy version ---" \
Original file line number Diff line number Diff line change 1
1
FROM ubuntu:20.04
2
2
3
- ENV VERSION 14
3
+ ENV CLANG_VERSION 14
4
4
5
5
RUN mv /etc/apt/sources.list /etc/apt/sources.list.focal
6
6
7
7
COPY sources.list.jammy /etc/apt/sources.list
8
8
9
9
RUN apt-get update \
10
- && apt-get --no-install-recommends -y install clang-format-$VERSION clang-tidy-$VERSION \
10
+ && apt-get --no-install-recommends -y install clang-format-$CLANG_VERSION clang-tidy-$CLANG_VERSION \
11
11
&& mv /etc/apt/sources.list.focal /etc/apt/sources.list \
12
- && ln -s /usr/bin/clang-format-$VERSION /usr/bin/clang-format \
13
- && ln -s /usr/bin/clang-tidy-$VERSION /usr/bin/clang-tidy \
12
+ && ln -s /usr/bin/clang-format-$CLANG_VERSION /usr/bin/clang-format \
13
+ && ln -s /usr/bin/clang-tidy-$CLANG_VERSION /usr/bin/clang-tidy \
14
14
&& echo "--- Clang-format version ---" \
15
15
&& clang-format --version \
16
16
&& echo "--- Clang-tidy version ---" \
Original file line number Diff line number Diff line change 1
1
FROM ubuntu:20.04
2
2
3
- ENV VERSION 6.0
3
+ ENV CLANG_VERSION 6.0
4
4
5
5
RUN apt-get update \
6
- && apt-get --no-install-recommends -y install clang-format-$VERSION clang-tidy-$VERSION \
7
- && ln -s /usr/bin/clang-format-$VERSION /usr/bin/clang-format \
8
- && ln -s /usr/bin/clang-tidy-$VERSION /usr/bin/clang-tidy \
6
+ && apt-get --no-install-recommends -y install clang-format-$CLANG_VERSION clang-tidy-$CLANG_VERSION \
7
+ && ln -s /usr/bin/clang-format-$CLANG_VERSION /usr/bin/clang-format \
8
+ && ln -s /usr/bin/clang-tidy-$CLANG_VERSION /usr/bin/clang-tidy \
9
9
&& echo "--- Clang-format version ---" \
10
10
&& clang-format --version \
11
11
&& echo "--- Clang-tidy version ---" \
Original file line number Diff line number Diff line change 1
1
FROM ubuntu:20.04
2
2
3
- ENV VERSION 7
3
+ ENV CLANG_VERSION 7
4
4
5
5
RUN apt-get update \
6
- && apt-get --no-install-recommends -y install clang-format-$VERSION clang-tidy-$VERSION \
7
- && ln -s /usr/bin/clang-format-$VERSION /usr/bin/clang-format \
8
- && ln -s /usr/bin/clang-tidy-$VERSION /usr/bin/clang-tidy \
6
+ && apt-get --no-install-recommends -y install clang-format-$CLANG_VERSION clang-tidy-$CLANG_VERSION \
7
+ && ln -s /usr/bin/clang-format-$CLANG_VERSION /usr/bin/clang-format \
8
+ && ln -s /usr/bin/clang-tidy-$CLANG_VERSION /usr/bin/clang-tidy \
9
9
&& echo "--- Clang-format version ---" \
10
10
&& clang-format --version \
11
11
&& echo "--- Clang-tidy version ---" \
Original file line number Diff line number Diff line change 1
1
FROM ubuntu:20.04
2
2
3
- ENV VERSION 8
3
+ ENV CLANG_VERSION 8
4
4
5
5
RUN apt-get update \
6
- && apt-get --no-install-recommends -y install clang-format-$VERSION clang-tidy-$VERSION \
7
- && ln -s /usr/bin/clang-format-$VERSION /usr/bin/clang-format \
8
- && ln -s /usr/bin/clang-tidy-$VERSION /usr/bin/clang-tidy \
6
+ && apt-get --no-install-recommends -y install clang-format-$CLANG_VERSION clang-tidy-$CLANG_VERSION \
7
+ && ln -s /usr/bin/clang-format-$CLANG_VERSION /usr/bin/clang-format \
8
+ && ln -s /usr/bin/clang-tidy-$CLANG_VERSION /usr/bin/clang-tidy \
9
9
&& echo "--- Clang-format version ---" \
10
10
&& clang-format --version \
11
11
&& echo "--- Clang-tidy version ---" \
Original file line number Diff line number Diff line change 1
1
FROM ubuntu:20.04
2
2
3
- ENV VERSION 9
3
+ ENV CLANG_VERSION 9
4
4
5
5
RUN apt-get update \
6
- && apt-get --no-install-recommends -y install clang-format-$VERSION clang-tidy-$VERSION \
7
- && ln -s /usr/bin/clang-format-$VERSION /usr/bin/clang-format \
8
- && ln -s /usr/bin/clang-tidy-$VERSION /usr/bin/clang-tidy \
6
+ && apt-get --no-install-recommends -y install clang-format-$CLANG_VERSION clang-tidy-$CLANG_VERSION \
7
+ && ln -s /usr/bin/clang-format-$CLANG_VERSION /usr/bin/clang-format \
8
+ && ln -s /usr/bin/clang-tidy-$CLANG_VERSION /usr/bin/clang-tidy \
9
9
&& echo "--- Clang-format version ---" \
10
10
&& clang-format --version \
11
11
&& echo "--- Clang-tidy version ---" \
Original file line number Diff line number Diff line change @@ -2,24 +2,24 @@ FROM ubuntu:20.04
2
2
3
3
ARG DEFAULT_VERSION=12
4
4
5
- ENV VERSIONS ="12 11 10 9 8"
5
+ ENV CLANG_VERSIONS ="12 11 10 9 8"
6
6
7
7
RUN apt-get update \
8
- && for VERSION in ${VERSIONS }; do \
9
- apt-get --no-install-recommends -y install clang-format-$VERSION clang-tidy-$VERSION ; done \
8
+ && for CLANG_VERSION in ${CLANG_VERSIONS }; do \
9
+ apt-get --no-install-recommends -y install clang-format-$CLANG_VERSION clang-tidy-$CLANG_VERSION ; done \
10
10
&& rm -rf /var/lib/apt/lists/* \
11
11
&& ln -s /usr/bin/clang-format-$DEFAULT_VERSION /usr/bin/clang-format \
12
12
&& ln -s /usr/bin/clang-tidy-$DEFAULT_VERSION /usr/bin/clang-tidy \
13
13
&& mv /etc/apt/sources.list /etc/apt/sources.list.focal
14
14
15
- ENV VERSIONS ="14 13"
15
+ ENV CLANG_VERSIONS ="14 13"
16
16
17
17
# clang 13, 14 packages exist in jammy
18
18
COPY sources.list.jammy /etc/apt/sources.list
19
19
20
20
RUN apt-get update \
21
- && for VERSION in ${VERSIONS }; do \
22
- apt-get --no-install-recommends -y install clang-format-$VERSION clang-tidy-$VERSION ; done \
21
+ && for CLANG_VERSION in ${CLANG_VERSIONS }; do \
22
+ apt-get --no-install-recommends -y install clang-format-$CLANG_VERSION clang-tidy-$CLANG_VERSION ; done \
23
23
&& mv /etc/apt/sources.list.focal /etc/apt/sources.list \
24
24
&& rm -rf /var/lib/apt/lists/* \
25
25
&& echo "--- Clang-format version ---" \
You can’t perform that action at this time.
0 commit comments