Use ctest to run t_algorithms_test in CI workflow - #2558
Conversation
…ch ctest definition Co-authored-by: wdconinc <4656391+wdconinc@users.noreply.github.com>
|
@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>
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 |
There was a problem hiding this comment.
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.cmakehierarchy plus thealgorithms_testbinary for theclang++ Release ASANconfiguration. t-algorithms-testjob downloads that artifact and runs the test viactest --test-dir build -V -R "^t_algorithms_test$".
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
de1b680
into
copilot/exclude-t-algorithms-test-revert
The
t-algorithms-testworkflow job invoked thealgorithms_testbinary directly, bypassing the test definition set in CMake (includingLLVM_PROFILE_FILEand 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.cmakehierarchy and the test binary) for theclang++ Release ASANconfiguration. Thet-algorithms-testjob downloads this archive and runs the test viactest, exactly as defined insrc/tests/algorithms_test/CMakeLists.txt: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.