CC=gcc bazel test ... --config=asan
CC=clang bazel test ... --config=asan
CC=clang bazel test ... --config=msan
CC=clang bazel test ... --config=ubsanRecord versions: e.g. gcc 13.3, clang 18.1.3
bazel run //:buildifier.check
bazel run //:buildifier.fixbazel run //examples:example- test-phtree-cpp-bazel
- test-phtree-cpp-cmake
- Test with gcc + clang on Linux
- Test with VisualStudio on Windows
- Update references of tested compilers in README.md
- Create branch/PR
release/1.7.0 - Update version in
- MODULE.bazel
- CMakeLists.txt
- README.md
- CHANGELOG.md (don't forget links at the bottom)
- Commit, push, merge
...
Checkout main branch and pull the tag.
git checkout main
git pull
git archive --format=zip v1.7.0 > phtree-cpp-v1.7.0.zipUpload to GitHub release.
Resulting link:
https://github.com/tzaeschke/phtree-cpp/releases/download/v1.7.0/phtree-cpp-v1.7.0.zip
or
https://github.com/tzaeschke/phtree-cpp/releases/v1.7.0/download/v1.7.0.tar.gz
Documentation: https://github.com/bazelbuild/bazel-central-registry/blob/main/docs/README.md
PH-Tree build target:
bazel build //:phtree
-
Checkout personal fork of bazel-central-registry. Create branch
phtree-cpp@1.7.0. -
Initially only: #### Initially Only for first upload:
bazel run //tools:add_moduleTest target://... -
Patch MODULE.bazel:
diff -ruN ../phtree-cpp/MODULE.bazel modules/phtree-cpp/1.7.0/MODULE.bazel > modules/phtree-cpp/1.7.0/patches/module_dot_bazel.patchUpdate first two lines of patch file to
--- MODULE.bazel +++ MODULE.bazel -
Recreate hashes for
source.jsonbazel run -- //tools:update_integrity phtree-cpp
This also accepts
--versionbut defaults to latest version. -
Validate
bazel run -- //tools:bcr_validation --check=phtree-cpp@1.7.0-
Test locally
-
Build local repo
bazel run //tools:setup_presubmit_repos -- --module phtree-cpp@1.7.0
There is also a GitHub action for release automation: https://github.com/bazel-contrib/publish-to-bcr
-
Test with Test repos
Check out
test-phtree-cpp-bazeland run (replace path with actual path):bazel shutdown && bazel build --enable_bzlmod --registry="file:///home/ FIX PATH /bazel-central-registry" --lockfile_mode=off ...
-
-
Commit and push
git commit -m phtree-cpp@1.7.0 git push
The following has been removed for now because gtest causes compilation errors on windows.
tasks:
run_test_module:
name: Run test module
platform: ${{ platform }}
bazel: ${{ bazel }}
build_targets:
- '@phtree-cpp//test/...'
test_targets:
- '@phtree-cpp//test/...'->
external/googletest~/googletest/src/gtest-filepath.cc(30): fatal error C1083: Cannot open include file: 'gtest/internal/gtest-filepath.h': No such file or directory
(15:48:44) ERROR: C:/b/he4gwbce/external/googletest~/BUILD.bazel:102:11: Compiling googlemock/src/gmock-matchers.cc failed: (Exit 2): cl.exe failed: error executing CppCompile command (from target @@googletest~//:gtest)