From f89b5f71ddb3f482256a7a2f4da5bc8b84db19a5 Mon Sep 17 00:00:00 2001 From: messense Date: Sat, 25 Jan 2025 10:02:10 +0800 Subject: [PATCH] Run tests on GitHub hosted arm64 Linux runner (#4865) * Run tests on GitHub hosted arm64 Linux runner * Upgrade bindgen to 0.69.4 in pyo3-ffi-check --- .github/workflows/ci.yml | 19 +++++++++++++++++++ pyo3-ffi-check/Cargo.toml | 2 +- pyo3-ffi-check/build.rs | 2 +- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 14531d17144..bea49f52de1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -102,6 +102,11 @@ jobs: python-architecture: "x64", rust-target: "x86_64-unknown-linux-gnu", }, + { + os: "ubuntu-22.04-arm", + python-architecture: "arm64", + rust-target: "aarch64-unknown-linux-gnu", + }, { os: "ubuntu-latest", python-architecture: "x64", @@ -193,6 +198,11 @@ jobs: python-architecture: "x64", rust-target: "x86_64-unknown-linux-gnu", }, + { + os: "ubuntu-22.04-arm", + python-architecture: "arm64", + rust-target: "aarch64-unknown-linux-gnu", + }, { os: "windows-latest", python-architecture: "x64", @@ -348,6 +358,15 @@ jobs: python-architecture: "x64", rust-target: "x86_64-apple-darwin", } + # arm64 Linux runner is in public preview, so test 3.13 on it + - rust: stable + python-version: "3.13" + platform: + { + os: "ubuntu-22.04-arm", + python-architecture: "arm64", + rust-target: "aarch64-unknown-linux-gnu", + } exclude: # ubuntu-latest (24.04) no longer supports 3.7 diff --git a/pyo3-ffi-check/Cargo.toml b/pyo3-ffi-check/Cargo.toml index 776add0c910..874da3d2bef 100644 --- a/pyo3-ffi-check/Cargo.toml +++ b/pyo3-ffi-check/Cargo.toml @@ -13,7 +13,7 @@ path = "../pyo3-ffi" features = ["extension-module"] # A lazy way of skipping linking in most cases (as we don't use any runtime symbols) [build-dependencies] -bindgen = "0.66.1" +bindgen = "0.69.4" pyo3-build-config = { path = "../pyo3-build-config" } [workspace] diff --git a/pyo3-ffi-check/build.rs b/pyo3-ffi-check/build.rs index 072e8c072b0..67808888e1e 100644 --- a/pyo3-ffi-check/build.rs +++ b/pyo3-ffi-check/build.rs @@ -28,7 +28,7 @@ fn main() { let bindings = bindgen::Builder::default() .header("wrapper.h") .clang_args(clang_args) - .parse_callbacks(Box::new(bindgen::CargoCallbacks)) + .parse_callbacks(Box::new(bindgen::CargoCallbacks::new())) // blocklist some values which apparently have conflicting definitions on unix .blocklist_item("FP_NORMAL") .blocklist_item("FP_SUBNORMAL")