diff options
author | Orestis Floros <orestisflo@gmail.com> | 2021-11-02 23:12:27 +0100 |
---|---|---|
committer | Orestis Floros <orestisflo@gmail.com> | 2021-11-05 18:29:42 +0100 |
commit | 680ddc7e104e5f40d8e6be5054544918d881acae (patch) | |
tree | 55516f0e83d08d9a1398d7689c5bb2b2b62fc113 /.github | |
parent | 20d0591e77fb535773d2c2785a1bc8acee57d636 (diff) | |
download | i3-680ddc7e104e5f40d8e6be5054544918d881acae.tar.gz i3-680ddc7e104e5f40d8e6be5054544918d881acae.zip |
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)
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/main.yml | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e106776e..0bba6a04 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 |