Repository: victronenergy/gui-v2
Pull request #2057: Optimize build process
Author: login: mr-manuel
Created: 2025-04-22T15:04:48Z | Merged: 2025-04-28T07:30:11Z

I optimized the build scripts and GitHub action workflow.

GitHub Actions: Instead of about 11 minutes, it takes now about 6 minutes
Local PC: Instead of about 11 minutes, it takes now about 2 minutes

Is there any reason for not using `--parallel $(nproc)` with `cmake --build`?

I also added an option to directly upload the compiled files to the GX device by using `-H venus-ip-or-hostname` or `--host venus-ip-or-hostname` This checks, if there is already an SSH key present and if not generates one and uploads it. If there is already one present it only uploads it, if missing.

It's also possible to give more than one host for file upload by providing a comma separated list:
`-H 192.168.1.10,192.168.1.11,192.168.1.12`


Diff:
diff --git a/.github/workflows/build-wasm.yml b/.github/workflows/build-wasm.yml
index 96999a7ba..55acdef5a 100644
--- a/.github/workflows/build-wasm.yml
+++ b/.github/workflows/build-wasm.yml
@@ -39,20 +39,21 @@ jobs:
 
       - name: Check for a cached version
         uses: actions/cache@v4
-        id: cached_qt_emscripten
+        id: cached-versions
         with:
           path: |
+            # Cache the Qt and emscripten installation
             ${{ env.OUTPUTDIR }}
           # Adding version as cache key
-          key: ${{ runner.os }}-qt-${{ env.QT_VERSION }}-em-${{ env.EMSCRIPTEN }}-libegl1
+          key: ${{ runner.os }}__qt-${{ env.QT_VERSION }}__em-${{ env.EMSCRIPTEN }}__libegl1
 
-      - name: Install requirements
-        if: steps.cached_qt_emscripten.outputs.cache-hit != true
+      - name: Install requirements (cache miss)
+        if: steps.cached-versions.outputs.cache-hit != 'true'
         run: |
           bash scripts/build-wasm-install-requirements.sh
 
-      - name: Install libraries needed for building the wasm
-        if: steps.cached_qt_emscripten.outputs.cache-hit == true
+      - name: Install libraries needed for building the wasm (cache hit)
+        if: steps.cached-versions.outputs.cache-hit == 'true'
         run: |
           sudo apt-get update -yq
           sudo apt-get install -y libegl1
@@ -65,16 +66,16 @@ jobs:
         uses: actions/upload-artifact@v4
         with:
           name: venus-webassembly
-          path: build-wasm
+          path: build-wasm_files_to_copy
           retention-days: 5
 
-      - name: ZIP wasm files for release
+      - name: Release - ZIP wasm files
         if: startsWith(github.ref, 'refs/tags/')
         run: |
-          cd build-wasm
+          cd build-wasm_files_to_copy
           zip -r ../venus-webassembly.zip wasm
 
-      - name: Release tagged wasm files
+      - name: Release - Create release with wasm files
         uses: softprops/action-gh-release@v1
         if: startsWith(github.ref, 'refs/tags/')
         with:
diff --git a/.github/workflows/run-unit-tests.yml b/.github/workflows/run-unit-tests.yml
index f373eabe4..4e9ffc029 100644
--- a/.github/workflows/run-unit-tests.yml
+++ b/.github/workflows/run-unit-tests.yml
@@ -77,7 +77,7 @@ jobs:
           export PATH=$PATH:${{env.OUTPUTDIR}}/Qt/Tools/CMake/bin
           export QTDIR=${{env.OUTPUTDIR}}/Qt/$QT_VERSION/gcc_64
           ${QTDIR}/bin/qt-configure-module ..
-          cmake --build .
+          cmake --build . --parallel $(nproc)
           cmake --install . --prefix ${QTDIR} --verbose
 
       - name: Configure CMake
@@ -91,7 +91,7 @@ jobs:
       - name: Build unit tests
         run: |
           cd build
-          cmake --build . --config ${{env.BUILD_TYPE}}
+          cmake --build . --config ${{env.BUILD_TYPE}} --parallel $(nproc)
 
       - name: Run unit test
         run: |
diff --git a/scripts/build-gx.sh b/scripts/build-gx.sh
index 13eefa489..c233aae9c 100755
--- a/scripts/build-gx.sh
+++ b/scripts/build-gx.sh
@@ -15,6 +15,35 @@ else
 fi
 
 
