This file contains documentation that is only relevant for developers and maintainers of BenchExec.
For writing a tool-info module, please refer to the documentation on Tool Integration.
Development documentation of our React-based project for interactive HTML tables is in the respective README.
After cloning the GitHub repository,
BenchExec can be used directly from within the working directory.
Scripts for starting the three programs are available in the bin directory.
The alternative (recommended) way is to create a virtual Python environment and to install BenchExec in development mode within this environment:
virtualenv -p /usr/bin/python3 path/to/venv
source path/to/venv/bin/activate
pip install -e path/to/benchexec/working/directory
This will automatically install all dependencies and place appropriate start scripts on the PATH.
Some tests of BenchExec require the lxml Python module.
To install this, the system packages libxml2-dev and libxslt1-dev need to be installed.
Alternatively, if you have the package python3-lxml installed on your system,
you can skip building the lxml module inside the virtual environment
by passing the parameter --system-site-packages to virtualenv.
We use the automatic code formatter black.
Installation is possible for example with pip3 install black.
Please format all code using black ..
Apart from what is formatted automatically, we try to follow the official Python style guide PEP8.
We also check our code using the static-analysis tool flake8. If you find a rule that should not be enforced in your opinion, please raise an issue.
-
You need
pip>=10.0andtwine>=1.11.0to be installed. -
Define next version number, e.g., from
1.1-devto1.1. Add an according entry toCHANGELOG.mdand commit. -
Check whether any of the DTD files in
doc/changed since last release. If yes, push a copy of the changed DTD with the new version tohttps://www.sosy-lab.org/benchexec/{benchmark,result,table}-<VERSION>.dtd, and update the version number in all references to this DTD in BenchExec. -
The remaining steps can also be mostly automated with the script release.sh (make sure to follow the instructions printed at the end).
-
Update version number in field
__version__ofbenchexec/__init__.py, e.g., from1.1-devto1.1and commit. -
Create a Git tag:
git tag -s <VERSION> -
In a clean checkout and in a virtual environment with Python 3 (as described above), create the release archives:
python3 setup.py sdist bdist_wheel -
Sign the files and upload them to PyPi inside the build directory:
twine upload -s dist/* -
Push commits and tag to GitHub:
git push --tags -
On GitHub, create a release from the tag with a description of the changes (from
CHANGELOG.md), and upload all files fromdist/. -
Update version number in field
__version__ofbenchexec/__init__.py, e.g., from1.1to1.2-devand commit.
-
Use the tar archive generated above as base, copy it in a fresh directory, extract it there, and change into the extracted directory.
-
Copy the folder
debianfrom a repository checkout to the current directory. -
Define a version for the Debian package: Usually, the BenchExec version can be taken as it is, but for beta versions (e.g.,
1.1-dev), you need to replace the-by a~. Otherwise the beta package will have a higher version number than the package of the final version. -
Create a
.orig.tar.xzas needed for Debian packages (<DEB_VERSION>needs to be the defined package version, and<TAR_ARCHIVE>is the archive from which the directory was extracted.):dh_make -p benchexec_<DEB_VERSION> --createorig -f ../<TAR_ARCHIVE> -i -c apache -
Set the version of the Debian package to the defined one by adding a changelog entry for the new version (Description can usually be
New upstream version.,UNRELEASEDin the first line should be changed tounstable.):DEBFULLNAME="<YOUR_NAME>" DEBEMAIL="<YOUR_EMAIL>" dch -v <DEB_VERSION>-1 -
For manually distributed packages:
-
Build the package:
dpkg-buildpackage --build=binary --no-signNote that this step must not be executed on an Ubuntu 21.10 or newer, as that would create zst compressed packages that are not installable on Debian.
-
Sign the package with GPG and upload it to GitHub as part of the release.
-
-
For our Ubuntu PPA:
-
Build the package:
dpkg-buildpackage --build=source -saThis needs to find a GPG key that is added to your Launchpad account, you can explicitly specify it with
--sign-key=.... -
Upload the package with
dput ppa:sosy-lab/benchmarking ../benchexec_<DEB_VERSION>-1_source.changesLaunchpad will build the package and publish it after a few minutes. If there are build errors you get an email.
-
Copy the package from the Ubuntu version for which it was built to all newer supported Ubuntu versions on this Launchpad page. Copying the binary package is enough.
-
-
Copy the file
debian/changelogback into the repository and it commit it there, to keep track of it.