11name : lint
22on : [push, pull_request]
33jobs :
4- check-licences :
5- name : Check Licences
6- runs-on : ubuntu-latest
7- steps :
8- - uses : actions/checkout@v3
9- - uses : actions/setup-python@v4
10- with :
11- python-version : ' 3.10'
12- - name : Enable Problem Matcher for GitHub annotations
13- run : echo "::add-matcher::.github/problem-matcher-lint-check-licences.json"
14- - name : Check licenses
15- shell : bash
16- run : ./scripts/enforce_licence.py
17- generic-nolints :
18- name : Count generic NOLINTs
19- runs-on : ubuntu-latest
20- steps :
21- - uses : actions/checkout@v3
22- - name : Enable Problem Matcher for GitHub annotations
23- run : echo "::add-matcher::.github/problem-matcher-lint-generic-nolints.json"
24- - name : Count the number of generic NOLINTs
25- shell : bash
26- run : ./scripts/count_generic_nolints.sh
274 build :
285 name : Build for Lint Tasks
296 runs-on : ubuntu-latest
307 container : debian:stable
318 steps :
329 - name : Update package database
3310 run : apt-get update -y
34- # See comments beginning at https://github.com/actions/runner/issues/763#issuecomment-1435474884
11+ # See comments beginning at
12+ # https://github.com/actions/runner/issues/763#issuecomment-1435474884
3513 # Without Git, actions/checkout@v3 will resort to REST and will not
3614 # create a .git folder or .git.config. The Problem Matcher looks for
3715 # .git/config to find where the root of the repo is, so it must be
@@ -58,10 +36,15 @@ jobs:
5836 run : autoreconf -i
5937 - name : Configure
6038 run : ./configure --enable-rdm-tests --enable-ja-rule --enable-e133
61- - name : Build
39+ - name : Build builtfiles
6240 run : make builtfiles VERBOSE=1
41+ - name : Display structure of the built files
42+ if : env.ACTIONS_STEP_DEBUG == 'true'
43+ run : ls -alR
6344 - name : Archive artifacts to speed up slow GH Actions upload/download
6445 shell : bash
46+ # If the file does not exist when tar excludes it, then it will not
47+ # actually exclude it, so it must first be touched
6548 run : |
6649 touch ola-debian-stable-built-source-tree.tar.gz
6750 tar --exclude=ola-debian-stable-built-source-tree.tar.gz -cvzf ola-debian-stable-built-source-tree.tar.gz .
7154 with :
7255 name : ola-debian-stable-built-source-tree
7356 path : ola-debian-stable-built-source-tree.tar.gz
57+ check-licences :
58+ name : Check Licences
59+ runs-on : ubuntu-latest
60+ container : debian:stable
61+ needs : build
62+ steps :
63+ - name : Download built source tree archive
64+ uses : actions/download-artifact@v3
65+ with :
66+ name : ola-debian-stable-built-source-tree
67+ path : .
68+ - name : SHA256 artifact archive
69+ run : sha256sum ola-debian-stable-built-source-tree.tar.gz
70+ - name : Unarchive artifacts and delete archive
71+ shell : bash
72+ run : |
73+ tar -xvzf ola-debian-stable-built-source-tree.tar.gz .
74+ rm ola-debian-stable-built-source-tree.tar.gz
75+ - name : Display structure of extracted files
76+ if : env.ACTIONS_STEP_DEBUG == 'true'
77+ run : ls -alR
78+ - name : Update package database
79+ run : apt-get update -y
80+ - name : Install Python
81+ run : apt-get -y install python3 python-is-python3
82+ - name : Enable Problem Matcher for GitHub annotations
83+ run : echo "::add-matcher::.github/problem-matcher-lint-check-licences.json"
84+ - name : Check licenses
85+ shell : bash
86+ run : ./scripts/enforce_licence.py
87+ generic-nolints :
88+ name : Count generic NOLINTs
89+ runs-on : ubuntu-latest
90+ container : debian:stable
91+ needs : build
92+ steps :
93+ - name : Download built source tree archive
94+ uses : actions/download-artifact@v3
95+ with :
96+ name : ola-debian-stable-built-source-tree
97+ path : .
98+ - name : SHA256 artifact archive
99+ run : sha256sum ola-debian-stable-built-source-tree.tar.gz
100+ - name : Unarchive artifacts and delete archive
101+ shell : bash
102+ run : |
103+ tar -xvzf ola-debian-stable-built-source-tree.tar.gz .
104+ rm ola-debian-stable-built-source-tree.tar.gz
105+ - name : Display structure of extracted files
106+ if : env.ACTIONS_STEP_DEBUG == 'true'
107+ run : ls -alR
108+ - name : Enable Problem Matcher for GitHub annotations
109+ run : echo "::add-matcher::.github/problem-matcher-lint-generic-nolints.json"
110+ - name : Count the number of generic NOLINTs
111+ shell : bash
112+ run : ./scripts/count_generic_nolints.sh
74113 cpplint :
75114 name : cpplint
76115 runs-on : ubuntu-latest
90129 tar -xvzf ola-debian-stable-built-source-tree.tar.gz .
91130 rm ola-debian-stable-built-source-tree.tar.gz
92131 - name : Display structure of extracted files
132+ if : env.ACTIONS_STEP_DEBUG == 'true'
93133 run : ls -alR
94134 - name : Update package database
95135 run : apt-get update -y
@@ -131,6 +171,7 @@ jobs:
131171 tar -xvzf ola-debian-stable-built-source-tree.tar.gz .
132172 rm ola-debian-stable-built-source-tree.tar.gz
133173 - name : Display structure of extracted files
174+ if : env.ACTIONS_STEP_DEBUG == 'true'
134175 run : ls -alR
135176 - name : Update package database
136177 run : apt-get update -y
0 commit comments