Skip to content

fix(ci): restore build log artifact upload for Companion CI - #7654

Open
pfeerick wants to merge 5 commits into
mainfrom
fix/7451-cpn-build-logs
Open

fix(ci): restore build log artifact upload for Companion CI#7654
pfeerick wants to merge 5 commits into
mainfrom
fix/7451-cpn-build-logs

Conversation

@pfeerick

@pfeerick pfeerick commented Aug 15, 2026

Copy link
Copy Markdown
Member

Summary

  • Restores the always-on build-log artifact upload for Companion CI that was dropped when feat: WASM modules based simulation in Companion #6435 replaced the three OS-specific workflows (linux_cpn.yml, macosx_cpn.yml, win_cpn-64.yml) with the unified companion.yml + .github/actions/build_companion/action.yml.
  • Adds if: always() to the filename-composition step so the artifact name is available even when the build fails.
  • Adds a Collect build logs step (if: always()) that gathers build/**/*.log, CMakeOutput.log, and CMakeError.log into a logs/ directory.
  • Adds an Archive build logs step (if: always()) uploading logs/ as <artifact_name>-logs with 30-day retention, alongside the existing production-artifact upload.

Since this composite action is now shared by all three platform jobs (build-linux, build-macos, build-win64), a single change here covers all of them, unlike the original fix in #6682 which needed to be duplicated across three workflow files.

Test plan

  • Confirm a successful Companion build (Linux/macOS/Windows) still uploads the production package artifact as before.
  • Force a build/packaging failure and confirm the <artifact_name>-logs artifact is produced and contains the CMake/build logs.

Fixes #7451

🤖 Generated with Claude Code

PR #6435 replaced the OS-specific Companion workflows (which had
always-on log collection added in #6682) with a unified
build_companion composite action, but dropped the log
collection/upload logic in the process. On a build or packaging
failure the only diagnostic output was the truncated Actions log,
with no way to retrieve the full CMake/build log.

Restore the "Collect build logs" and "Archive build logs" steps
(if: always()) in the composite action so a <artifact_name>-logs
artifact is produced regardless of build outcome.

Fixes #7451
@pfeerick pfeerick added this to the 3.0 milestone Aug 15, 2026
@pfeerick pfeerick added the ci/cd 🔧 Related to GitHub Actions and similar issues label Aug 15, 2026
pfeerick and others added 4 commits August 15, 2026 17:55
Verifies the restored production + log artifact upload works on a
successful Companion build for PR #7654.
Temporary #error to force a compile failure and confirm the
Archive build logs step still uploads the -logs artifact on a
failed build. Will be reverted once verified.
…pload"

This reverts commit 611ece1.

Failure-path CI run (31874504405) confirmed the fix: all three
platform builds failed on the injected #error as expected, no
production artifact was uploaded, but each build still produced
its <artifact_name>-logs artifact containing the full compile
error.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
… path"

This reverts commit 8f17e2f.

Success-path CI run (31873170894) confirmed the fix: all three
platform builds passed and each uploaded both its production
artifact and its <artifact_name>-logs artifact.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@pfeerick

Copy link
Copy Markdown
Member Author

Validated the fix live in CI before dropping the draft status of "needs testing":

Success path (run 31873170894, bumped companion/.ci-trigger): all three platform builds passed, each uploading both the production artifact and the new -logs artifact (e.g. edgetx-cpn-linux-merge + edgetx-cpn-linux-merge-logs).

Failure path (run 31874504405, temporary #error injected into companion/src/companion.cpp): all three platform builds failed as expected, no production artifact was produced, but each still uploaded its -logs artifact — and it contains the actual compile error:

/__w/edgetx/edgetx/companion/src/companion.cpp:41:2: error: #error "Intentional CI test failure for PR #7654 - verifying build log artifact upload"

Both test commits have been reverted (kept in history rather than force-pushed away, so the CI runs above stay linked to real commits on this branch).

@pfeerick
pfeerick marked this pull request as ready for review August 15, 2026 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/cd 🔧 Related to GitHub Actions and similar issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Companion CI no longer uploads build logs as artifacts (regression from #6435)

1 participant