Move clang-format, safe-wrappers, release notes check in new job
Benefits: - Faster feedback in case of error - More checks run in parallel - Removes stuff from Dockerfiles - Uses newest available clang-format (in ubuntu repos)
This commit is contained in:
parent
20d0591e77
commit
680ddc7e10
22
.github/workflows/main.yml
vendored
22
.github/workflows/main.yml
vendored
@ -25,8 +25,6 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: git fetch --prune --unshallow
|
||||
- name: check & print release notes
|
||||
run: ./release-notes/generator.pl
|
||||
- name: construct container name
|
||||
run: |
|
||||
echo "BASENAME=i3wm/travis-base:$(date +'%Y-%m')-$(./travis/ha.sh travis/travis-base.Dockerfile)" >> $GITHUB_ENV
|
||||
@ -47,12 +45,6 @@ jobs:
|
||||
echo "::group::Ubuntu i386"
|
||||
./travis/skip-pkg.sh || docker pull ${{ env.BASENAME_UBUNTU_386 }} || ./travis/docker-build-and-push.sh ${{ env.BASENAME_UBUNTU_386 }} travis/travis-base-ubuntu-386.Dockerfile
|
||||
echo "::endgroup::"
|
||||
- name: verify safe wrapper functions are used
|
||||
run: |
|
||||
docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 ${{ env.BASENAME }} ./travis/check-safe-wrappers.sh
|
||||
- name: verify code formatting
|
||||
run: |
|
||||
docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 ${{ env.BASENAME }} ./travis/check-formatting.sh
|
||||
- name: build i3
|
||||
run: |
|
||||
docker run -v $PWD:/usr/src/i3/ -w /usr/src/i3 -e CC ${{ env.BASENAME }} /bin/sh -c 'rm -rf build; mkdir -p build && cd build && CFLAGS="-Wformat -Wformat-security -Wextra -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Werror -fno-common" meson .. -Ddocs=true -Dmans=true -Db_sanitize=address && ninja -v'
|
||||
@ -94,3 +86,17 @@ jobs:
|
||||
- name: push docs to GitHub pages
|
||||
run: |
|
||||
./travis/skip-pkg.sh || travis/deploy-github-pages.sh
|
||||
formatting:
|
||||
name: Check formatting
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: check & print release notes
|
||||
run: ./release-notes/generator.pl
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get install -y clang-format-10
|
||||
- name: Check formatting
|
||||
run: clang-format-10 --dry-run --Werror $(git ls-files '*.c' '*.h')
|
||||
- name: Verify safe wrapper functions are used
|
||||
run: ./travis/check-safe-wrappers.sh
|
||||
|
@ -1,6 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
clang-format-9 -i $(find . -name "*.[ch]" | tr '\n' ' ') && git diff --exit-code || (echo 'Code was not formatted using clang-format!'; false)
|
@ -13,12 +13,11 @@ RUN echo 'APT::Acquire::Retries "5";' > /etc/apt/apt.conf.d/80retry
|
||||
# (3608 kB/s)). Hence, let’s stick with httpredir.debian.org (default) for now.
|
||||
|
||||
# Install mk-build-deps (for installing the i3 build dependencies),
|
||||
# clang and clang-format-9 (for checking formatting and building with clang),
|
||||
# lintian (for checking spelling errors),
|
||||
RUN linux32 apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||
dpkg-dev devscripts git equivs \
|
||||
build-essential clang clang-format-9 \
|
||||
build-essential clang \
|
||||
lintian && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
@ -13,12 +13,11 @@ RUN echo 'APT::Acquire::Retries "5";' > /etc/apt/apt.conf.d/80retry
|
||||
# (3608 kB/s)). Hence, let’s stick with httpredir.debian.org (default) for now.
|
||||
|
||||
# Install mk-build-deps (for installing the i3 build dependencies),
|
||||
# clang and clang-format-9 (for checking formatting and building with clang),
|
||||
# lintian (for checking spelling errors),
|
||||
RUN linux32 apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||
dpkg-dev devscripts git equivs \
|
||||
build-essential clang clang-format-9 \
|
||||
build-essential clang \
|
||||
lintian && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
@ -13,13 +13,12 @@ RUN echo 'APT::Acquire::Retries "5";' > /etc/apt/apt.conf.d/80retry
|
||||
# (3608 kB/s)). Hence, let’s stick with httpredir.debian.org (default) for now.
|
||||
|
||||
# Install mk-build-deps (for installing the i3 build dependencies),
|
||||
# clang and clang-format-9 (for checking formatting and building with clang),
|
||||
# lintian (for checking spelling errors),
|
||||
# test suite dependencies (for running tests)
|
||||
RUN apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||
dpkg-dev devscripts git equivs \
|
||||
build-essential clang clang-format-9 \
|
||||
build-essential clang \
|
||||
lintian && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
@ -11,13 +11,12 @@ RUN echo 'APT::Acquire::Retries "5";' > /etc/apt/apt.conf.d/80retry
|
||||
# (3608 kB/s)). Hence, let’s stick with httpredir.debian.org (default) for now.
|
||||
|
||||
# Install mk-build-deps (for installing the i3 build dependencies),
|
||||
# clang and clang-format-9 (for checking formatting and building with clang),
|
||||
# lintian (for checking spelling errors),
|
||||
# test suite dependencies (for running tests)
|
||||
RUN apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||
dpkg-dev devscripts git equivs \
|
||||
build-essential clang clang-format-9 \
|
||||
build-essential clang \
|
||||
lintian \
|
||||
libmodule-install-perl libanyevent-perl libextutils-pkgconfig-perl xcb-proto cpanminus xvfb xserver-xephyr xauth libinline-perl libinline-c-perl libxml-simple-perl libmouse-perl libmousex-nativetraits-perl libextutils-depends-perl perl libtest-deep-perl libtest-exception-perl libxml-parser-perl libtest-simple-perl libtest-fatal-perl libdata-dump-perl libtest-differences-perl libxml-tokeparser-perl libipc-run-perl libxcb-xtest0-dev libx11-xcb-perl libjson-xs-perl x11-xserver-utils && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
Loading…
Reference in New Issue
Block a user