+# Parse command-line arguments
+while [[ $# -gt 0 ]]; do
+    case "${1}" in
+        # do not delete build files
+        -P|--preserve)
+            PRESERVE=1
+            shift
+            ;;
+        # IP or hostname of the GX device for direct upload
+        -H|--host)
+            HOST="${2}"
+            shift 2
+            ;;
+        -h|--help)
+            echo "Usage: ${0} [options]"
+            echo "Options:"
+            echo "  -P, --preserve   Do not delete build files"
+            echo "  -H, --host       IP or hostname of the GX device for direct upload"
+            echo "  -h, --help       Show this help message"
+            exit 0
+            ;;
+        # If the option is not recognized, print an error message
+        *)
+            echo "Unknown option: ${1}"
+            ;;
+    esac
+done
+
+
 if [ ! -f "/opt/venus/current/environment-setup-cortexa8hf-neon-ve-linux-gnueabi" ]; then
     echo "ERROR: Venus OS SDK was not found."
     echo "Execute \"./build-gx-install-requirements.sh\" once or visit this link for how to install and use the SDK: https://github.com/victronenergy/venus/wiki/howto-install-and-use-the-sdk"
@@ -33,23 +62,20 @@ echo "Changed to parent directory: $(pwd)"
 # Checkout the branch you want to build, if not already on it
 # git checkout -b main origin/main
 
-# Replace git SSH URLs with HTTPS URLs
-# TODO
-# .git/config
-
 # Update the submodules
 git submodule update --init
 
-# Clean the repository of untracked files and directories
-# git clean -fd
-
-# Cleanup old build directory
-if [ -d "build-gx" ]; then
+# Clean build directory
+if [[ -d "build-gx" && -z ${PRESERVE} ]]; then
+    echo "Cleaning build directory..."
     rm -rf "build-gx"
 fi
 
 # Create build directory
-mkdir "build-gx"
+if [[ ! -d "build-gx" ]]; then
+    echo "Creating build directory..."
+    mkdir "build-gx"
+fi
 
 cd "build-gx"
 
@@ -58,25 +84,103 @@ cd "build-gx"
 cmake -DCMAKE_BUILD_TYPE=MinSizeRel ..
 
 # Build the project using CMake with the MinSizeRel configuration
-cmake --build . --config MinSizeRel
+cmake --build . --config MinSizeRel --parallel $(nproc)
 
 if [ $? -ne 0 ]; then
     echo
-    echo "ERROR: Build failed."
+    echo -e "\e[31m*** ERROR: Build failed ***\e[0m"
     exit 1
 else
     echo
-    echo "*** Build successful. ***"
-    echo
+    echo -e "\e[32m*** Build successful ***\e[0m"
 fi
 
 
-# Delete all files and folders except for bin and Victron
 # Make sure, current path ends with build-gx
 if [ "${PWD##*/}" = "build-gx" ]; then
-    find . -mindepth 1 -maxdepth 1 ! -name 'bin' ! -name 'venus-gui-v2' ! -name 'Victron' -exec rm -rf {} +
-    mv venus-gui-v2/Main.qml . && mv venus-gui-v2/qmldir . && rm -rf venus-gui-v2
-    mv bin/venus-gui-v2 . && rm -rf bin
+    if [ -d "../build-gx_files_to_copy" ]; then
+        rm -rf ../build-gx_files_to_copy
+    fi
+
+    # Create output directory
+    mkdir ../build-gx_files_to_copy
+
+    # Copy the files to the output directory
+    cp venus-gui-v2/Main.qml ../build-gx_files_to_copy
+    cp venus-gui-v2/qmldir ../build-gx_files_to_copy
+    cp bin/venus-gui-v2 ../build-gx_files_to_copy
+    cp -r Victron ../build-gx_files_to_copy
 else
     echo "Current directory is not build-gx. Aborting to avoid unwanted deleting of files."
 fi
