Skip to content

Latest commit

 

History

History
77 lines (62 loc) · 3.38 KB

release.md

File metadata and controls

77 lines (62 loc) · 3.38 KB

Release process

A release publishes one archive per target with the generated C header, three static libraries, the integration guide and the compatibility docs. scripts/package-release.sh builds it, and CI runs the same script on every push through scripts/test-package-release.sh.

Archive layout

dist/map2check-library-<version>-<target>.tar.gz, where <version> comes from Cargo.toml and <target> is the rustc host triple (for example x86_64-unknown-linux-gnu):

Path in the archive Source
include/map2check.h Generated by build.rs; MAP2CHECK_VERSION must equal <version>.
lib/libmap2check.a cargo build --release (no features), for plain C programs.
lib/libmap2check_libfuzzer.a cargo build --release --features libfuzzer, for LibFuzzer targets; the program must define int __map2check_main__(void).
lib/libmap2check_runtime.a cargo build --profile runtime --features libfuzzer,wasm: the build Map2Check links (unwinding panics, LibFuzzer and wasm2c runtime).
docs/integration-guide.md, docs/api-deltas.md, docs/semantic-deltas.md Repository.
CHANGELOG.md, LICENSE Repository.

The KLEE runtime bitcode is not in the archive: it needs rustc 1.72.1 and LLVM 16 tools, so it is built separately with scripts/build-klee-runtime.sh <out.bc> (see the integration guide).

dist/SHA256SUMS sits next to the archive. There are two libraries because the libfuzzer build references __map2check_main__. Without that symbol in the program, linking the libfuzzer library fails with undefined reference to '__map2check_main__'.

Steps

  1. Version. On a branch off develop, set version in Cargo.toml and the org.opencontainers.image.version label in Dockerfile. tests/header_version.rs fails if they disagree.

  2. Changelog. Move the [Unreleased] entries into a new ## [<version>] - YYYY-MM-DD section of CHANGELOG.md, and leave an empty [Unreleased] above it.

  3. Compatibility docs. Make sure docs/api-deltas.md and docs/semantic-deltas.md reflect every ABI or behaviour change since the last release. cargo test --all-features --test compat_docs must pass.

  4. Pull request. Open a PR to develop and merge it once build_and_test is green, then open a PR from develop to main (1 review required).

  5. Package. On the merged commit, run:

    scripts/package-release.sh            # writes dist/
    (cd dist && sha256sum -c SHA256SUMS)
  6. Tag. Create a signed tag on the merged commit and push it:

    git tag -s v<version> -m "map2check-library v<version>"
    git push origin v<version>
  7. GitHub release. Attach the archive and checksums. Use --prerelease for -rcN versions:

    V=<version>
    awk -v h="## [$V]" 'index($0,"## [")==1{p=index($0,h)==1;next} p' CHANGELOG.md > dist/notes.md
    gh release create "v$V" dist/map2check-library-"$V"-*.tar.gz dist/SHA256SUMS \
      --title "v$V" --notes-file dist/notes.md \
      --prerelease   # omit for a final (non -rcN) version

    dist/notes.md holds the body of the ## [<version>] section, up to the next ## [ heading or the end of the file. Name the archive by version so older archives left in dist/ are not uploaded; SHA256SUMS only covers the newest one.

Steps 6 and 7 publish outside the repository; the maintainer runs them.