From 78a95b509526044887471b0b318ddd8ce1bfdbe7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Minier?= Date: Wed, 30 Apr 2025 13:57:17 +0200 Subject: [PATCH 1/3] workflows: Add ShellCheck static analysis job MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Loïc Minier --- .github/workflows/shellcheck.yml | 35 ++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/shellcheck.yml diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml new file mode 100644 index 00000000..d3ce9e5d --- /dev/null +++ b/.github/workflows/shellcheck.yml @@ -0,0 +1,35 @@ +name: Static analysis of shell scripts with ShellCheck + +on: + # run on pull requests to the main branch + pull_request: + branches: [main] + # run on pushes to the main branch + push: + branches: [main] + +# only need permission to read repository; implicitely set all other +# permissions to none +permissions: + contents: read + +# cancel in progress builds for this workflow triggered by the same ref +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + shellcheck: + name: Install and run ShellCheck on shell scripts + runs-on: ubuntu-latest + steps: + - name: Install ShellCheck + run: sudo apt update && sudo apt -y install shellcheck + + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Run ShellCheck + run: shellcheck scripts/* + From f48bd1245ab44c1bfc36c99cdcc83a81d8ac47d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Minier?= Date: Wed, 30 Apr 2025 14:00:33 +0200 Subject: [PATCH 2/3] scripts: build-linux-deb: Fix nproc ShellCheck MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Loïc Minier --- scripts/build-linux-deb.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build-linux-deb.sh b/scripts/build-linux-deb.sh index b22e6cf4..ad78b37b 100755 --- a/scripts/build-linux-deb.sh +++ b/scripts/build-linux-deb.sh @@ -82,7 +82,7 @@ fi log_i "Building Linux deb" # TODO: build other packages? -make -j$(nproc) \ +make "-j$(nproc)" \ ARCH=arm64 DEB_HOST_ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- \ bindeb-pkg From 548c30cb5ac5d00019bca1063f591fa4f32531c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Minier?= Date: Wed, 30 Apr 2025 14:01:28 +0200 Subject: [PATCH 3/3] scripts: u-boot-rb1: Fix nproc ShellCheck warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Loïc Minier --- scripts/build-u-boot-rb1.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build-u-boot-rb1.sh b/scripts/build-u-boot-rb1.sh index 851663a0..d9d12b37 100755 --- a/scripts/build-u-boot-rb1.sh +++ b/scripts/build-u-boot-rb1.sh @@ -72,7 +72,7 @@ log_i "Configuring U-Boot (${CONFIG})" make "${CONFIG}" log_i "Building U-Boot (with device tree ${U_BOOT_DEVICE_TREE})" -make -j`nproc` \ +make "-j$(nproc)" \ CROSS_COMPILE=aarch64-linux-gnu- DEVICE_TREE="${U_BOOT_DEVICE_TREE}" log_i "Creating Android boot image (${ABOOT_OUTPUT})"