-
Notifications
You must be signed in to change notification settings - Fork 81
Preparing A Release
These notes are primarily intended for reference by the PRISM development team when building and distributing public releases.
1. Final checks/changes to code
- Make sure all local changes are
git pushed and that GitHub CI passed - Make sure all commits are documented in
CHANGELOG.txt - Make sure
prism -helpis up-to-date with all commits - Add version number and release date to
CHANGELOG.txt - Set new version number in
prism/Version.java git commit -a -m 'Version info.' && git push
2. Update manual
- Document changes or new features (on local copy)
- Set version number on Main/Welcome and Main/AllOnOnePage
- Upload manual from local copy
- Download local copy (
make doc) and commit/push (git add ../manual/ && git commit -m 'Update manual.' && git push). NB: ChangePRISM_MANUAL_WEBSITEin theMakefileto download from the local copy, but doing it from the live one seems to work slightly better, even if the new manual goes live slightly too early.
1. Create GitHub release
- Create new release for PRISM or PRISM-games
- Set (new) "Tag version" to e.g.
v4.10; no need for "Release title" - Paste bulleted list from
CHANGELOG.txtinto description field
2. Build source/binary files and attach as assets
- Go to GitHub actions for PRISM or PRISM-games
- Select "Build/publish release binaries (Linux, Mac)"
- Choose "Run workflow" with "Target tag" set to e.g.
v4.10and "Upload..." ticked - Same for "Build/publish release binaries (Windows)"
- Check files added to release successfully
3. Update source/binary + web files on web site
- In both local and remote
prism-www/dldirectory, set, e.g.:
TOOL=prism-games
VERSION=3.2.2
- Then:
if [[ -n "$TOOL" && -n "$VERSION" ]]; then
DISTRS=("src" "linux64-x86" "linux64-arm" "mac64-x86" "mac64-arm" "win64-x86")
for DISTR in "${DISTRS[@]}"; do
if [[ "$DISTR" == win* ]]; then
DISTR_FILE="${TOOL}-${VERSION}-${DISTR}-installer.exe"
DISTR_PERM=755
else
DISTR_FILE="${TOOL}-${VERSION}-${DISTR}.tar.gz"
DISTR_PERM=644
fi
wget -O "${DISTR_FILE}" "https://github.com/prismmodelchecker/${TOOL}/releases/download/v${VERSION}/${DISTR_FILE}"
chmod ${DISTR_PERM} "${DISTR_FILE}"
done
else
echo "Please set TOOL and VERSION"
fi
- Update
download.phppage
- Source distribution (Mac/Linux):
TOOL=prism-games
VERSION=3.2.2
wget https://github.com/prismmodelchecker/${TOOL}/releases/download/v${VERSION}/${TOOL}-${VERSION}-src.tar.gz
tar xfz ${TOOL}-${VERSION}-src.tar.gz
cd ${TOOL}-${VERSION}-src/prism
make && make tests
- Mac binary (local):
TOOL=prism-games
VERSION=3.2.2
DISTR=mac64-arm
wget https://github.com/prismmodelchecker/${TOOL}/releases/download/v${VERSION}/${TOOL}-${VERSION}-${DISTR}.tar.gz
tar xfz ${TOOL}-${VERSION}-${DISTR}.tar.gz
cd ${TOOL}-${VERSION}-${DISTR}
./install.sh
xattr -d com.apple.quarantine lib/*lib
etc/tests/run.sh
- Linux binary (clean VM):
TOOL=prism-games
VERSION=3.2.2
DISTR=linux64-x86
sudo apt-get -y update && sudo apt -y install default-jdk
wget https://github.com/prismmodelchecker/${TOOL}/releases/download/v${VERSION}/${TOOL}-${VERSION}-${DISTR}.tar.gz
tar xfz ${TOOL}-${VERSION}-${DISTR}.tar.gz
cd ${TOOL}-${VERSION}-${DISTR}
./install.sh
etc/tests/run.sh
- Set version number suffix in
prism/Version.javaback todev git commit src/prism/Version.java -m 'Version info (dev).'
Building a source distribution
A source distribution is built from a local git checkout.
From the prism directory, where PRISM is usually compiled, run:
make release_source
This assembles all the files needed into, for example, release/prism-4.10-src.tar.gz. This is done by taking an archive of the local master branch on git. You can change the branch if you wish, e.g.:
make release_source BRANCH=HEAD
make release_source BRANCH=newfeature
By default, the version number (4.10 above) is automatically extracted from prism/Version.java, but can be overridden if required:
make release_source VERSION=4.10.1
make release_source BRANCH=newfeature VERSION=4.10.newfeature
Building a binary distribution
A binary distribution is built from a local copy of the source,
either an unzipped source release or a local git checkout.
From the prism directory, where PRISM is usually, compiled, run:
make release
This makes sure that PRISM is compiled afresh, builds prism.jar containing all the Java class files, and assembles all the files needed into, for example, release/prism-4.10-mac64-arm.tar.gz. It's advisable to also run at least a few tests to make sure that the compiled code works properly:
etc/tests/run.sh
If building the release on a clean VM, the prism-install-* scripts in etc/scripts install everything that is needed and (optionally) compile the master branch:
Building a binary distribution (PRISM)
On (Unbuntu) Linux:
/bin/bash <(curl -fsSL https://raw.githubusercontent.com/prismmodelchecker/prism/master/prism/etc/scripts/prism-install-ubuntu) --nobuild
On Windows (in a Command Prompt and Cygwin shell respectively:
"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -Command "wget -Uri https://raw.githubusercontent.com/prismmodelchecker/prism/master/prism/etc/scripts/prism-install-windows.bat -Outfile prism-install-windows.bat" && cmd /K .\prism-install-windows.bat
/bin/bash <(curl -fsSL https://raw.githubusercontent.com/prismmodelchecker/prism/master/prism/etc/scripts/prism-install-cygwin) --nobuild
And then (all OSs):
export VERSION=X.X
wget https://www.prismmodelchecker.org/dl/prism-$VERSION-src.tar.gz
tar xfz prism-$VERSION-src.tar.gz
cd prism-$VERSION-src/prism && make release && etc/tests/run.sh
Building a binary distribution (PRISM-games)
On (Unbuntu) Linux:
/bin/bash <(curl -fsSL https://raw.githubusercontent.com/prismmodelchecker/prism-games/master/prism/etc/scripts/prism-install-ubuntu) --nobuild
On Windows (in a Command Prompt and Cygwin shell respectively:
"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -Command "wget -Uri https://raw.githubusercontent.com/prismmodelchecker/prism-games/master/prism/etc/scripts/prism-install-windows.bat -Outfile prism-install-windows.bat" && cmd /K .\prism-install-windows.bat
/bin/bash <(curl -fsSL https://raw.githubusercontent.com/prismmodelchecker/prism-games/master/prism/etc/scripts/prism-install-cygwin) --nobuild
And then (all OSs):
export VERSION=X.X
wget https://www.prismmodelchecker.org/dl/prism-games-$VERSION-src.tar.gz
tar xfz prism-games-$VERSION-src.tar.gz
cd prism-games-$VERSION-src/prism && make release && etc/tests/run.sh
Building a binary distribution (customisations)
By default, the version number (4.8 above) is automatically extracted from prism/Version.java, but can be overridden if required:
make release VERSION=4.8.1
The platform name is derived automatically from the current build, but can be changed. For example, to cross-compile for (older) Intel macOS on a (newer) Arm-based Mac, use:
make release ARCH=x86_64