ci: use builder on windows platforms#1961
Conversation
📚 Documentation Check Results📦
|
Clippy Allow Annotation ReportComparing clippy allow annotations between branches:
Summary by Rule
Annotation Counts by File
Annotation Stats by Crate
About This ReportThis report tracks Clippy allow annotations for specific rules, showing how they've changed in this PR. Decreasing the number of these annotations generally improves code quality. |
🔒 Cargo Deny Results📦
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1961 +/- ##
==========================================
- Coverage 72.58% 72.55% -0.03%
==========================================
Files 451 452 +1
Lines 74095 74111 +16
==========================================
- Hits 53782 53773 -9
- Misses 20313 20338 +25
🚀 New features to boost your workflow:
|
|
🎯 Code Coverage (details) 🔗 Commit SHA: 8a4955f | Docs | Datadog PR Page | Give us feedback! |
9c30399 to
f3b0432
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dfeffd0b47
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| # If these are set witih value and description, then it gives you UI elements | ||
| DOWNSTREAM_BRANCH: | ||
| value: "main" | ||
| value: "julio/use-builder-on-windows" |
There was a problem hiding this comment.
Revert the downstream CI branch
Leaving DOWNSTREAM_BRANCH pointed at julio/use-builder-on-windows means every GitLab pipeline that reaches trigger_internal_build will trigger the downstream DataDog/apm-reliability/libddprof-build project from this temporary feature branch instead of the production main branch. This matches the commit note saying it must be reverted before merge, and would make merged/main pipelines depend on a developer branch.
Useful? React with 👍 / 👎.
4e141e3 to
8a4955f
Compare
What does this PR do?
Switches the Windows release-artifact build over to the shared
buildercrate, so all platforms (Linux/glibc, Linux/musl, macOS, Windows) now go through the same path. To make that possible:builder/src/arch/windows.rs: adds Windows support to the builder — copies the PDB and the*.dll.libimport library, uses the_ffi-suffixed artifact names produced by the FFI crate, and no-ops the pkg-config step (Windows has nopkg-config).builder/src/arch/mod.rs+profiling.rs(refactor: move add_pkg_config to arch): hoists the per-platformadd_pkg_configinto eacharch/*.rs, with the shared file-templating logic exposed asarch::generate_pkg_config. This iswhat lets Windows opt out cleanly instead of carrying a
#[cfg]inprofiling.rs.builder/src/builder.rs: skips creatingbin/andpkgconfig/directories on Windows, where they're unused.windows/build-artifacts.ps1: deleted — its responsibilities now live in thebuilder.cargo nextest runinvocations now pass--no-tests=passso the workflow doesn't fail when a partition/affected-crate set yields zero tests..github/workflows/test.ymlno longer hand-filtersbuilder/test_spawn_from_libout of the package list —--no-tests=passmakes that filtering unnecessary, and dropping it means thebuildercrate's own tests are actuallyexercised by CI when it changes.
miri.ymlandcoverage.yml.Motivation
We've been maintaining two parallel build pipelines: every other platform goes through the
buildercrate, while Windows had its own PowerShell script (windows/build-artifacts.ps1) that re-implemented overlapping logic (artifact naming,output layout, header post-processing). Any change to how artifacts are produced had to be made (and kept in sync) in two places. Routing Windows through the
builderconsolidates this and lets future build changes ship in one place.The CI changes are required collateral: once
builderis the path used for the Windows release build, the workflow's hard-coded--exclude builderis wrong, and partition-style invocations need--no-tests=passso the workflow toleratesempty test sets.
Additional Notes
libddprof-build: this PR depends on a matching branch in the privatelibddprof-buildrepo. The last commit (dfeffd0b4 chore: reference libddprof branch that matches the changes in the builder) temporarily points.gitlab-ci.yml'sDOWNSTREAM_BRANCHat that branch. This commit must be reverted tomainbefore merge — please flag this in review if I forget.datadog_profiling.{dll,lib,pdb}todatadog_profiling_ffi.{dll,lib,pdb}plus the newdatadog_profiling_ffi.dll.libimport library. Downstream consumers that hard-coded the old names will need to follow.