Repository navigation
Add a Bazel-oriented source package profile and extract the release logic - #1484
Merged
Merged
Conversation
…ogic
Adds OPENCC_SOURCE_PACKAGE_PROFILE=bazel, a trimmed source package that keeps
the Node.js and Python binding sources so the //node and //python Bazel targets
stay buildable and testable from the tarball, and moves the build/smoke-test
logic out of release-source.yml into a reusable shell script.
Detailed Changes:
- **CMakeLists.txt**:
- Split the trimmed ignore list into a shared part and a binding-sources part
(node/, python/, scripts/), so the new "bazel" profile keeps them while
"opencc" drops them. The "opencc" package contents are unchanged.
- Both trimmed profiles now drop the npm/PyPI packaging entry points
(package.json, package-lock.json, pyproject.toml, setup.py, MANIFEST.in,
plugins/jieba/node/); Bazel does not need them.
- Replace the "/python[^/]*/" pattern, which also happened to exclude
deps/marisa-*/bindings/python[3]/, with explicit patterns so the OpenCC
python/ directory can be kept independently.
- **scripts/build-source-package.sh** (new): build / smoke-test / all
subcommands taking a profile. Builds the CPack archive, repacks it for
reproducibility, then smoke-tests it with CMake and Bazel; the "bazel"
profile additionally runs the full CI Bazel build and test target patterns.
Explicit target patterns are used instead of //... because the vendored
deps/googletest-1.15.0 BUILD files do not load under current Bazel versions.
Fixes the CMake smoke-test target name, which was opencc-jieba (the library
OUTPUT_NAME) instead of the actual target opencc_jieba.
- **.github/workflows/release-source.yml**: run the script once per profile via
a build matrix; artifacts and release assets are uploaded per profile.
- **Docs**: update the source package section in AGENTS.md and the NEWS.md
entry; ignore /build-src.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds OPENCC_SOURCE_PACKAGE_PROFILE=bazel, a trimmed source package that keeps the Node.js and Python binding sources so the //node and //python Bazel targets stay buildable and testable from the tarball, and moves the build/smoke-test logic out of release-source.yml into a reusable shell script.
Detailed Changes: