Skip to content

Use ctest to run t_algorithms_test in CI workflow - #2558

Merged
wdconinc merged 3 commits into
copilot/exclude-t-algorithms-test-revertfrom
copilot/sub-pr-2557
Mar 11, 2026
Merged

Use ctest to run t_algorithms_test in CI workflow#2558
wdconinc merged 3 commits into
copilot/exclude-t-algorithms-test-revertfrom
copilot/sub-pr-2557

Conversation

Copilot AI commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

The t-algorithms-test workflow job invoked the algorithms_test binary directly, bypassing the test definition set in CMake (including LLVM_PROFILE_FILE and any other future test properties).

Change

Instead of downloading just the test binary and running it directly, the build job now produces a slim build archive (containing the CTestTestfile.cmake hierarchy and the test binary) for the clang++ Release ASAN configuration. The t-algorithms-test job downloads this archive and runs the test via ctest, exactly as defined in src/tests/algorithms_test/CMakeLists.txt:

add_test(NAME t_algorithms_test COMMAND env LLVM_PROFILE_FILE=algorithms_test.profraw $<TARGET_FILE:algorithms_test>)

The workflow step now runs:

ctest --test-dir build -V -R "^t_algorithms_test$"

This ensures the job automatically stays in sync with any future changes to the CMake test definition (new environment variables, working directory, test properties, etc.) without requiring manual updates to the workflow.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…ch ctest definition

Co-authored-by: wdconinc <4656391+wdconinc@users.noreply.github.com>
Copilot AI changed the title [WIP] Address feedback on revert of 'remove t-algorithms-test' fix Mirror LLVM_PROFILE_FILE env var in t-algorithms-test workflow job Mar 11, 2026
@wdconinc

Copy link
Copy Markdown
Contributor

@copilot Are there benefits in providing the full build artifact and use the same ctest calls as in the original build test to ensure we keep in sync with any other changes in the build environment?

Co-authored-by: wdconinc <4656391+wdconinc@users.noreply.github.com>

Copilot AI commented Mar 11, 2026

Copy link
Copy Markdown
Contributor Author

@copilot Are there benefits in providing the full build artifact and use the same ctest calls as in the original build test to ensure we keep in sync with any other changes in the bu...

Yes — using ctest ensures the job automatically picks up any future changes to the test definition (e.g., new env vars, working directory, test properties) without needing manual workflow updates.

Implemented in commit 3106091: replaced the binary-only artifact upload with a slim archive containing just the CTestTestfile.cmake hierarchy + binary, conditioned specifically on clang++ Release ASAN. The t-algorithms-test job now downloads that archive and runs ctest --test-dir build -V -R "^t_algorithms_test$", mirroring the main build job's ctest invocation exactly.

Copilot AI changed the title Mirror LLVM_PROFILE_FILE env var in t-algorithms-test workflow job Use ctest to run t_algorithms_test in CI workflow Mar 11, 2026
@wdconinc
wdconinc marked this pull request as ready for review March 11, 2026 15:48
Copilot AI review requested due to automatic review settings March 11, 2026 15:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates the CI workflow so the t-algorithms-test job runs t_algorithms_test via ctest (as defined in CMake), rather than invoking the test binary directly—ensuring test properties like LLVM_PROFILE_FILE are honored and future test-definition changes don’t require workflow edits.

Changes:

  • Build job now creates and uploads a slim artifact containing the CTestTestfile.cmake hierarchy plus the algorithms_test binary for the clang++ Release ASAN configuration.
  • t-algorithms-test job downloads that artifact and runs the test via ctest --test-dir build -V -R "^t_algorithms_test$".

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

@wdconinc
wdconinc merged commit de1b680 into copilot/exclude-t-algorithms-test-revert Mar 11, 2026
55 of 57 checks passed
@wdconinc
wdconinc deleted the copilot/sub-pr-2557 branch March 11, 2026 18:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants