diff options
author | 2020-11-29 14:04:22 +0000 | |
---|---|---|
committer | 2020-11-29 14:04:22 +0000 | |
commit | 4b0b7ec216ec1a1f337a3a37b2c514bcd6842629 (patch) | |
tree | bb9c139f63e47dc2d6cd8c30f4369f5f7ce19128 /.github/workflows/build.yml | |
parent | Fix building C# projects in Godot (#3778) (diff) | |
download | firejail-4b0b7ec216ec1a1f337a3a37b2c514bcd6842629.tar.gz firejail-4b0b7ec216ec1a1f337a3a37b2c514bcd6842629.tar.zst firejail-4b0b7ec216ec1a1f337a3a37b2c514bcd6842629.zip |
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
Diffstat (limited to '.github/workflows/build.yml')
-rw-r--r-- | .github/workflows/build.yml | 45 |
1 files changed, 13 insertions, 32 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 71cb7f0b4..99b8a3be5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml | |||
@@ -3,11 +3,24 @@ name: Build CI | |||
3 | on: | 3 | on: |
4 | push: | 4 | push: |
5 | branches: [ master ] | 5 | branches: [ master ] |
6 | paths-ignore: | ||
7 | - CONTRIBUTING.md | ||
8 | - README | ||
9 | - README.md | ||
10 | - RELNOTES | ||
11 | - SECURITY.md | ||
6 | pull_request: | 12 | pull_request: |
7 | branches: [ master ] | 13 | branches: [ master ] |
14 | paths-ignore: | ||
15 | - CONTRIBUTING.md | ||
16 | - README | ||
17 | - README.md | ||
18 | - RELNOTES | ||
19 | - SECURITY.md | ||
8 | 20 | ||
9 | jobs: | 21 | jobs: |
10 | build_and_test: | 22 | build_and_test: |
23 | if: ${{ ! contains(github.event.commits[0].message, '[skip ci]') }} | ||
11 | runs-on: ubuntu-20.04 | 24 | runs-on: ubuntu-20.04 |
12 | steps: | 25 | steps: |
13 | - uses: actions/checkout@v2 | 26 | - uses: actions/checkout@v2 |
@@ -21,35 +34,3 @@ jobs: | |||
21 | run: sudo make install | 34 | run: sudo make install |
22 | - name: run tests | 35 | - name: run tests |
23 | run: SHELL=/bin/bash make test-github | 36 | run: SHELL=/bin/bash make test-github |
24 | build-clang: | ||
25 | runs-on: ubuntu-20.04 | ||
26 | steps: | ||
27 | - uses: actions/checkout@v2 | ||
28 | - name: configure | ||
29 | run: CC=clang-10 ./configure --enable-fatal-warnings | ||
30 | - name: make | ||
31 | run: make | ||
32 | scan-build: | ||
33 | runs-on: ubuntu-20.04 | ||
34 | steps: | ||
35 | - uses: actions/checkout@v2 | ||
36 | - name: install clang-tools-10 | ||
37 | run: sudo apt-get install clang-tools-10 | ||
38 | - name: configure | ||
39 | run: CC=clang-10 ./configure --enable-fatal-warnings | ||
40 | - name: scan-build | ||
41 | run: NO_EXTRA_CFLAGS="yes" scan-build-10 --status-bugs make | ||
42 | cppcheck: | ||
43 | runs-on: ubuntu-20.04 | ||
44 | steps: | ||
45 | - uses: actions/checkout@v2 | ||
46 | - name: install cppcheck | ||
47 | run: sudo apt-get install cppcheck | ||
48 | - name: cppcheck | ||
49 | run: cppcheck -q --force --error-exitcode=1 --enable=warning,performance . | ||
50 | profile-sort: | ||
51 | runs-on: ubuntu-20.04 | ||
52 | steps: | ||
53 | - uses: actions/checkout@v2 | ||
54 | - name: check profiles | ||
55 | run: ./contrib/sort.py etc/*/{*.inc,*.net,*.profile} | ||