chore: add crate-kit build system and CeCILL license
Introduce the `.crate-kit` infrastructure to standardize build, testing, and release workflows using Jujutsu and Cargo. Add CeCILL-2.1 license files and update all workspace crate manifests with license and repository metadata. - Add `.crate-kit/` directory with `VERSION`, `crate.mk`, `dev-patch.mk`, `jj.mk`, and `org.mk` to define build targets, Jujutsu helpers, and registry configuration for the workspace. - Add 21 shell scripts in `.crate-kit/scripts/` for API tracking, dependency checking, version bumping, publishing, tagging, and wiki generation, including `common.sh` with shared utility functions. - Add `scripts/jj-tag.sh` to support tagging commits with version strings derived from the current crate version. - Add `LICENSE` and `LICENSE.en` files containing the CeCILL-2.1 free software license agreement in French and English. - Update `Makefile` with new targets for building, testing, formatting, CI, and releasing, integrating with `.crate-kit` scripts and updating the wiki directory path to `obiskim`. - Update `.gitignore` to ignore `.cargo/config.toml` files generated by the development patch system. - Add `license = "CECILL-2.1"` and `repository = "https://forge.metabarcoding.org/obi/obiskim"` to all `Cargo.toml` files in the workspace, including `obicompactvec`, `obidebruinj`, `obifastwrite`, `obikalgorithm`, `obikdump`, `obikentropy`, `obikfilter`, `obikidxcache`, `obikindex`, `obikindexer`, `obikmer`, `obikmerge`, `obikphylo`, `obikquery`, `obikrebuild`, `obikrope`, `obikselect`, `obikseq`, `obiksession`, `obikstats`, `obipipeline`, `obiread`, `obiskbuilder`, `obiskio`, `obisys`, and `obitaxonomy`. - Update `src/obikrope/Cargo.toml` to use `criterion2` version 3 with the `cargo_bench_support` feature. - Update `src/obikseq/Cargo.toml` to replace the "OnceLock-based params" feature with a new feature description involving thread-local storage. - Update `src/Cargo.lock` to reflect the version bump of `obikmer` from 1.4.7 to 1.4.8.
This commit is contained in:
1 parent
58e57ceae5
commit
8159137f8b
59 files changed
+3102
-17
No files matched your search
@@ -0,0 +1,42 @@
|
||||
# Private registry and local Cargo configuration (joint development).
|
||||
# Fragment included by crate.mk and by the Makefiles that are not crates (workspace):
|
||||
# include .crate-kit/dev-patch.mk
|
||||
|
||||
DEVPATCH_DIR := $(patsubst %/,%,$(dir $(lastword $(MAKEFILE_LIST))))
|
||||
CARGO_TOML ?= Cargo.toml
|
||||
|
||||
# Values specific to the organization (REGISTRY, REGISTRY_INDEX, FORGE_URL…): org.mk, provided by the
|
||||
# extension that the crate declares (KIT_OVERLAY, tools/kit-assemble.sh). REGISTRY = crates-io: crates.io, without
|
||||
# index or [patch]. Without org.mk, no registry: publish and deps-check fail saying so.
|
||||
-include $(DEVPATCH_DIR)/org.mk
|
||||
REGISTRY ?=
|
||||
REGISTRY_INDEX ?=
|
||||
export CARGO_TOML REGISTRY REGISTRY_INDEX FORGE_TOKEN_FILE
|
||||
|
||||
# Private registry: the index comes from the environment, never from a file tracked by the repository (CI,
|
||||
# Docker and a repository cloned alone therefore work without configuration).
|
||||
ifneq ($(filter-out crates-io,$(strip $(REGISTRY))),)
|
||||
REGISTRY_UP := $(shell echo '$(REGISTRY)' | tr 'a-z-' 'A-Z_')
|
||||
CARGO_REGISTRIES_$(REGISTRY_UP)_INDEX := $(REGISTRY_INDEX)
|
||||
export CARGO_REGISTRIES_$(REGISTRY_UP)_INDEX
|
||||
endif
|
||||
|
||||
# Joint development: .cargo/config.toml (local, ignored) is regenerated at EVERY invocation of
|
||||
# make, whatever the target, from the project's actual dependencies. Nothing to remember.
|
||||
DEV_PATCH_RUN := $(shell CARGO_TOML='$(CARGO_TOML)' REGISTRY='$(REGISTRY)' REGISTRY_INDEX='$(REGISTRY_INDEX)' $(DEVPATCH_DIR)/scripts/dev-patch.sh)
|
||||
|
||||
.PHONY: dev-patch
|
||||
## dev-patch: Regenerates .cargo/config.toml (registry + local patches); already done at every make
|
||||
dev-patch:
|
||||
@$(DEVPATCH_DIR)/scripts/dev-patch.sh
|
||||
@echo "ok: .cargo/config.toml up to date"
|
||||
|
||||
.PHONY: deps-check deps-bump
|
||||
## deps-check: Dependencies up to date? from the private registry (requirement, lock, neighbour, duplicates) and external (requirement, minor, lock)
|
||||
deps-check:
|
||||
@rc=0; $(DEVPATCH_DIR)/scripts/deps-check.sh || rc=1; $(DEVPATCH_DIR)/scripts/deps-check-external.sh || rc=1; exit $$rc
|
||||
|
||||
## deps-bump: Raises the outdated requirements (private registry and external) to the latest version, then cargo update -p
|
||||
deps-bump:
|
||||
@$(DEVPATCH_DIR)/scripts/deps-check.sh bump
|
||||
@$(DEVPATCH_DIR)/scripts/deps-check-external.sh bump
|
||||
Reference in new issue
Block a user