Skip to content

Speed up CI and stabilize aws-ca-regression#551

Open
dgarske wants to merge 2 commits into
wolfSSL:masterfrom
dgarske:fuzzer_optimize
Open

Speed up CI and stabilize aws-ca-regression#551
dgarske wants to merge 2 commits into
wolfSSL:masterfrom
dgarske:fuzzer_optimize

Conversation

@dgarske

@dgarske dgarske commented Jun 9, 2026

Copy link
Copy Markdown
Member

What changed

wolfSSL build caching. New build-wolfssl composite action clones, builds, caches, and installs wolfSSL, keyed on the live wolfssl master commit plus the configure options. Because master-branch caches are readable by PR jobs, PRs get an instant wolfSSL cache hit. Installs into /usr/local, so no wolfMQTT ./configure lines had to change. Applied across the Ubuntu autotools workflows; macOS and CMake builds get an equivalent SHA-keyed cache.

broker-check build-once fan-out. A small prerequisite job warms the wolfSSL cache for each distinct config, so the build matrix restores wolfSSL instead of rebuilding it 17 times. wolfSSL builds per run drop from ~17 to 3.

Matrix trims and run cancellation. Compilers 6 -> 4 (range endpoints), dropped the redundant standalone LeakSan job (ASan already detects leaks at exit) and the build-only MAX_QOS=1/0 broker rows (covered by the CMake QoS matrix). Added concurrency.cancel-in-progress to every push/PR workflow so superseded pushes stop immediately (the AWS-IoT serialization groups are preserved).

aws-ca-regression stabilization. The flaky Network (-8) failures came from rapid sequential connects reusing the hard-coded demoDevice client ID against live AWS IoT. scripts/awsiot.test now retries transient connection failures with backoff and settles between QoS connects. Retries cannot mask a real failure (it fails on every attempt); the expected-fail case 3 keeps a single attempt. Also fixed a pre-existing inverted skip condition that would attempt TLS tests on a no-TLS build.

Measured impact (total billable job-seconds per run)

Run Total vs baseline
Baseline (master) 5404 -
This PR, cold cache 4776 -12%
This PR, warm cache 3836 -29%

Largest warm-cache reductions: Sanitizer -69%, CMake -53%, MQTT-SN -41%, WebSocket -39%, Broker -38%, Multi-Compiler -35%, Ubuntu -33%. wall-clock also improves once caches are warm; the very first run on a cold cache pays the one-time build + cache-save cost. Workflows with specialized or no wolfSSL builds (ThreadX, Espressif, Zephyr) get cancellation only and are unchanged.

All workflows pass.

@dgarske dgarske self-assigned this Jun 9, 2026
Copilot AI review requested due to automatic review settings June 9, 2026 19:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR focuses on reducing CI runtime by centralizing/caching wolfSSL builds and trimming workflow matrices, and on stabilizing the AWS IoT regression test by retrying transient connection failures.

Changes:

  • Added a reusable build-wolfssl composite action that caches a wolfSSL install keyed by upstream master SHA + build options, then installs into /usr/local.
  • Reduced redundant wolfSSL builds (notably via broker-check build-once fan-out), trimmed some CI matrices, and added concurrency.cancel-in-progress across multiple workflows.
  • Updated scripts/awsiot.test to retry AWS IoT connection attempts with backoff; adjusted the aws-ca-regression workflow to disable retries for the expected-fail case.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
scripts/awsiot.test Adds retry/backoff wrapper for AWS IoT client invocations.
.github/workflows/zephyr.yml Adds workflow-level concurrency cancellation.
.github/workflows/windows-check.yml Adds workflow-level concurrency cancellation.
.github/workflows/websocket-test.yml Switches wolfSSL build to the shared build-wolfssl action; adds concurrency cancellation.
.github/workflows/ubuntu-check.yml Uses build-wolfssl action and adjusts aws-ca-regression sequencing/timeout; adds concurrency cancellation.
.github/workflows/ubuntu-check-curl.yml Uses build-wolfssl action; adds workflow-level concurrency cancellation.
.github/workflows/threadx.yml Adds workflow-level concurrency cancellation.
.github/workflows/sec-websocket-test.yml Adds workflow-level concurrency cancellation.
.github/workflows/sanitizer.yml Removes redundant LeakSan job; uses build-wolfssl action; adjusts artifact paths.
.github/workflows/multi-compiler.yml Trims compiler matrix; uses build-wolfssl action.
.github/workflows/mqtt-sn-check.yml Uses build-wolfssl action; adds workflow-level concurrency cancellation.
.github/workflows/macos-check.yml Adds workflow-level concurrency cancellation and wolfSSL install caching.
.github/workflows/fuzz.yml Changes schedule to nightly and corrects smoke/full run gating logic.
.github/workflows/fsanitize-check.yml Uses build-wolfssl action; adds workflow-level concurrency cancellation.
.github/workflows/docker-Espressif.yml Adds workflow-level concurrency cancellation.
.github/workflows/cmake-build.yml Adds wolfSSL caching and installs from cached prefix; adds concurrency cancellation.
.github/workflows/broker-check.yml Adds a dedicated wolfSSL warm-cache job and removes redundant build-only MAX_QOS rows; uses build-wolfssl.
.github/actions/build-wolfssl/action.yml New composite action to clone/build/cache/install wolfSSL.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/awsiot.test Outdated
Comment thread .github/actions/build-wolfssl/action.yml Outdated
Comment thread .github/workflows/ubuntu-check-curl.yml Outdated
Comment thread .github/workflows/cmake-build.yml Outdated
Comment thread .github/workflows/cmake-build.yml Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 18 out of 18 changed files in this pull request and generated 3 comments.

Comment thread scripts/awsiot.test Outdated
Comment thread .github/actions/build-wolfssl/action.yml
Comment thread .github/actions/build-wolfssl/action.yml
@dgarske dgarske force-pushed the fuzzer_optimize branch from caee178 to 439b15a Compare June 9, 2026 21:22
@dgarske dgarske force-pushed the fuzzer_optimize branch from 439b15a to 1a3588d Compare June 9, 2026 22:11
@dgarske dgarske assigned embhorn and unassigned dgarske Jun 9, 2026
@dgarske dgarske requested a review from embhorn June 9, 2026 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants