From 4b0b7ec216ec1a1f337a3a37b2c514bcd6842629 Mon Sep 17 00:00:00 2001 From: rusty-snake <41237666+rusty-snake@users.noreply.github.com> Date: Sun, 29 Nov 2020 14:04:22 +0000 Subject: Update build.yml (#3779) * Update build.yml Currently we run all actions for all commits. This is not resource friendly. Let's tweak this a bit. This commit adds support for "skip ci" tags (i.e. if the head commit contains [s k i p c i] (w/o the extra spaces used to escape here), no jobs are executed. In addition are all commits which modify non-code files (e.g. README) only excluded. Furthermore we should not run cppcheck and scan-build if only profiles are changed and sort.py need only to be execute if profiles are changed. * Create sort.yml * Update build.yml profile-sort is now in sort.yml * Update sort.yml fix syntax * Update codeql-analysis.yml paths-ignore: - CONTRIBUTING.md - README - README.md - RELNOTES - SECURITY.md - 'etc/**' * Create build-extra.yml * Update build.yml * Update build-extra.yml --- .github/workflows/build-extra.yml | 52 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/build-extra.yml (limited to '.github/workflows/build-extra.yml') diff --git a/.github/workflows/build-extra.yml b/.github/workflows/build-extra.yml new file mode 100644 index 000000000..1468ef898 --- /dev/null +++ b/.github/workflows/build-extra.yml @@ -0,0 +1,52 @@ +name: Build-extra CI + +on: + push: + branches: [ master ] + paths-ignore: + - CONTRIBUTING.md + - README + - README.md + - RELNOTES + - SECURITY.md + - 'etc/**' + pull_request: + branches: [ master ] + paths-ignore: + - CONTRIBUTING.md + - README + - README.md + - RELNOTES + - SECURITY.md + - 'etc/**' + +jobs: + build-clang: + if: ${{ ! contains(github.event.commits[0].message, '[skip ci]') }} + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + - name: configure + run: CC=clang-10 ./configure --enable-fatal-warnings + - name: make + run: make + scan-build: + if: ${{ ! contains(github.event.commits[0].message, '[skip ci]') }} + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + - name: install clang-tools-10 + run: sudo apt-get install clang-tools-10 + - name: configure + run: CC=clang-10 ./configure --enable-fatal-warnings + - name: scan-build + run: NO_EXTRA_CFLAGS="yes" scan-build-10 --status-bugs make + cppcheck: + if: ${{ ! contains(github.event.commits[0].message, '[skip ci]') }} + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + - name: install cppcheck + run: sudo apt-get install cppcheck + - name: cppcheck + run: cppcheck -q --force --error-exitcode=1 --enable=warning,performance . -- cgit v1.2.3-54-g00ecf