Page history Edit this page How do I edit this website?

Github Actions

GitHub supports workflow automation in the cloud through Github Actions. This feature is very useful for automating builds, deployment and other aspects of continuous integration.

Services

SciJava projects use Github Actions in a variety of ways:

  • Perform builds of SciJava projects. Github Actions deploy SNAPSHOT builds to the SciJava Maven repository in response to pushes to each code repository’s master branch. So any downstream projects depending on a version of LATEST for a given component will match the last successful Github build—i.e., the latest code on master.
  • Run each project’s associated unit tests. Github Actions is instrumental in early detection of new bugs introduced to the codebase.
  • Perform releases of SciJava projects. Github Actions deploys release builds to the appropriate Maven repository—typically either the SciJava Maven repository or OSS Sonatype.
  • Keep the javadoc site updated.
  • Keep other web resources updated.

Automatic Deployment of Maven Artifacts

Deploying your library to a Maven repository makes it available for other developers. It is also a contribution requirement for the Fiji project.

Requirements

Instructions

  • In order to add Github CI support to a repository, the secrets are needed: A) for deploying to Maven repositories; and B) in the case of deploying to OSS Sonatype, for GPG signing of artifacts.
  • If the secrets have been added to your organization, and you have push access to the relevant repository on GitHub, you can use the github-actionify.sh script with the -f flag to perform the needed operations.
  • The github-actionify script will return ‘[ERROR] Dirty working copy’ if you have uncommited changes. If you get this error, check the status of the repository with git status and then run github-actionify -f again.
  • If you need help, please ask on the Image.sc Forum in the Development category, or in the scijava-common channel on Gitter.

Configuration of JavaFX builds

  • The workflows setup by the github-actionify.sh script do not include JavaFX.
  • To add support for JavaFX edit the files contained in the folder .github/workflows/ to match those found in other SciJava projects that depend on JavaFX, e.g. FilamentDetector.

Testing things which cannot run headless

If your tests require a display (i.e.: they do not pass when run headless), you can use Xvfb as follows:

before_script:
  - "export DISPLAY=:99.0"
  - "sh -e /etc/init.d/xvfb start"
  - sleep 3 # give xvfb some time to start

Of course, you should do this only as a last resort, since the best unit tests should not require a display in the first place.