File tree Expand file tree Collapse file tree 3 files changed +14
-11
lines changed
Expand file tree Collapse file tree 3 files changed +14
-11
lines changed Original file line number Diff line number Diff line change 3232 run : rustup update stable && rustup default stable && rustup component add rustfmt clippy
3333
3434 - name : Install hatch
35- uses : pypa/hatch@257e27e51a6a5616ed08a39a408a21c35c9931bc # install
36- with :
37- version : " 1.12.0"
38-
35+ run : pip install hatch==1.12.0
36+
3937 - name : Install PyTorch
4038 run : pip install torch
4139
Original file line number Diff line number Diff line change 2929 - name : Install latest stable toolchain and rustfmt
3030 run : rustup update stable && rustup default stable && rustup component add rustfmt clippy
3131
32- - name : Install hatch
33- uses : pypa/hatch@257e27e51a6a5616ed08a39a408a21c35c9931bc # install
34- with :
35- version : " 1.12.0"
36-
3732 - name : Install coreutils for MacOS to get sha256sum
3833 if : matrix.os == 'macos-latest'
3934 run : brew install coreutils
4540 sudo apt-get update
4641 sudo apt-get install -y python3.14 python3.14-dev
4742
43+ - name : Install hatch
44+ run : pip install hatch==1.12.0
45+
4846 - name : Run tests
4947 run : hatch run +py=${{ matrix.python-version }} multiple_os_tests:test
5048
Original file line number Diff line number Diff line change @@ -664,8 +664,15 @@ def build_rust(self):
664664 if src_file .exists ():
665665 newest_source_time = max (newest_source_time , src_file .stat ().st_mtime )
666666
667- # Only rebuild if source files are newer than the destination
668- should_build = newest_source_time > library_mtime
667+ required_headers = ["common.h" ]
668+ if "profiling" in rust_features :
669+ required_headers .append ("profiling.h" )
670+
671+ include_dir = CARGO_TARGET_DIR / "include" / "datadog"
672+ headers_exist = include_dir .exists () and all ((include_dir / header ).exists () for header in required_headers )
673+
674+ # Only rebuild if source files are newer than the destination OR if any required header is missing
675+ should_build = newest_source_time > library_mtime or not headers_exist
669676
670677 if should_build :
671678 # Create and run the CustomBuildRust command
You can’t perform that action at this time.
0 commit comments