+
+echo "Elapsed time: ${SECONDS} seconds"
+echo
+
+
+# Check if HOST is set
+if [[ -n "${HOST}" ]]; then
+    echo
+    echo -e "\e[33mThe automated file upload to the GX device after build was selected\e[0m"
+
+    # Check if an SSH key exists
+    if [ ! -f "${HOME}/.ssh/id_rsa" ]; then
+        echo "No SSH key found. Generating a new SSH key..."
+        ssh-keygen -t rsa -b 2048 -f "${HOME}/.ssh/id_rsa" -N ""
+        echo
+    fi
+
+    # Test SSH connection
+    echo "Testing SSH connection to ${HOST}..."
+    ssh -o BatchMode=yes -o ConnectTimeout=5 root@${HOST} "exit" 2>/dev/null
+
+    if [ $? -ne 0 ]; then
+        echo
+        echo -e "\e[33mSSH authentication failed. Uploading SSH key to ${HOST}...\e[0m"
+        echo -e "\e[33mYou will be prompted for the password to upload the SSH key.\e[0m"
+        echo "Make sure you set a password on the GX device else it won't work. See https://www.victronenergy.com/live/ccgx:root_access#root_access"
+        echo
+        ssh-copy-id root@${HOST}
+        if [ $? -ne 0 ]; then
+            echo -e "\e[31mFailed to upload SSH key. Please check your password and try again.\e[0m"
+            exit 1
+        fi
+        echo
+        echo -e "\e[32mSSH key uploaded successfully.\e[0m"
+    else
+        echo -e "\e[32mSSH authentication successful.\e[0m"
+    fi
+    echo
+
+    # Make filesystem writable
+    echo -n "Making GX device filesystem writable..."
+    ssh root@${HOST} "/opt/victronenergy/swupdate-scripts/remount-rw.sh"
+    echo " done."
+
+    # Stop service on the GX device
+    echo -n "Stopping service on the GX device..."
+    ssh root@${HOST} "svc -d /service/start-gui"
+    echo " done."
+
+    # Upload the files to the GX device
+    echo "Uploading files to the GX device at ${HOST}..."
+
+    # Copy the files to the GX device, only output errors
+    scp -r ../build-gx_files_to_copy/* root@${HOST}:/opt/victronenergy/gui-v2/ 1>/dev/null
+    if [ $? -ne 0 ]; then
+        echo -e "\e[31mFailed to upload files. Please check your connection and disk space on the GX device then try again.\e[0m"
+        echo
+        echo "GX device disk space:"
+        ssh root@${HOST} "df -h | head -n 2"
+        echo
+        exit 1
+    fi
+    echo -e "\e[32mFiles uploaded successfully.\e[0m"
+    echo
+
+    # Start service on the GX device
+    echo -n "Starting service on the GX device..."
+    ssh root@${HOST} "svc -u /service/start-gui"
+    echo " done."
+    echo
+fi
diff --git a/scripts/build-wasm.sh b/scripts/build-wasm.sh
index 274c174bb..d2370ed9b 100755
--- a/scripts/build-wasm.sh
+++ b/scripts/build-wasm.sh
@@ -15,6 +15,35 @@ else
 fi
 
 
+# Parse command-line arguments
+while [[ $# -gt 0 ]]; do
+    case "${1}" in
+        # do not delete build files
+        -P|--preserve)
+            PRESERVE=1
+            shift
+            ;;
+        # IP or hostname of the GX device for direct upload
+        -H|--host)
+            HOST="${2}"
+            shift 2
+            ;;
+        -h|--help)
+            echo "Usage: ${0} [options]"
+            echo "Options:"
+            echo "  -P, --preserve   Do not delete build files"
+            echo "  -H, --host       IP or hostname of the GX device for direct upload"
+            echo "  -h, --help       Show this help message"
+            exit 0
+            ;;
+        # If the option is not recognized, print an error message
+        *)
+            echo "Unknown option: ${1}"
+            ;;
+    esac
+done
+
+
 # Go to the parent directory of the script
 BASE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." &> /dev/null && pwd )"
 cd "${BASE_DIR}"
@@ -36,16 +65,23 @@ export QTDIR=${OUTPUTDIR}/Qt/${QT_VERSION}/wasm_singlethread
 source "${OUTPUTDIR}/emsdk/emsdk_env.sh"
 source /opt/venus/python/bin/activate
 
+# Checkout the branch you want to build, if not already on it
+# git checkout -b main origin/main
+
 # Update the submodules
 git submodule update --init
 
-# Cleanup old build directory
-if [ -d "build-wasm" ]; then
+# Clean build directory
+if [[ -d "build-wasm" && -z ${PRESERVE} ]]; then
+    echo "Cleaning build directory..."
     rm -rf "build-wasm"
 fi
 
 # Create build directory
-mkdir "build-wasm"
+if [[ ! -d "build-wasm" ]]; then
+    echo "Creating build directory..."
+    mkdir "build-wasm"
+fi
 
 cd "build-wasm"
 
@@ -54,44 +90,110 @@ cd "build-wasm"
 ${QTDIR}/bin/qt-cmake -DCMAKE_BUILD_TYPE=MinSizeRel ..
 
 # Build the project using CMake with the MinSizeRel configuration
-cmake --build .
+cmake --build . --parallel $(nproc)
 
 if [ $? -ne 0 ]; then
     echo
-    echo "ERROR: Build failed."
+    echo -e "\e[31m*** ERROR: Build failed ***\e[0m"
     exit 1
 else
     echo
-    echo "*** Build successful. ***"
-    echo
+    echo -e "\e[32m*** Build successful ***\e[0m"
 fi
 
 
-# Cleanup old artifacts directory
-if [ -d "artifacts" ]; then
-    rm -rf "artifacts"
-fi
-
-# Prepare files that are needed for the GUIv2 to run
-mkdir -p artifacts/wasm
-mv venus-gui-v2.{html,js,wasm} qtloader.js artifacts/wasm/
-cp ../images/victronenergy.svg ../LICENSE.txt ../.github/patches/Makefile artifacts/wasm/
-cp -r ../wasm/icons artifacts/wasm/
-mv artifacts/wasm/venus-gui-v2.html artifacts/wasm/index.html
-grep -q -E '^var createQtAppInstance' artifacts/wasm/venus-gui-v2.js
-sed -i "s%^var \(createQtAppInstance\)%window.\1%" artifacts/wasm/venus-gui-v2.js
-cd artifacts/wasm
-gzip -k -9 venus-gui-v2.wasm
-sha256sum venus-gui-v2.wasm > venus-gui-v2.wasm.sha256
-rm venus-gui-v2.wasm
-cd ../..
-
-
-# Delete all files and folders except for artifacts
 # Make sure, current path ends with build-wasm
 if [ "${PWD##*/}" = "build-wasm" ]; then
