forked from subsurface/subsurface
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CICD: Add Check for Changes in the Supported Dive Computer Lists.
Add a check that will fail whenever there is a change in the list of supported dive computers in libdivecomputer that is not reflected in the `SupportedDivecomputers.*` lists. Also add a script for a simplified update of these lists. From a discussion with @dirkh in subsurface/libdc#71 (comment). Signed-off-by: Michael Keller <[email protected]>
- Loading branch information
Showing
2 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Check the Supported Dive Computer Lists | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- libdivdcomputer/src/descriptor.c | ||
- SupportedDivecomputers.txt | ||
- SupportedDivecomputers.html | ||
- scripts | ||
pull_request: | ||
branches: | ||
- master | ||
paths: | ||
- libdivdcomputer/src/descriptor.c | ||
- SupportedDivecomputers.txt | ||
- SupportedDivecomputers.html | ||
- scripts | ||
|
||
jobs: | ||
check-divecomputer-lists: | ||
runs-on: ubuntu-24.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Check the Supported Dive Computer Lists | ||
run: | | ||
perl scripts/parse-descriptor.pl SupportedDivecomputers_new.txt | ||
diff -u SupportedDivecomputers.txt SupportedDivecomputers_new.txt | ||
TXT_EXIT_CODE=$? | ||
perl scripts/parse-descriptor.pl SupportedDivecomputers_new.html | ||
diff -u SupportedDivecomputers.html SupportedDivecomputers_new.html | ||
if [ $? -ne 0 -o $TXT_EXIT_CODE -ne 0 ] ; then | ||
echo "The list of supported dive computers in libdivecomputer has changed. Please run `scripts/update-supported-divecomputer-lists.sh` and commit the resulting changes." | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/bash | ||
|
||
# | ||
# Update the Lists of Supported Dive Computers Based | ||
# on the Information in the libdivecomputer Source Code | ||
# | ||
|
||
CONTAINER_NAME=subsurface-android-builder | ||
|
||
pushd . &> /dev/null | ||
cd "$(dirname "$0")/.." | ||
|
||
perl scripts/parse-descriptor.pl SupportedDivecomputers.html | ||
perl scripts/parse-descriptor.pl SupportedDivecomputers.txt | ||
|
||
popd &> /dev/null |