Skip to content

Commit

Permalink
Update @pybind11_bazel to version 2.11.1.bzl.3.
Browse files Browse the repository at this point in the history
At long last, we can test the Python bindings in the CI
because they should actually work on Windows as well...

Change-Id: Iede307a2cc059fd3230d238e0861439971b4169f
Reviewed-on: https://code-review.googlesource.com/c/re2/+/62751
Reviewed-by: Perry Lorier <[email protected]>
Reviewed-by: Paul Wankadia <[email protected]>
  • Loading branch information
junyer committed Mar 4, 2024
1 parent 2d866a3 commit 45c9985
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 28 deletions.
35 changes: 16 additions & 19 deletions .github/bazel.sh
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
#!/bin/bash
set -eux

bazel clean
bazel build --compilation_mode=dbg -- //:all
bazel test --compilation_mode=dbg -- //:all \
-//:dfa_test \
-//:exhaustive1_test \
-//:exhaustive2_test \
-//:exhaustive3_test \
-//:exhaustive_test \
-//:random_test

bazel clean
bazel build --compilation_mode=opt -- //:all
bazel test --compilation_mode=opt -- //:all \
-//:dfa_test \
-//:exhaustive1_test \
-//:exhaustive2_test \
-//:exhaustive3_test \
-//:exhaustive_test \
-//:random_test
for compilation_mode in dbg opt
do
bazel clean
bazel build --compilation_mode=${compilation_mode} -- \
//:re2 \
//python:re2
bazel test --compilation_mode=${compilation_mode} -- \
//:all \
-//:dfa_test \
-//:exhaustive1_test \
-//:exhaustive2_test \
-//:exhaustive3_test \
-//:exhaustive_test \
-//:random_test \
//python:all
done

exit 0
13 changes: 6 additions & 7 deletions .github/cmake.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
#!/bin/bash
set -eux

cmake . -D CMAKE_BUILD_TYPE=Debug -D RE2_BUILD_TESTING=ON "$@"
cmake --build . --config Debug --clean-first
ctest -C Debug --output-on-failure -E 'dfa|exhaustive|random'

cmake . -D CMAKE_BUILD_TYPE=Release -D RE2_BUILD_TESTING=ON "$@"
cmake --build . --config Release --clean-first
ctest -C Release --output-on-failure -E 'dfa|exhaustive|random'
for CMAKE_BUILD_TYPE in Debug Release
do
cmake . -D CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -D RE2_BUILD_TESTING=ON "$@"
cmake --build . --config ${CMAKE_BUILD_TYPE} --clean-first
ctest -C ${CMAKE_BUILD_TYPE} --output-on-failure -E 'dfa|exhaustive|random'
done

exit 0
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ bazel_dep(name = "apple_support", version = "1.14.0")
bazel_dep(name = "rules_cc", version = "0.0.9")
bazel_dep(name = "abseil-cpp", version = "20240116.1")
bazel_dep(name = "rules_python", version = "0.31.0")
bazel_dep(name = "pybind11_bazel", version = "2.11.1.bzl.2")
bazel_dep(name = "pybind11_bazel", version = "2.11.1.bzl.3")

# This is a temporary hack for `x64_x86_windows`.
# TODO(junyer): Remove whenever no longer needed.
Expand Down
2 changes: 1 addition & 1 deletion python/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pybind_extension(
py_library(
name = "re2",
srcs = ["re2.py"],
data = [":_re2.so"],
data = [":_re2"],
imports = ["."],
visibility = ["//visibility:public"],
)
Expand Down

0 comments on commit 45c9985

Please sign in to comment.