-    find . -mindepth 1 -maxdepth 1 ! -name 'artifacts' -exec rm -rf {} +
-    mv artifacts/wasm . && rmdir artifacts
+    if [ -d "../build-wasm_files_to_copy" ]; then
+        rm -rf ../build-wasm_files_to_copy
+    fi
+
+    # Create output directory
+    mkdir -p ../build-wasm_files_to_copy/wasm
+
+    # Copy the files to the output directory
+    cp venus-gui-v2.{html,js,wasm} qtloader.js \
+        ../build-wasm_files_to_copy/wasm/
+    cp ../images/victronenergy.svg ../LICENSE.txt ../.github/patches/Makefile \
+        ../build-wasm_files_to_copy/wasm/
+    cp -r ../wasm/icons ../build-wasm_files_to_copy/wasm/
+    mv ../build-wasm_files_to_copy/wasm/venus-gui-v2.html ../build-wasm_files_to_copy/wasm/index.html
+
+    # Apply patches
+    grep -q -E '^var createQtAppInstance' ../build-wasm_files_to_copy/wasm/venus-gui-v2.js
+    sed -i "s%^var \(createQtAppInstance\)%window.\1%" ../build-wasm_files_to_copy/wasm/venus-gui-v2.js
+
+    # Compress the wasm file
+    gzip -k -9 ../build-wasm_files_to_copy/wasm/venus-gui-v2.wasm
+    sha256sum ../build-wasm_files_to_copy/wasm/venus-gui-v2.wasm > ../build-wasm_files_to_copy/wasm/venus-gui-v2.wasm.sha256
+    rm ../build-wasm_files_to_copy/wasm/venus-gui-v2.wasm
 else
     echo "Current directory is not build-wasm. Aborting to avoid unwanted deleting of files."
 fi
