Skip to content

Commit fb8a0f5

Browse files
committed
Merge branch 'DaAwesomeP-GitHubActionsLint' into DaAwesomeP-GitHubActionsLint2
2 parents 66c662e + cee6919 commit fb8a0f5

7 files changed

Lines changed: 115 additions & 39 deletions

File tree

.github/workflows/annotation.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# GitHub Action to annotate some of our test tool results
2+
name: annotation
3+
on: [push, pull_request]
4+
jobs:
5+
flake8-annotation-python2:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@master
9+
- uses: actions/setup-python@v2
10+
with:
11+
python-version: '2.7'
12+
- name: Flake8 with annotations - Python 2
13+
# Using the flake8 options in the .flake8 file
14+
uses: TrueBrain/actions-flake8@main

.github/workflows/lint.yaml

Lines changed: 66 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,15 @@
11
name: lint
22
on: [push, pull_request]
33
jobs:
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 .
@@ -71,6 +54,62 @@ jobs:
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
@@ -90,6 +129,7 @@ jobs:
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

Makefile.am

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ CPP_LINT_FILES = $(shell find . \( -name "*.h" -or -name "*.cpp" \) -and ! \( \
259259
.PHONY : cpplint
260260
cpplint: Makefile.am
261261
if FOUND_CPPLINT
262-
cpplint --repository=. --filter=$(CPP_LINT_FILTER) $(CPP_LINT_FILES)
262+
cpplint --filter=$(CPP_LINT_FILTER) $(CPP_LINT_FILES)
263263
else
264-
$(error cpplint not found. Install cpplint via pip and re-run configure.)
264+
$(error cpplint not found. Install forked cpplint (e.g. via pip for the latest version) and re-run configure.)
265265
endif

NEWS

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,43 @@
1-
x/y/2022 ola-0.10.9
1+
x/y/2023 ola-0.10.9
22
Features:
3-
*
3+
* Further improvements on Python 3 compatibility #1506
4+
* Support for the JMS USB2DMX PRO V2.1 device via the FTDI plugin #1728
45

56
API:
67
* Python: Add a fetch current DMX example.
78

89
RDM Tests:
9-
*
10+
* Fix a longstanding bug in the GetMaxPacketSize RDM test around timeouts
1011

1112
Bugs:
1213
* Fix some tests not working on Big Endian machines because our RPC is encoded
1314
with native format and those tests used sample data from a Little Endian
1415
machine
1516
* Renamed EndpointNoticationEvent(sic) to EndpointNotificationEvent in the
1617
E1.33 EndpointManager code
18+
* Check if librt exists and add it to the build if required
19+
* Ensure we can build on later Protobuf and C++ and silence deprecation
20+
messages where required
21+
* Fix the NetBSD build
22+
* Clarify the usage of some of the various Enttec Open DMX USB plugins
23+
* Relax the timing on the ClientWrapperTest so it doesn't fail occasionally
24+
#1714
25+
* Correct the documentation of some existing limits in the E1.31 plugin
26+
* Fix some undefined behaviour in TimeoutManager::ExecuteTimeouts #1726
27+
* Fix UARTs on Debian Bullseye #1749
28+
* Fix Python version detection for versions > 3.9 #1755, #1780
29+
* Update Angular and Angular-Route versions used by the new web UI and add
30+
workaround to be compatible #1782 Debian #1016447
31+
* Significantly reduce the delay when using StreamingClient with EPoll and
32+
multiple universes #1793
1733

1834
Internal:
19-
*
35+
* Add more debugging so we can tell why setting the baud rate failed
36+
* Replace "currentThread" with "current_thread" in Python since the former has
37+
been deprecated
38+
* Fix lots more internal typos and grammar
39+
* Add unit tests for more of the Python RDM Test classes
40+
* Sort the Python imports with isort
2041

2142
22/11/2020 ola-0.10.8
2243
Features:

olad/www/mobile.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@
459459
</noscript>
460460

461461
<div id='footer'>
462-
OLA &copy; 2005-2020 Open Lighting Project<br/>
462+
OLA &copy; 2005-2023 Open Lighting Project<br/>
463463
<a href="ola.html">Full Version</a> - <a href="new/">New UI (Beta)</a>
464464
</div>
465465
</body>

olad/www/ola.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1026,7 +1026,7 @@ <h2 id="plugin_name"></h2>
10261026
</noscript>
10271027

10281028
<div id='footer'>
1029-
OLA &copy; 2005-2020 Open Lighting Project<br>
1029+
OLA &copy; 2005-2023 Open Lighting Project<br>
10301030
<a href="mobile.html">Mobile Version</a> - <a href="new/">New UI (Beta)</a>
10311031
</div>
10321032
</body>

scripts/enforce_licence.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python3
1+
#!/usr/bin/env python
22
# This program is free software; you can redistribute it and/or modify
33
# it under the terms of the GNU General Public License as published by
44
# the Free Software Foundation; either version 2 of the License, or
@@ -237,8 +237,8 @@ def GetDirectoryLicences(root_dir):
237237
lines = f.readlines()
238238
f.close()
239239
licences[dir_name] = TransformLicence(lines)
240-
rel_licence_path = "./" + os.path.relpath(licence_path)
241-
rel_dir_path = "./" + os.path.relpath(dir_name)
240+
rel_licence_path = os.path.relpath(licence_path)
241+
rel_dir_path = os.path.relpath(dir_name)
242242
print('debug:file:%s: Found LICENCE for directory %s' %
243243
(rel_licence_path, rel_dir_path))
244244

@@ -284,7 +284,7 @@ def CheckLicenceForFile(file_name, licence, lang, diff, fix):
284284
return 0
285285

286286
f = open(file_name)
287-
rel_path = "./" + os.path.relpath(file_name)
287+
rel_path = os.path.relpath(file_name)
288288
# + 1 to include the newline to have a complete line
289289
header_size = len(licence) + 1
290290
file_name_line_count = licence.count('\n') + 2
@@ -318,8 +318,8 @@ def CheckLicenceForFile(file_name, licence, lang, diff, fix):
318318
ReplaceHeader(file_name, licence, lang)
319319
return 1
320320
else:
321-
print("error:file:%s:lines 1-%s: File does not start with or not exact "
322-
"match of \"%s...\"" %
321+
print("error:file:%s:lines 1-%s: File does not start with, or not exact "
322+
"match of, \"%s...\"" %
323323
(rel_path, file_name_line_count,
324324
licence.split('\n')[(0 if (lang == PYTHON) else 1)]))
325325
if diff:

0 commit comments

Comments
 (0)