From 59181e41b3387399c34089184524db4d323d4ad2 Mon Sep 17 00:00:00 2001 From: Nicholas Junge Date: Tue, 24 Dec 2024 12:09:33 +0100 Subject: [PATCH 1/3] Add nanobind_bazel v2.4.0 Mirrors nanobind v2.4.0. Note that no nanobind v2.3.0 was released due to a mistake in the release process. --- modules/nanobind_bazel/2.4.0/MODULE.bazel | 14 ++++++++++++++ modules/nanobind_bazel/2.4.0/presubmit.yml | 18 ++++++++++++++++++ modules/nanobind_bazel/2.4.0/source.json | 5 +++++ modules/nanobind_bazel/metadata.json | 3 ++- 4 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 modules/nanobind_bazel/2.4.0/MODULE.bazel create mode 100644 modules/nanobind_bazel/2.4.0/presubmit.yml create mode 100644 modules/nanobind_bazel/2.4.0/source.json diff --git a/modules/nanobind_bazel/2.4.0/MODULE.bazel b/modules/nanobind_bazel/2.4.0/MODULE.bazel new file mode 100644 index 00000000000..275107e6da5 --- /dev/null +++ b/modules/nanobind_bazel/2.4.0/MODULE.bazel @@ -0,0 +1,14 @@ +module( + name = "nanobind_bazel", + version = "2.4.0", + compatibility_level = 1, +) + +bazel_dep(name = "platforms", version = "0.0.10") +bazel_dep(name = "rules_cc", version = "0.0.9") +bazel_dep(name = "rules_python", version = "0.39.0") +bazel_dep(name = "bazel_skylib", version = "1.7.1") + +# Creates a `http_archive` for nanobind and robin-map. +internal_configure = use_extension("//:internal_configure.bzl", "internal_configure_extension") +use_repo(internal_configure, "nanobind", "pypi__typing_extensions") diff --git a/modules/nanobind_bazel/2.4.0/presubmit.yml b/modules/nanobind_bazel/2.4.0/presubmit.yml new file mode 100644 index 00000000000..fde48b567ff --- /dev/null +++ b/modules/nanobind_bazel/2.4.0/presubmit.yml @@ -0,0 +1,18 @@ +matrix: + bazel: + - 7.x + - 8.x + platform: + - debian10 + - ubuntu2004 + - macos + - macos_arm64 + - windows + +tasks: + verify_targets: + name: Verify build targets + platform: ${{ platform }} + bazel: ${{ bazel }} + build_targets: + - '@nanobind_bazel//:nanobind' diff --git a/modules/nanobind_bazel/2.4.0/source.json b/modules/nanobind_bazel/2.4.0/source.json new file mode 100644 index 00000000000..99959e6cc4e --- /dev/null +++ b/modules/nanobind_bazel/2.4.0/source.json @@ -0,0 +1,5 @@ +{ + "url": "https://github.com/nicholasjng/nanobind-bazel/releases/download/v2.4.0/nanobind-bazel-2.4.0.tar.gz", + "integrity": "sha256-amllQykgsNtqkrfCfQaLQqDDU//SFa6lFYb6ZTls6ao=", + "strip_prefix": "nanobind-bazel-2.4.0" +} diff --git a/modules/nanobind_bazel/metadata.json b/modules/nanobind_bazel/metadata.json index 5be4966a0c7..21ee298e186 100644 --- a/modules/nanobind_bazel/metadata.json +++ b/modules/nanobind_bazel/metadata.json @@ -14,7 +14,8 @@ "1.0.0", "2.0.0", "2.1.0", - "2.2.0" + "2.2.0", + "2.4.0" ], "yanked_versions": {} } From 48c90e45cd9dff115d7f8ed08e0d723e24fd9307 Mon Sep 17 00:00:00 2001 From: Nicholas Junge Date: Tue, 24 Dec 2024 15:46:51 +0100 Subject: [PATCH 2/3] Add C++17 standard for Bazel 7.x build job --- modules/nanobind_bazel/2.4.0/presubmit.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/nanobind_bazel/2.4.0/presubmit.yml b/modules/nanobind_bazel/2.4.0/presubmit.yml index fde48b567ff..85cadc77aeb 100644 --- a/modules/nanobind_bazel/2.4.0/presubmit.yml +++ b/modules/nanobind_bazel/2.4.0/presubmit.yml @@ -16,3 +16,6 @@ tasks: bazel: ${{ bazel }} build_targets: - '@nanobind_bazel//:nanobind' + build_flags: + - --cxxopt=-std=c++17 + - --cxxopt=/std:c++17 From cbd41a57caaf2d293c858f56776be1b700322d1e Mon Sep 17 00:00:00 2001 From: Nicholas Junge Date: Tue, 24 Dec 2024 15:53:18 +0100 Subject: [PATCH 3/3] Restructure jobs according to CI docs Since we need to inject the correct cxxopt according to platform, we need to unroll the platform and job definitions. --- modules/nanobind_bazel/2.4.0/presubmit.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/modules/nanobind_bazel/2.4.0/presubmit.yml b/modules/nanobind_bazel/2.4.0/presubmit.yml index 85cadc77aeb..6ccc858b7d2 100644 --- a/modules/nanobind_bazel/2.4.0/presubmit.yml +++ b/modules/nanobind_bazel/2.4.0/presubmit.yml @@ -2,20 +2,28 @@ matrix: bazel: - 7.x - 8.x - platform: + unix_platform: - debian10 - ubuntu2004 - macos - macos_arm64 + win_platform: - windows tasks: - verify_targets: - name: Verify build targets - platform: ${{ platform }} + unix_test: + name: Verify build targets on Unix + platform: ${{ unix_platform }} bazel: ${{ bazel }} build_targets: - '@nanobind_bazel//:nanobind' build_flags: - --cxxopt=-std=c++17 + windows_test: + name: Verify build targets + platform: ${{ win_platform }} + bazel: ${{ bazel }} + build_targets: + - '@nanobind_bazel//:nanobind' + build_flags: - --cxxopt=/std:c++17