Skip to content

Commit

Permalink
Merge pull request #277 from singnet/pedro/276/bazelrc_defines_versions
Browse files Browse the repository at this point in the history
[#276] Move --define versions to .bazelrc
  • Loading branch information
Pedrobc89 authored Feb 21, 2025
2 parents b4d8b96 + b01c594 commit 81daf8a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
6 changes: 6 additions & 0 deletions src/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,16 @@ common --enable_bzlmod
# localy
build --spawn_strategy=local

# Define versions
build --define=ATOMDB_VERSION=0.8.11
build --define=DAS_VERSION=0.9.17
build --define=DAS_NODE_VERSION=0.0.1

# Enable debugging symbols for development
build:debug --compilation_mode=dbg
build:debug --strip=never


# Optimeze for speed in production
build:release --compilation_mode=opt
build:release --strip=always
Expand Down
9 changes: 4 additions & 5 deletions src/scripts/bazel_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,13 @@ fi
if [ "$BUILD_WHEELS" = true ]; then
$BAZELISK_RUN_CMD //deps:requirements.update
$BAZELISK_RUN_CMD //deps:requirements_dev.update
$BAZELISK_BUILD_CMD //hyperon_das_atomdb:hyperon_das_atomdb_wheel --define=ATOMDB_VERSION=0.8.11
$BAZELISK_BUILD_CMD //hyperon_das:hyperon_das_wheel --define=DAS_VERSION=0.9.17
$BAZELISK_BUILD_CMD //hyperon_das_atomdb:hyperon_das_atomdb_wheel
$BAZELISK_BUILD_CMD //hyperon_das:hyperon_das_wheel
mv bazel-bin/hyperon_das_atomdb/*.whl "$BIN_DIR"
mv bazel-bin/hyperon_das/*.whl "$BIN_DIR"
$BAZELISK_BUILD_CMD //hyperon_das_node:hyperon_das_node_wheel --define=DAS_NODE_VERSION=0.0.1
$BAZELISK_BUILD_CMD //hyperon_das_node:hyperon_das_node_wheel
mv bazel-bin/hyperon_das_node/*.whl "$BIN_DIR"
$BAZELISK_BUILD_CMD //hyperon_das_atomdb_cpp:hyperon_das_atomdb_cpp_wheel \
--define=ATOMDB_VERSION=0.8.11
$BAZELISK_BUILD_CMD //hyperon_das_atomdb_cpp:hyperon_das_atomdb_cpp_wheel
mv bazel-bin/hyperon_das_atomdb_cpp/*.whl "$BIN_DIR"
fi

Expand Down

0 comments on commit 81daf8a

Please sign in to comment.