Description
Since the transition from Travis CI to GitHub Actions, the infrastructure that builds net.imagej:ij
and deploys it to OSS Sonatype is broken. (The latest available on OSS Sonatype as of this writing is 1.53j, published in May 2021. Since then, ImageJ 1.53k and 1.53m have been released, with 1.53o daily builds currently in progress.)
The following problems need to be addressed to fix it:
- ij1-builds needs to run every day, not just on pushes to the main branch. Hopefully fixed with imagej/ij1-builds@49566d3.
- ImageJA needs to switch from Travis CI to GitHub Actions. I looked into doing this, but the ImageJA Travis build script was forked from
travis-build.sh
so that it can handle releases differently, andci-build.sh
does not accommodate the ImageJA workflow either. But it could, easily. So rather than keep a forked build script, the needed fix is to enhanceci-build.sh
(in scijava/scijava-scripts) to handle the "ImageJA way" of deploying releases directly from the main branch. - Any missing release versions that happened in the interim need to be back-filled to OSS Sonatype.
@rasband This is far from the first time this tooling has broken down. It is convoluted and brittle. I would prefer to simplify this structure to make things easier to maintain and less breakage-prone. As such, I propose merging the existing original-ImageJ-related repositories into a single imagej/ImageJ repository, as follows:
- Merge imagej/ij1-tests into this repository. Fix the failing tests.
- Add build logic to this repository to run the unit tests as part of the build, and to deploy builds (both daily builds and releases) to OSS Sonatype via GitHub Actions. Get rid of imagej/ImageJA and imagej/ij1-builds, which would no longer be necessary, merging the ImageJA history into this repository so that all the old release tags are still functional.
- Rename this repository to imagej/ImageJ, to indicate that it is the ImageJ repository.
- To make all of imagej/ij1-tests, imagej/ImageJA, and imagej/imagej1 redirect correctly to imagej/ImageJ, I would rename each to imagej/ImageJ in sequence before deleting the former two, so that GitHub has permanent redirects on file for them. That way, anyone who had cloned any of these repositories, or gets the remote URLs out of pom.xml files and such, would still have a trail leading to the new definitive repository.
For steps (1) and (2), while it's probably possible to achieve without moving around any existing source files, it would be much easier if the existing .java
files moved into a common src
subtree. Would you be willing to do that? (With Maven, src/main/java
is standard, with unit tests going in src/test/java
, but I can make src
and test
work if you strongly prefer that.) Or if you would rather nothing move from its current location, I could investigate how to achieve that.
Either way, for step (2) to work, it would be necessary for you to make releases of ImageJ by pushing to the main branch on GitHub and letting the GitHub Actions CI do the work, rather than making the zip yourself and uploading from your local machine. As things stand, the ij1-builds repository needs to poll the notes.html once per day, and then download the zip, unpack it, move files to their mapped locations in the ImageJA repository, and push it, so that the ImageJA CI can build and deploy a JAR. This will of course not be the same JAR that you built locally, meaning the releases available from the ImageJ downloads page are not binary identical to the ones from Maven Central.
What do you think? Would you like to have one ImageJ repository with all these bits? Or would you rather not change your current workflows as discussed above?
A different idea would be retire/archive ij1-tests and ImageJA, and rework ij1-builds to deploy JAR files using mvn deploy:deploy-file
so the release builds are binary identical to what you produce on your local machine. But then users would have no corresponding commit hash or tag for each release, so would not be able to reproduce the release builds themselves from source control. (You do not push the source code at each release build anywhere, do you?) It would probably be possible for me to manually construct -sources
and -javadoc
JARs as part of that process, but it's extra work that would already be done by Maven-based tooling. (The purpose of a -sources
JAR is mostly to let IDEs display the source code to people using ImageJ as a dependency, not to enable rebuilding from source.)