Skip to content

Commit

Permalink
travis: add clang-format test
Browse files Browse the repository at this point in the history
Signed-off-by: Giuseppe Scrivano <[email protected]>
  • Loading branch information
giuseppe committed Aug 25, 2020
1 parent 729ec35 commit ed40d38
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,16 @@ matrix:
env: TEST=coverity
- arch: amd64
env: TEST=alpine-build
- arch: amd64
env: TEST=clang-format
matrix:
- TEST=make-arm64
- TEST=make-amd64
- TEST=podman
- TEST=containerd
- TEST=oci-validation
- TEST=coverity
- TEST=clang-format
- TEST=alpine-build
global:
- COVERITY_SCAN_PROJECT_NAME="giuseppe/crun"
Expand Down Expand Up @@ -67,12 +70,14 @@ addons:
- go-md2man
- libsystemd-dev
- gperf
- clang-format
before_install:
- git submodule update --init --recursive
- if test $TEST = podman; then sudo docker build -t crun-podman tests/podman; fi
- if test $TEST = containerd; then sudo docker build -t crun-containerd tests/containerd; fi
- if test $TEST = oci-validation; then sudo docker build -t crun-oci-validation tests/oci-validation; fi
- if test $TEST = alpine-build; then sudo docker build -t crun-alpine-build tests/alpine-build; fi
- if test $TEST = clang-format; then sudo docker build -t crun-clang-format tests/clang-format; fi
- git clone --depth=1 git://github.com/lloyd/yajl
- "(cd yajl && ./configure -p /usr && make && sudo make install)"
# CRIU supports armhfp, aarch64, ppc64le, s390x and x86_64. The PPA has only packages for x86_64
Expand All @@ -86,3 +91,4 @@ script:
- if test $TEST = oci-validation; then sudo docker run --privileged --rm -v /sys/fs/cgroup:/sys/fs/cgroup:rw,rslave -v $(pwd):/crun crun-oci-validation; fi
- if test $TEST = coverity; then ./autogen.sh && eval "${COVERITY_SCAN_BUILD}"; fi
- if test $TEST = alpine-build; then sudo docker run --privileged --rm -v /sys/fs/cgroup:/sys/fs/cgroup:rw,rslave -v $(pwd):/crun crun-alpine-build; fi
- if test $TEST = clang-format; then ./autogen.sh && ./configure && sudo docker run --rm -w /crun -v $(pwd):/crun crun-clang-format make clang-format; fi
3 changes: 3 additions & 0 deletions tests/clang-format/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM fedora:latest

RUN yum install -y make clang-tools-extra 'dnf-command(builddep)' && dnf builddep -y crun

0 comments on commit ed40d38

Please sign in to comment.