Skip to content

'stddef.h' file not found in v13 and v14 #25 #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions .github/workflows/build-test-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,17 @@ jobs:
- name: Get changed files
id: changed-files
uses: tj-actions/[email protected]
- name: build-test-publish
- name: Build & Test (Publish)
run: |
docker login -u=${{ secrets.DOCKER_USERNAME }} -p=${{ secrets.DOCKER_PASSWORD }}
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
if [[ "$file" == *"Dockerfile" ]]; then
set -e
echo "start to build ..."
make build FILE=$file
docker images

echo "start to test ..."
tag=`dirname $file`
if [ $tag == "all" ]; then
versions="14 13 12 11 10 9 8"
Expand All @@ -36,6 +40,10 @@ jobs:
docker run clang-tools:$tag clang-format --version | grep -E clang-format.*$tag
docker run clang-tools:$tag clang-tidy --version | grep "LLVM version $tag"
fi
make publish FILE=$file

if [[ $GITHUB_EVENT_NAME == 'push' ]]; then
echo "start to publish ..."
make publish FILE=$file
fi
fi
done
9 changes: 6 additions & 3 deletions 13/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,19 @@ ENV PACKAGE_URL="https://github.com/llvm/llvm-project/releases/download/llvmorg-
WORKDIR /tmp

RUN apt-get update \
&& apt-get install -y xz-utils wget \
&& apt-get install --no-install-recommends -y xz-utils \
&& apt-get install -y wget \
&& wget --no-verbose $PACKAGE_URL \
&& tar -xvf $PACKAGE.tar.xz \
&& cp $PACKAGE/lib/clang/13.0.0/include/stddef.h /usr/include/ \
&& cp $PACKAGE/lib/clang/13.0.0/include/stdarg.h /usr/include/ \
&& cp $PACKAGE/bin/clang-format /usr/bin/clang-format \
&& cp $PACKAGE/bin/clang-tidy /usr/bin/clang-tidy \
&& rm -rf $PACKAGE $PACKAGE.tar.xz \
&& echo "--- Clang-format version ---" \
&& clang-format --version \
&& cp $PACKAGE/bin/clang-tidy /usr/bin/clang-tidy \
&& echo "--- Clang-tidy version ---" \
&& clang-tidy --version \
&& rm -rf $PACKAGE $PACKAGE.tar.xz \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /src
Expand Down
9 changes: 6 additions & 3 deletions 14/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,19 @@ ENV PACKAGE_URL="https://github.com/llvm/llvm-project/releases/download/llvmorg-
WORKDIR /tmp

RUN apt-get update \
&& apt-get install -y xz-utils wget \
&& apt-get install --no-install-recommends -y xz-utils \
&& apt-get install -y wget \
&& wget --no-verbose ${PACKAGE_URL} \
&& tar -xvf $PACKAGE.tar.xz --no-same-owner \
&& cp $PACKAGE/lib/clang/14.0.0/include/stddef.h /usr/include/ \
&& cp $PACKAGE/lib/clang/14.0.0/include/stdarg.h /usr/include/ \
&& cp $PACKAGE/bin/clang-format /usr/bin/clang-format \
&& cp $PACKAGE/bin/clang-tidy /usr/bin/clang-tidy \
&& rm -rf $PACKAGE $PACKAGE.tar.xz \
&& echo "--- Clang-format version ---" \
&& clang-format --version \
&& cp $PACKAGE/bin/clang-tidy /usr/bin/clang-tidy \
&& echo "--- Clang-tidy version ---" \
&& clang-tidy --version \
&& rm -rf $PACKAGE $PACKAGE.tar.xz \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /src
Expand Down
15 changes: 10 additions & 5 deletions all/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,31 @@ ENV CLANG14="clang+llvm-14.0.0-x86_64-linux-gnu-ubuntu-18.04"
ENV CLANG14_URL="https://github.com/llvm/llvm-project/releases/download/llvmorg-14.0.0/${CLANG14}.tar.xz"

RUN apt-get update \
&& apt-get install -y xz-utils wget \
&& for VERSION in ${VERSIONS}; do \
apt-get -y install clang-format-$VERSION clang-tidy-$VERSION; done \
apt-get --no-install-recommends -y install clang-format-$VERSION clang-tidy-$VERSION; done \
&& apt-get install --no-install-recommends -y xz-utils \
&& apt-get install -y wget \
&& wget --no-verbose $CLANG13_URL \
&& tar -xvf $CLANG13.tar.xz \
&& rm -rf $CLANG13.tar.xz \
&& cp $CLANG13/bin/clang-format /usr/bin/clang-format-13 \
&& cp $CLANG13/bin/clang-tidy /usr/bin/clang-tidy-13 \
&& cp $CLANG13/lib/clang/13.0.0/include/stddef.h /usr/include/ \
&& cp $CLANG13/lib/clang/13.0.0/include/stdarg.h /usr/include/ \
&& wget --no-verbose $CLANG14_URL \
&& tar -xvf $CLANG14.tar.xz --no-same-owner\
&& tar -xvf $CLANG14.tar.xz --no-same-owner \
&& rm -rf $CLANG14.tar.xz \
&& cp $CLANG14/bin/clang-format /usr/bin/clang-format-14 \
&& cp $CLANG14/bin/clang-tidy /usr/bin/clang-tidy-14 \
&& rm -rf $CLANG13 $CLANG13.tar.xz $CLANG14 $CLANG14.tar.xz \
&& rm -rf /var/lib/apt/lists/*

RUN ln -s /usr/bin/clang-format-$DEFAULT_VERSION /usr/bin/clang-format \
&& ln -s /usr/bin/clang-tidy-$DEFAULT_VERSION /usr/bin/clang-tidy \
&& echo "--- Clang-format version ---" \
&& clang-format --version \
&& ln -s /usr/bin/clang-tidy-$DEFAULT_VERSION /usr/bin/clang-tidy \
&& echo "--- Clang-tidy version ---" \
&& clang-tidy --version \
&& clang-tidy --version

WORKDIR /src

Expand Down