Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/alt-arch-riscv64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Alt Arch Riscv64

on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:

jobs:
build:
name: Build Mosquitto (riscv64)
runs-on: ubuntu-24.04-riscv
continue-on-error: true

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Do not mask CI failures at job level.

Line 16 sets continue-on-error: true, which can report success even when build/verify fails. That weakens PR protection for this new architecture path.

🔧 Suggested fix
-    continue-on-error: true
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
continue-on-error: true
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/alt-arch-riscv64.yml at line 16, The workflow currently
sets the job-level YAML flag continue-on-error: true which masks CI failures;
remove that key (or set it to false) from the job definition in
.github/workflows/alt-arch-riscv64.yml so the job will fail the workflow on
errors, and if this job is flaky instead configure a finer-grained strategy
(e.g., a separate non-blocking workflow or retry logic) rather than using
continue-on-error.

steps:
- uses: actions/checkout@v6

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake libssl-dev libcjson-dev \
libsqlite3-dev libargon2-dev libreadline-dev docbook-xsl xsltproc \
pkg-config

- name: Configure
run: |
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DWITH_TESTS=OFF

- name: Build
run: |
cd build
time make -j$(nproc)

- name: Verify
run: |
./build/src/mosquitto --version
./build/client/mosquitto_pub --help 2>&1 | head -3
./build/client/mosquitto_sub --help 2>&1 | head -3
Comment on lines +41 to +42

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

cat -n .github/workflows/alt-arch-riscv64.yml | head -60

Repository: gounthar/mosquitto

Length of output: 1384


🏁 Script executed:

sed -n '35,50p' .github/workflows/alt-arch-riscv64.yml

Repository: gounthar/mosquitto

Length of output: 349


Add set -euo pipefail to ensure verification failures are not masked by piping to head.

Lines 41–42 pipe command output to head, which will exit successfully even if the binary invocation fails. This masks verification failures since the pipeline exit code becomes that of head rather than the actual command. Add strict shell flags at the start of the run block:

Suggested fix
       - name: Verify
         run: |
+          set -euo pipefail
           ./build/src/mosquitto --version
           ./build/client/mosquitto_pub --help 2>&1 | head -3
           ./build/client/mosquitto_sub --help 2>&1 | head -3
           file ./build/src/mosquitto
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/alt-arch-riscv64.yml around lines 41 - 42, Add strict
shell flags so pipeline failures aren't masked: at the start of the run block
that executes "./build/client/mosquitto_pub --help | head -3" and
"./build/client/mosquitto_sub --help | head -3", set "set -euo pipefail" (or
equivalent) so any failure in the commands (mosquitto_pub/mosquitto_sub) causes
the job to fail instead of the final pipe stage (head) returning success.

file ./build/src/mosquitto
Loading