diff options
author | Austin S. Hemmelgarn <austin@netdata.cloud> | 2020-11-06 07:06:30 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-06 07:06:30 -0500 |
commit | fddc8510887eadec5fdfd744f80677874f0d313d (patch) | |
tree | e7855c51014e002b40753f4c7e986be20cbdfde1 /.github | |
parent | 9d24ef483b15c55327c3b66acc6df74001f16c03 (diff) |
Fixed builds using particular versions of Clang. (#10155)
* Add a CI check for building against Clang
* Fix CFLAGS for libmosquitto/libwebsockets so builds work with Clang
* Add fixes for libbpf, judy, and JSON-C.
Co-authored-by: James Mills <prologic@shortcircuit.net.au>
Diffstat (limited to '.github')
-rw-r--r-- | .github/dockerfiles/Dockerfile.clang | 18 | ||||
-rw-r--r-- | .github/workflows/checks.yml | 9 |
2 files changed, 27 insertions, 0 deletions
diff --git a/.github/dockerfiles/Dockerfile.clang b/.github/dockerfiles/Dockerfile.clang new file mode 100644 index 0000000000..62bb019414 --- /dev/null +++ b/.github/dockerfiles/Dockerfile.clang @@ -0,0 +1,18 @@ +FROM debian:buster AS build + +# Disable apt/dpkg interactive mode +ENV DEBIAN_FRONTEND=noninteractive + +# Install all build dependencies +COPY packaging/installer/install-required-packages.sh /tmp/install-required-packages.sh +RUN /tmp/install-required-packages.sh --dont-wait --non-interactive netdata-all + +# Install Clang and set as default CC +RUN apt-get install -y clang && \ + update-alternatives --install /usr/bin/cc cc /usr/bin/clang 100 + +WORKDIR /netdata +COPY . . + +# Build Netdata +RUN ./netdata-installer.sh --dont-wait --dont-start-it --disable-go --require-cloud diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 6cafe2587e..29e2ca5336 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -53,6 +53,15 @@ jobs: autoreconf -ivf; ./configure; make;' + clang-checks: + name: Clang + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Build + run: | + docker build -f .github/dockerfiles/Dockerfile.clang . dist-checks: name: Dist runs-on: ubuntu-latest |