Releasing CamFort - camfort/camfort GitHub Wiki
2021-10-11 raehik: Some of the releasing process differs with the Travis setup being replaced with GitHub Actions. Mac and Windows builds are automated on roughly the same level as Linux. The Homebrew formula uses a fancy GitHub Actions setup that automates most of the pain away (actually all, but I have no Mac to confirm it all works as expected) -- see the readme for usage.
Extra note: We now also export an sdist and Haddock archive each build. Now for a release, you should merge the release commit, gather the resulting artifacts, then make GitHub and Haddock releases. (It could be automated if anyone's interested.)
This document is for the benefit of maintainers and wouldn't provide any useful information to general user.
- If fortran-src needs to be deployed, do that first
- Check if the version number is higher than the most recent release, if not make a commit to bump the number
stack test-
git tag <tag>(git tagto see previous tags for tag convention) -
git push origin <tag>This will trigger Travis to run the tests, try building docs, and attempt to deploy at GitHub and Hackage.- GitHub release will succeed and it will upload a
-O3Linux build as a tarball. - Hackage release will fail due to the deployment mechanism Travis currently uses for Hackage. We might want to submit a pull request https://github.com/travis-ci/dpl/blob/master/lib/dpl/provider/hackage.rb to use
stackif available and forget about Cabal.
- GitHub release will succeed and it will upload a
- Fire up a macOS instance:
- For binary:
- Run
stack build camfort --ghc-options='-O3' - Extract binary from
.stack-works - Rename to
camfort-MacOS-<arch>(where arch is either x64 or x86 so far) - Create a tarball out of it
- Upload the tarball to GitHub Releases via web interface
- Run
- For Homebrew:
- Clone https://github.com/camfort/homebrew-camfort
- Edit
Formula/camfort.rbto change the version number of CamFort and comment out thebottle do ... endblock - Make a commit and push it
- Install Homebrew and run
brew update - If camfort is installed run
brew uninstall camfort - Run
brew install camfort/camfort/camfort --build-bottle - On completion you will have a
bottleblock similar to the one you commented out and a tarball in the directory you ran the command. - Upload the tarball to GitHub releases.
- Reintroduce commented out code in
camfort.rb(only for relevant macOS version) and replace the SHA256 with the one you have been given. - Make a new commit and push it
- Fire up an older macOS version and repeat GOTO 4
- For binary:
- Let Dr Rice know to start Windows builds
- Make a commit after all is over to bump the version number and push