Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Default build and test options for AndroidEnv
build --cxxopt=-std=c++17
build --host_cxxopt=-std=c++17
build --incompatible_enable_proto_toolchain_resolution
build --announce_rc
17 changes: 9 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,24 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.19.0
with:
bazelisk-cache: true
disk-cache: true
repository-cache: true

- name: Configure MODULE.bazel python version
run: |
MATRIX_VER="${{ matrix.python-version }}"
VER_UNDERSCORE="${MATRIX_VER//./_}"
sed -i "s/python_version = \"3.11\"/python_version = \"$MATRIX_VER\"/g" MODULE.bazel
sed -i "s/python_3_11/python_$VER_UNDERSCORE/g" MODULE.bazel

- name: Setup Bazel
uses: bazel-contrib/setup-bazel@0.19.0
with:
bazelisk-cache: true
disk-cache: true
repository-cache: true
external-cache: true

- name: Run tests
run: |
bazel test --cxxopt=-std=c++17 --host_cxxopt=-std=c++17 //...
bazel test //...
- name: Upload test logs
if: always()
uses: actions/upload-artifact@v4
Expand Down
14 changes: 13 additions & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,21 @@ module(
# Core rules
bazel_dep(name = "rules_python", version = "2.2.0")
bazel_dep(name = "rules_proto_grpc_python", version = "5.8.0")
bazel_dep(name = "protobuf", version = "27.2")
bazel_dep(name = "protobuf", version = "31.1")
bazel_dep(name = "rules_proto", version = "6.0.2")

# Hermetic Pre-built Protoc Toolchain
bazel_dep(name = "toolchains_protoc", version = "0.6.1")

protoc = use_extension("@toolchains_protoc//protoc:extensions.bzl", "protoc")
protoc.toolchain(
google_protobuf = "com_google_protobuf",
version = "v31.1",
)
use_repo(protoc, "toolchains_protoc_hub")

register_toolchains("@toolchains_protoc_hub//:all")

# Hermetic Python Toolchain
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ absl-py==2.1.0
dm-env==1.6
numpy==2.1.0
portpicker==1.6.0
pygame==2.6.0
pygame>=2.6.0
pillow>=10.4.0
gymnasium==0.29.1
protobuf>=6,<7
Expand Down
Loading