Skip to content

Commit

Permalink
Merge branch 'bazel' into bazel-recursive-stubgen
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasjng authored Dec 10, 2024
2 parents 600a5d9 + 11633aa commit 0da8033
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 37 deletions.
20 changes: 5 additions & 15 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-12, macos-14, windows-latest]
os: [ubuntu-latest, macos-13, macos-14, windows-latest]

steps:
- uses: actions/checkout@v4
Expand All @@ -56,29 +56,19 @@ jobs:
path: wheelhouse/*.whl
name: dist-${{ matrix.os }}

merge_wheels:
name: Merge wheels into a combined artifact
runs-on: ubuntu-latest
needs: [build_wheels, build_sdist]
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@v4
with:
name: dist
pattern: dist-*

upload_all:
name: Upload if release
needs: merge_wheels
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'

steps:
- uses: actions/setup-python@v5

- uses: actions/download-artifact@v4
with:
path: dist
name: dist
pattern: dist-*
merge-multiple: true

- uses: pypa/gh-action-pypi-publish@release/v1
with:
Expand Down
24 changes: 3 additions & 21 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,21 +1,6 @@
module(
name = "nanobind_example",
version = "0.1.0",
)

bazel_dep(name = "nanobind_bazel", version = "")
local_path_override(
module_name = "nanobind_bazel",
path = "../nanobind-bazel",
)

bazel_dep(name = "hedron_compile_commands", dev_dependency = True)
git_override(
module_name = "hedron_compile_commands",
commit = "204aa593e002cbd177d30f11f54cff3559110bb9",
remote = "https://github.com/hedronvision/bazel-compile-commands-extractor.git",
)
module(name = "nanobind_example", version = "0.1.0")

bazel_dep(name = "nanobind_bazel", version = "2.2.0")
bazel_dep(name = "rules_python", version = "1.0.0")

python = use_extension("@rules_python//python/extensions:python.bzl", "python")
Expand All @@ -28,7 +13,4 @@ python.toolchain(
python_version = "3.12",
)

use_repo(
python,
python = "python_versions",
)
use_repo(python, python = "python_versions")
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ class BuildBazelExtension(build_ext.build_ext):
def run(self):
for ext in self.extensions:
self.bazel_build(ext)

# explicitly call `bazel shutdown` for graceful exit
self.spawn(["bazel", "shutdown"])

Expand Down

0 comments on commit 0da8033

Please sign in to comment.