This is an automated email from the ASF dual-hosted git repository.

alamb pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git


The following commit(s) were added to refs/heads/main by this push:
     new 2747cb30ad ci: Print native CPU target features in release test job 
(#11212)
2747cb30ad is described below

commit 2747cb30ad2f7e3d9f53d81c8e6dffb6fc586d55
Author: Andrew Lamb <[email protected]>
AuthorDate: Fri Sep 25 09:41:39 2026 -0400

    ci: Print native CPU target features in release test job (#11212)
    
    # Which issue does this PR close?
    
    - Follow on to https://github.com/apache/arrow-rs/pull/11192
    
    # Rationale for this change
    
    https://github.com/apache/arrow-rs/pull/11192 added a `Display runner
    CPU features` step to the release test job which I hoped would show what
    `target_feature`s (e.g. `bmi2`) the tests are compiled with.
    
    However, apparently `rustc --print cfg` does not read the `RUSTFLAGS`
    environment variable. Here is [what it shows on
    
main](https://github.com/apache/arrow-rs/actions/runs/36118737961/job/108018908145):
    
    <img width="796" height="355" alt="Screenshot 2026-09-25 at 6 28 57 AM"
    
src="https://github.com/user-attachments/assets/62ea8c2e-c865-49be-9d25-543f3de48335";
    />
    
    
    # What changes are included in this PR?
    
    Pass `-C target-cpu=native` explicitly to `rustc --print cfg`
    
    Now it shows all the actual features. For example:
    
https://github.com/apache/arrow-rs/actions/runs/36121475027/job/108027743321?pr=11212
    
    <img width="2049" height="918" alt="Screenshot 2026-09-25 at 6 28 00 AM"
    
src="https://github.com/user-attachments/assets/ed560eb5-7736-4a34-893a-84525a304162";
    />
    
    
    # Are these changes tested?
    
    By CI.
    
    
    
    # Are there any user-facing changes?
    
    No
    
    Co-authored-by: Claude Fable 5.1 <[email protected]>
---
 .github/workflows/arrow.yml | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/arrow.yml b/.github/workflows/arrow.yml
index e5d11488d6..71d4bda10f 100644
--- a/.github/workflows/arrow.yml
+++ b/.github/workflows/arrow.yml
@@ -133,7 +133,10 @@ jobs:
         # portable fallback. The portable fallbacks are tested in debug builds
         run: echo "RUSTFLAGS=${RUSTFLAGS} -C target-cpu=native" >> $GITHUB_ENV
       - name: Display runner CPU features
-        run: rustc --print cfg | grep target_feature
+        # `rustc --print cfg` does not read RUSTFLAGS, so pass
+        # `-C target-cpu=native` explicitly to show the features that
+        # the tests below are actually compiled with
+        run: rustc --print cfg -C target-cpu=native | grep target_feature
       # Note only run the low level crates in release mode
       # which are the most likely to have overflow tests
       - name: Test arrow-buffer

Reply via email to