Skip to content

Commit b2bdf2b

Browse files
committed
Merge branch 'future3/develop' into future3/fix-docker-windows
2 parents 8722544 + 75743da commit b2bdf2b

File tree

153 files changed

+9478
-1481
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

153 files changed

+9478
-1481
lines changed

.dockerignore

+1
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ shared
1414
src/webapp/node_modules
1515
src/webapp/npm-debug.log
1616
src/webapp/build
17+
src/webapp/build.bak

.githooks/post-merge

+20-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# TO ACTIVATE: cp .githooks/post-merge .git/hooks/.
66
#
77
# Checks:
8-
# - Changes to web app
8+
# - Changes to Web App
99
# - Changes to web dependency
1010
# - Changes to python requirements
1111
#
@@ -20,7 +20,7 @@ warn_npm_dependency() {
2020
echo "************************************************************"
2121
echo "ATTENTION: npm dependencies have changed since last pull!"
2222
echo ""
23-
echo "To update dependencies and rebuilt WebApp run:"
23+
echo "To update dependencies and rebuilt Web App run:"
2424
echo "$ cd src/webapp && ./run_rebuild.sh -u"
2525
echo "************************************************************"
2626
echo -e "\n"
@@ -31,7 +31,7 @@ warn_webapp() {
3131
echo "************************************************************"
3232
echo "ATTENTION: Web App sources have changed since last pull!"
3333
echo ""
34-
echo "To rebuilt the WebApp run:"
34+
echo "To rebuilt the Web App run:"
3535
echo "$ cd src/webapp && ./run_rebuild.sh"
3636
echo "************************************************************"
3737
echo -e "\n"
@@ -43,6 +43,7 @@ warn_python_requirements() {
4343
echo "ATTENTION: Python requirements have changed since last pull!"
4444
echo ""
4545
echo "To update python requirements on the RPi run"
46+
echo "$ source .venv/bin/activate"
4647
echo "$ python -m pip install --upgrade -r requirements.txt"
4748
echo "************************************************************"
4849
echo -e "\n"
@@ -57,14 +58,25 @@ warn_githooks() {
5758
echo "$ cp .githooks/* .git/hooks/."
5859
echo "************************************************************"
5960
echo -e "\n"
61+
}
6062

63+
warn_installer() {
64+
echo -e "\n"
65+
echo "************************************************************"
66+
echo "ATTENTION: Installer sources have changed since last pull!"
67+
echo ""
68+
echo "Rerun the installer to apply changes"
69+
echo "$ ./installation/install-jukebox.sh"
70+
echo "************************************************************"
71+
echo -e "\n"
6172
}
6273

6374
# files_changed="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
6475
webapp_changed="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD src/webapp)"
6576
webapp_dep_changed="$(git diff --name-only --no-commit-id ORIG_HEAD HEAD src/webapp/package.json)"
6677
python_req_changed="$(git diff --name-only --no-commit-id ORIG_HEAD HEAD requirements.txt)"
6778
githooks_changed="$(git diff --name-only --no-commit-id ORIG_HEAD HEAD .githooks)"
79+
installer_changed="$(git diff --name-only --no-commit-id ORIG_HEAD HEAD installation)"
6880

6981
if [[ -n $python_req_changed ]]; then
7082
warn_python_requirements
@@ -80,5 +92,9 @@ if [[ -n $githooks_changed ]]; then
8092
warn_githooks
8193
fi
8294

95+
if [[ -n $installer_changed ]]; then
96+
warn_installer
97+
fi
98+
8399
echo -e "\nTo see a summary of what happened since your last pull, do:"
84-
echo -e "git show --oneline -s ORIG_HEAD..HEAD\n"
100+
echo -e "git show --oneline -s ORIG_HEAD..HEAD\n"

.githooks/pre-commit

+13-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# Checks
88
# - flake8 on staged python files
99
# Note: This only checks the modified files
10-
# - docs build of if any python file or any doc file is staged
10+
# - docs build of if any python file is staged
1111
# Note: This builds the entire documentation if a changed file goes into the documentation
1212
#
1313
# If there are problem with this script, commit may still be done with
@@ -28,6 +28,18 @@ fi
2828

2929
code=$(( flake8_code ))
3030

31+
doc_code=0
32+
if [[ -n $PY_FILES ]]; then
33+
echo -e "\n**************************************************************"
34+
echo -e "Modified Python source files. Generation markdown docs from docstring ... \n"
35+
echo -e "**************************************************************\n"
36+
./run_docgeneration.sh -c
37+
doc_code=$?
38+
echo "pydoc_markdown return code: $doc_code"
39+
fi
40+
41+
code=$(( flake8_code + doc_code ))
42+
3143
if [[ code -gt 0 ]]; then
3244
echo -e "\n**************************************************************"
3345
echo -e "ERROR(s) during pre-commit checks. Aborting commit!"
+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Build Web App
2+
description: 'Build Web App with Node'
3+
inputs:
4+
webapp-root-path:
5+
description: 'root path of the Web App sources'
6+
required: false
7+
default: './src/webapp'
8+
outputs:
9+
webapp-root-path:
10+
description: 'used root path of the Web App sources'
11+
value: ${{ inputs.webapp-root-path }}
12+
13+
runs:
14+
using: "composite"
15+
steps:
16+
- name: Setup Node.js 20.x
17+
uses: actions/setup-node@v3
18+
with:
19+
node-version: 20.x
20+
- name: run build
21+
working-directory: ${{ inputs.webapp-root-path }}
22+
shell: bash
23+
env:
24+
CI: false
25+
run: ./run_rebuild.sh -u

.github/workflows/bundle_webapp_and_release_v3.yml

+8-20
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Bundle Webapp and Release
1+
name: Bundle Web App and Release
22

33
on:
44
push:
@@ -18,7 +18,7 @@ jobs:
1818
check_abort: ${{ steps.vars.outputs.check_abort }}
1919

2020
steps:
21-
- uses: actions/checkout@v3
21+
- uses: actions/checkout@v4
2222

2323
- name: Set Output vars
2424
id: vars
@@ -72,9 +72,6 @@ jobs:
7272
if: ${{ needs.check.outputs.check_abort == 'false' }}
7373
runs-on: ubuntu-latest
7474

75-
env:
76-
WEBAPP_ROOT_PATH: ./src/webapp
77-
7875
outputs:
7976
tag_name: ${{ needs.check.outputs.tag_name }}
8077
release_type: ${{ needs.check.outputs.release_type }}
@@ -83,7 +80,7 @@ jobs:
8380
webapp_bundle_name_latest: ${{ steps.vars.outputs.webapp_bundle_name_latest }}
8481

8582
steps:
86-
- uses: actions/checkout@v3
83+
- uses: actions/checkout@v4
8784

8885
- name: Set Output vars
8986
id: vars
@@ -94,29 +91,20 @@ jobs:
9491
echo "webapp_bundle_name=webapp-build-${COMMIT_SHA:0:10}.tar.gz" >> $GITHUB_OUTPUT
9592
echo "webapp_bundle_name_latest=webapp-build-latest.tar.gz" >> $GITHUB_OUTPUT
9693
97-
- name: Setup Node.js 20.x
98-
uses: actions/setup-node@v3
99-
with:
100-
node-version: 20.x
101-
- name: npm install
102-
working-directory: ${{ env.WEBAPP_ROOT_PATH }}
103-
run: npm install
104-
- name: npm build
105-
working-directory: ${{ env.WEBAPP_ROOT_PATH }}
106-
env:
107-
CI: false
108-
run: npm run build
94+
- name: Build Web App
95+
id: build-webapp
96+
uses: ./.github/actions/build-webapp
10997

11098
- name: Create Bundle
111-
working-directory: ${{ env.WEBAPP_ROOT_PATH }}
99+
working-directory: ${{ steps.build-webapp.outputs.webapp-root-path }}
112100
run: |
113101
tar -czvf ${{ steps.vars.outputs.webapp_bundle_name }} build
114102
115103
- name: Artifact Upload
116104
uses: actions/upload-artifact@v3
117105
with:
118106
name: ${{ steps.vars.outputs.webapp_bundle_name }}
119-
path: ${{ env.WEBAPP_ROOT_PATH }}/${{ steps.vars.outputs.webapp_bundle_name }}
107+
path: ${{ steps.build-webapp.outputs.webapp-root-path }}/${{ steps.vars.outputs.webapp_bundle_name }}
120108
retention-days: 5
121109

122110
release:

.github/workflows/codeql-analysis_v3.yml

+3
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ jobs:
4545
run: |
4646
# Install necessary packages
4747
sudo apt-get install libasound2-dev pulseaudio
48+
python3 -m venv .venv
49+
source ".venv/bin/activate"
50+
4851
python -m pip install --upgrade pip
4952
pip install -r requirements.txt
5053
# Set the `CODEQL-PYTHON` environment variable to the Python executable

.github/workflows/pythonpackage_future3.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ jobs:
3131
run: |
3232
sudo apt-get update
3333
sudo apt-get install -y libasound2-dev pulseaudio
34+
python3 -m venv .venv
35+
source ".venv/bin/activate"
36+
3437
python3 -m pip install --upgrade pip
3538
pip3 install -r requirements.txt
3639
# For operation of the Jukebox, ZMQ must be compiled from sources due to Websocket support
@@ -51,7 +54,6 @@ jobs:
5154
parallel: true
5255
- name: Lint with flake8
5356
run: |
54-
pip3 install flake8
5557
# Stop the build if linting fails
5658
./run_flake8.sh
5759
+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Test Build Web App v3
2+
3+
on:
4+
schedule:
5+
# run at 18:00 every sunday
6+
- cron: '0 18 * * 0'
7+
push:
8+
branches:
9+
- 'future3/**'
10+
paths:
11+
- '.github/workflows/test_build_webapp_v3.yml'
12+
- '.github/actions/build-webapp/**'
13+
- 'src/webapp/**'
14+
pull_request:
15+
# The branches below must be a subset of the branches above
16+
branches:
17+
- future3/develop
18+
- future3/main
19+
paths:
20+
- '.github/workflows/test_build_webapp_v3.yml'
21+
- '.github/actions/build-webapp/**'
22+
- 'src/webapp/**'
23+
24+
jobs:
25+
26+
build:
27+
runs-on: ubuntu-latest
28+
29+
steps:
30+
- uses: actions/checkout@v4
31+
32+
- name: Build Web App
33+
uses: ./.github/actions/build-webapp

.github/workflows/test_docker_debian_codename_sub_v3.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Subworkflow Test Install Scripts Debian V3
1+
name: Subworkflow Test Install Scripts Debian v3
22

33
on:
44
workflow_call:
@@ -46,6 +46,7 @@ jobs:
4646
cache_key: ${{ steps.vars.outputs.cache_key }}
4747
image_file_name: ${{ steps.vars.outputs.image_file_name }}
4848
image_tag_name: ${{ steps.vars.outputs.image_tag_name }}
49+
docker_run_options: ${{ steps.vars.outputs.docker_run_options }}
4950

5051
# create local docker registry to use locally build images
5152
services:
@@ -83,13 +84,17 @@ jobs:
8384
id: vars
8485
env:
8586
LOCAL_REGISTRY_PORT: ${{ inputs.local_registry_port }}
87+
PLATFORM: ${{ inputs.platform }}
8688
run: |
8789
echo "image_tag_name=${{ steps.pre-vars.outputs.image_tag_name }}" >> $GITHUB_OUTPUT
8890
echo "image_tag_name_local_base=localhost:${{ env.LOCAL_REGISTRY_PORT }}/${{ steps.pre-vars.outputs.image_tag_name }}-base" >> $GITHUB_OUTPUT
8991
echo "image_file_name=${{ steps.pre-vars.outputs.image_file_name }}" >> $GITHUB_OUTPUT
9092
echo "image_file_path=./${{ steps.pre-vars.outputs.image_file_name }}" >> $GITHUB_OUTPUT
9193
echo "cache_scope=${{ steps.pre-vars.outputs.cache_scope }}" >> $GITHUB_OUTPUT
9294
echo "cache_key=${{ steps.pre-vars.outputs.cache_scope }}-${{ github.sha }}#${{ github.run_attempt }}" >> $GITHUB_OUTPUT
95+
if [ "${{ env.PLATFORM }}" == "linux/arm/v6" ] ; then
96+
echo "docker_run_options=-e QEMU_CPU=arm1176" >> $GITHUB_OUTPUT
97+
fi
9398
9499
# Build base image for debian version name. Layers will be cached and image pushes to local registry
95100
- name: Build Image - Base
@@ -167,7 +172,7 @@ jobs:
167172
uses: tj-actions/docker-run@v2
168173
with:
169174
image: ${{ needs.build.outputs.image_tag_name }}
170-
options: --platform ${{ inputs.platform }} --user ${{ env.TEST_USER_NAME }} --init
175+
options: ${{ needs.build.outputs.docker_run_options }} --platform ${{ inputs.platform }} --user ${{ env.TEST_USER_NAME }} --init
171176
name: ${{ matrix.test_script }}
172177
args: |
173178
./${{ matrix.test_script }}

.github/workflows/test_docker_debian_v3.yml

+18
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88
branches:
99
- 'future3/**'
1010
paths:
11+
- '.github/workflows/test_docker_debian*.yml'
1112
- 'installation/**'
1213
- 'ci/**'
1314
- 'resources/**'
@@ -20,6 +21,7 @@ on:
2021
- future3/develop
2122
- future3/main
2223
paths:
24+
- '.github/workflows/test_docker_debian*.yml'
2325
- 'installation/**'
2426
- 'ci/**'
2527
- 'resources/**'
@@ -43,9 +45,25 @@ jobs:
4345
debian_codename: 'bookworm'
4446
platform: linux/arm/v7
4547

48+
# # can be activate on test branches, currently failing
49+
# run_bookworm_armv6:
50+
# name: 'bookworm armv6'
51+
# uses: ./.github/workflows/test_docker_debian_codename_sub_v3.yml
52+
# with:
53+
# debian_codename: 'bookworm'
54+
# platform: linux/arm/v6
55+
4656
run_bullseye_armv7:
4757
name: 'bullseye armv7'
4858
uses: ./.github/workflows/test_docker_debian_codename_sub_v3.yml
4959
with:
5060
debian_codename: 'bullseye'
5161
platform: linux/arm/v7
62+
63+
# # can be activate on test branches, currently failing
64+
# run_bullseye_armv6:
65+
# name: 'bullseye armv6'
66+
# uses: ./.github/workflows/test_docker_debian_codename_sub_v3.yml
67+
# with:
68+
# debian_codename: 'bullseye'
69+
# platform: linux/arm/v6

0 commit comments

Comments
 (0)