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.

  1. If fortran-src needs to be deployed, do that first
  2. Check if the version number is higher than the most recent release, if not make a commit to bump the number
  3. stack test
  4. git tag <tag> (git tag to see previous tags for tag convention)
  5. git push origin <tag> This will trigger Travis to run the tests, try building docs, and attempt to deploy at GitHub and Hackage.
    1. GitHub release will succeed and it will upload a -O3 Linux build as a tarball.
    2. 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 stack if available and forget about Cabal.
  6. Fire up a macOS instance:
    1. For binary:
      1. Run stack build camfort --ghc-options='-O3'
      2. Extract binary from .stack-works
      3. Rename to camfort-MacOS-<arch> (where arch is either x64 or x86 so far)
      4. Create a tarball out of it
      5. Upload the tarball to GitHub Releases via web interface
    2. For Homebrew:
      1. Clone https://github.com/camfort/homebrew-camfort
      2. Edit Formula/camfort.rb to change the version number of CamFort and comment out the bottle do ... end block
      3. Make a commit and push it
      4. Install Homebrew and run brew update
      5. If camfort is installed run brew uninstall camfort
      6. Run brew install camfort/camfort/camfort --build-bottle
      7. On completion you will have a bottle block similar to the one you commented out and a tarball in the directory you ran the command.
      8. Upload the tarball to GitHub releases.
      9. Reintroduce commented out code in camfort.rb (only for relevant macOS version) and replace the SHA256 with the one you have been given.
      10. Make a new commit and push it
      11. Fire up an older macOS version and repeat GOTO 4
  7. Let Dr Rice know to start Windows builds
  8. Make a commit after all is over to bump the version number and push
⚠️ **GitHub.com Fallback** ⚠️