+
+echo "Elapsed time: ${SECONDS} seconds"
+echo
+
+
+# Check if HOST is set
+if [[ -n "${HOST}" ]]; then
+    echo
+    echo -e "\e[33mThe automated file upload to the GX device after build was selected\e[0m"
+
+    # Check if an SSH key exists
+    if [ ! -f "${HOME}/.ssh/id_rsa" ]; then
+        echo "No SSH key found. Generating a new SSH key..."
+        ssh-keygen -t rsa -b 2048 -f "${HOME}/.ssh/id_rsa" -N ""
+        echo
+    fi
+
+    # Test SSH connection
+    echo "Testing SSH connection to ${HOST}..."
+    ssh -o BatchMode=yes -o ConnectTimeout=5 root@${HOST} "exit" 2>/dev/null
+
+    if [ $? -ne 0 ]; then
+        echo
+        echo -e "\e[33mSSH authentication failed. Uploading SSH key to ${HOST}...\e[0m"
+        echo -e "\e[33mYou will be prompted for the password to upload the SSH key.\e[0m"
+        echo "Make sure you set a password on the GX device else it won't work. See https://www.victronenergy.com/live/ccgx:root_access#root_access"
+        echo
+        ssh-copy-id root@${HOST}
+        if [ $? -ne 0 ]; then
+            echo -e "\e[31mFailed to upload SSH key. Please check your password and try again.\e[0m"
+            exit 1
+        fi
+        echo
+        echo -e "\e[32mSSH key uploaded successfully.\e[0m"
+    else
+        echo -e "\e[32mSSH authentication successful.\e[0m"
+    fi
+    echo
+
+    # Make filesystem writable
+    echo -n "Making GX device filesystem writable..."
+    ssh root@${HOST} "/opt/victronenergy/swupdate-scripts/remount-rw.sh"
+    echo " done."
+    echo
+
+    # Upload the files to the GX device
+    echo "Uploading files to the GX device at ${HOST}..."
+
+    # Copy the files to the GX device, only output errors
+    scp -r ../build-wasm_files_to_copy/wasm/* root@${HOST}:/var/www/venus/gui-v2/ 1>/dev/null
+    if [ $? -ne 0 ]; then
+        echo -e "\e[31mFailed to upload files. Please check your connection and disk space on the GX device then try again.\e[0m"
+        echo
+        echo "GX device disk space:"
+        ssh root@${HOST} "df -h | head -n 2"
+        echo
+        exit 1
+    fi
+    echo -e "\e[32mFiles uploaded successfully.\e[0m"
+    echo
+
+    # Restart vmrlogger to make GUIv2 changes visible in VRM portal
+    echo -n "Restarting vmrlogger on GX device..."
+    ssh root@${HOST} "svc -t /service/vrmlogger"
+    echo " done."
+    echo
+fi


Reviews:
user: login: chriadam
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-23T05:42:15Z
user: login: mr-manuel
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-04-23T06:03:38Z
user: login: DanielMcInnes
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-23T06:25:45Z
user: login: mr-manuel
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-04-23T06:28:05Z
user: login: DanielMcInnes
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-04-24T08:56:38Z
user: login: DanielMcInnes
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-04-24T08:57:17Z
user: login: mr-manuel
state: COMMENTED
author_association: COLLABORATOR
submitted_at: 2025-04-24T17:58:44Z

Review comments:
diff_hunk: @@ -39,20 +39,23 @@ jobs:
 
       - name: Check for a cached version
         uses: actions/cache@v4
-        id: cached_qt_emscripten
+        id: cached-versions
         with:
           path: |
+            # Cache the Qt and emscripten installation
             ${{ env.OUTPUTDIR }}
+            # Cache the build directory
+            ./build-wasm
path: .github/workflows/build-wasm.yml
user: login: chriadam
body: Will this cache gui-v2 (wasm) build artifacts from previous runs?  Or am I misunderstanding?  (I would prefer entirely clean builds of gui-v2.)
created_at: 2025-04-23T05:42:15Z
author_association: CONTRIBUTOR
diff_hunk: @@ -39,20 +39,23 @@ jobs:
 
       - name: Check for a cached version
         uses: actions/cache@v4
-        id: cached_qt_emscripten
+        id: cached-versions
         with:
           path: |
+            # Cache the Qt and emscripten installation
             ${{ env.OUTPUTDIR }}
+            # Cache the build directory
+            ./build-wasm
path: .github/workflows/build-wasm.yml
user: login: mr-manuel
body: Yes thats correct. Then I will remove it again.
created_at: 2025-04-23T06:03:38Z
author_association: COLLABORATOR
diff_hunk: @@ -33,23 +33,13 @@ echo "Changed to parent directory: $(pwd)"
 # Checkout the branch you want to build, if not already on it
 # git checkout -b main origin/main
 
-# Replace git SSH URLs with HTTPS URLs
-# TODO
-# .git/config
-
 # Update the submodules
 git submodule update --init
 
-# Clean the repository of untracked files and directories
-# git clean -fd
-
-# Cleanup old build directory
-if [ -d "build-gx" ]; then
-    rm -rf "build-gx"
-fi
-
 # Create build directory
-mkdir "build-gx"
+if [ ! -d "build-gx" ]; then
path: scripts/build-gx.sh
user: login: DanielMcInnes
body: does this give us possible stale builds?
created_at: 2025-04-23T06:25:45Z
author_association: CONTRIBUTOR
diff_hunk: @@ -33,23 +33,13 @@ echo "Changed to parent directory: $(pwd)"
 # Checkout the branch you want to build, if not already on it
 # git checkout -b main origin/main
 
-# Replace git SSH URLs with HTTPS URLs
-# TODO
-# .git/config
-
 # Update the submodules
 git submodule update --init
 
-# Clean the repository of untracked files and directories
-# git clean -fd
-
-# Cleanup old build directory
-if [ -d "build-gx" ]; then
-    rm -rf "build-gx"
-fi
-
 # Create build directory
-mkdir "build-gx"
+if [ ! -d "build-gx" ]; then
path: scripts/build-gx.sh
user: login: mr-manuel
body: It's the same as @chriadam wrote for the `build-wasm`. If that is the case, I would remove both.
created_at: 2025-04-23T06:28:05Z
author_association: COLLABORATOR
diff_hunk: @@ -39,20 +39,21 @@ jobs:
 
       - name: Check for a cached version
         uses: actions/cache@v4
-        id: cached_qt_emscripten
+        id: cached-versions
path: .github/workflows/build-wasm.yml
user: login: DanielMcInnes
body: @chriadam do you think these scripts should clean the qml disk cache? Possibly something for another ticket
created_at: 2025-04-24T08:56:38Z
author_association: CONTRIBUTOR
diff_hunk: @@ -39,20 +39,21 @@ jobs:
 
       - name: Check for a cached version
         uses: actions/cache@v4
-        id: cached_qt_emscripten
+        id: cached-versions
path: .github/workflows/build-wasm.yml
user: login: mr-manuel
body: This is only the cache of the Qt and emscripten installation. There is no more qml cache, like it was in a previous revision.
created_at: 2025-04-24T17:58:44Z
author_association: COLLABORATOR

PR comments:
user: login: chriadam
created_at: 2025-04-23T05:44:37Z
body: Parallel builds in the past did cause some problem on some target (with translation targets being serviced in the wrong order, if I remember correctly?)  @DanielMcInnes do you remember what that issue was, and whether it's completely resolved now or not?
author_association: CONTRIBUTOR
user: login: DanielMcInnes
created_at: 2025-04-23T06:22:56Z
body: > Parallel builds in the past did cause some problem on some target (with translation targets being serviced in the wrong order, if I remember correctly?) @DanielMcInnes do you remember what that issue was, and whether it's completely resolved now or not?



> Parallel builds in the past did cause some problem on some target (with translation targets being serviced in the wrong order, if I remember correctly?) @DanielMcInnes do you remember what that issue was, and whether it's completely resolved now or not?

I think that issue is resolved now, via `add_custom_target(${PROJECT_NAME}_lupdate_sleep`.

author_association: CONTRIBUTOR
user: login: mr-manuel
created_at: 2025-04-23T08:45:51Z
body: @chriadam @DanielMcInnes as default option I removed the cache for the build. If a user wants to use it, he can add the `-P` or `--preserve` argument.
author_association: COLLABORATOR
user: login: DanielMcInnes
created_at: 2025-04-27T03:48:53Z
body: the changes look good to me, but I would like @dirkjanfaber to have a look, he knows more about this stuff
author_association: CONTRIBUTOR
user: login: dirkjanfaber
created_at: 2025-04-28T06:20:58Z
body: > the changes look good to me, but I would like @dirkjanfaber to have a look, he knows more about this stuff

I don't see anything obviously breaking anything. 
Only remark I do have is that I generally prefer the variables to be enclosed in curly brackets. So
```
        ssh root@${HOST} "/opt/victronenergy/swupdate-scripts/remount-rw.sh"
```
instead of
```
        ssh root@$HOST "/opt/victronenergy/swupdate-scripts/remount-rw.sh"
```

(And on all of the other lines). 
author_association: CONTRIBUTOR
user: login: mr-manuel
created_at: 2025-04-28T07:30:09Z
body: @dirkjanfaber all variables are now in curly brackets

@DanielMcInnes could you merge this now? Then I can update the wiki.
author_association: COLLABORATOR