diff --git a/pom.xml b/pom.xml index 12a3838..002520b 100644 --- a/pom.xml +++ b/pom.xml @@ -482,7 +482,7 @@ ${ij1-patcher.version} - 2.1.0 + 2.1.1 ${imagej-common.version} @@ -502,7 +502,7 @@ ${imagej-matlab.version} - 0.8.1 + 0.8.2 ${imagej-mesh.version} @@ -526,7 +526,7 @@ ${imagej-opencv.version} - 2.1.0 + 2.2.0 ${imagej-ops.version} @@ -580,11 +580,11 @@ - 6.3.0 + 7.1.1 ${imglib2.version} - 0.14.0 + 0.16.0 ${imglib2-algorithm.version} @@ -596,31 +596,31 @@ ${imglib2-algorithm-gpl.version} - 1.0.0-beta-17 + 1.0.0-beta-18 ${imglib2-cache.version} - 2.0.1 + 2.0.3 ${imglib2-ij.version} - 2.0.0 + 2.0.1 ${imglib2-imglyb.version} - 1.0.0 + 1.1.0 ${imglib2-mesh.version} - 4.0.2 + 4.0.3 ${imglib2-realtransform.version} - 0.14.1 + 0.15.1 ${imglib2-roi.version} - 1.0.0 + 1.1.0 ${imglib2-unsafe.version} @@ -861,7 +861,7 @@ 2.0.2 ${SPIM_Opener.version} - 5.0.25 + 5.0.26 ${SPIM_Registration.version} 2.0.3 @@ -991,7 +991,7 @@ ${jitk-tps.version} - 9.1.2 + 9.1.4 ${bigwarp.version} ${bigwarp_fiji.version} @@ -1006,13 +1006,13 @@ ${trakem2_tps.version} - 1.1.2 + 1.1.3 ${z_spacing.version} - 10.4.14 + 10.6.1 ${bigdataviewer-core.version} @@ -1020,21 +1020,21 @@ ${bigdataviewer-server.version} - 1.0.0-beta-34 + 1.0.0-beta-36 ${bigdataviewer-vistools.version} - 6.3.0 + 6.4.0 ${bigdataviewer_fiji.version} - 2.2.7 + 2.3.2 ${spim_data.version} - 7.12.1 + 7.14.0 ${TrackMate.version} @@ -1068,7 +1068,7 @@ ${TrackMate-Oneat.version} - 2.0.1 + 2.0.3 ${TrackMate-Skeleton.version} @@ -1129,11 +1129,11 @@ ${n5-hdf5.version} - 4.2.1 + 4.2.2 ${n5-ij.version} - 7.0.0 + 7.0.1 ${n5-imglib2.version} @@ -1178,8 +1178,8 @@ ${clijx-weka_.version} - 1.2.10 - 3.2.7 + 1.3.0 + 3.4.0 0.2.0 ${BigStitcher.version} ${multiview-reconstruction.version} @@ -1207,8 +1207,8 @@ ${MaMuT.version} - 0.1.17 - 0.3.11 + 0.1.18 + 0.4.0 ${labkit-pixel-classification.version} ${labkit-ui.version} diff --git a/tests/run.sh b/tests/run.sh index 0b64a7d..edb3e60 100755 --- a/tests/run.sh +++ b/tests/run.sh @@ -19,14 +19,14 @@ sectionEnd() { sectionStart 'Generating mega-melt project' -dir=$(dirname "$0") +dir=$(cd "$(dirname "$0")" && pwd) pom="$dir/../pom.xml" test -f "$pom" || die 'Where is pom.xml?!' generateMegaMeltScript="$dir/generate-mega-melt.py" filterBuildLogScript="$dir/filter-build-log.py" -megaMeltDir="$dir/../target/mega-melt" +megaMeltDir=$(cd "$dir/../target/mega-melt" && pwd) pomParent="$megaMeltDir/../pom.xml" versionSwapLog="$megaMeltDir/version-swap.log" dependencyTreeLog="$megaMeltDir/dependency-tree.log" @@ -114,34 +114,154 @@ chmod +x "$meltingPotScript" && test "$(grep -F "[ERROR]" "$meltingPotLog" | grep -v "using default branch")" && die 'Melting pot generation failed!' -sectionStart 'Adjusting the melting pot' - buildScript="$meltingPotDir/build.sh" -buildScriptTemp="$buildScript.tmp" + +echo +echo 'Hacking in any changed components...' + +# Mix in changed components. Syntax is: +# +# groupId|artifactId|path-to-remote|remote-ref +# +# Example: +# +# components=' +# org.janelia.saalfeldlab|n5-imglib2|git@github.com:saalfeldlab/n5-imglib2|pull/54/head +# sc.fiji|SPIM_Registration|git@github.com:fiji/SPIM_Registration|pull/142/head +# sc.fiji|labkit-ui|git@github.com:juglab/labkit-ui|pull/115/head +# sc.fiji|labkit-pixel-classification|git@github.com:juglab/labkit-pixel-classification|pull/12/head +# sc.fiji|z_spacing|git@github.com:saalfeldlab/z-spacing|pull/28/head +# net.imagej|imagej-common|git@github.com:imagej/imagej-common|pull/112/head +# sc.fiji|TrackMate|git@github.com:trackmate-sc/TrackMate|pull/289/head +# sc.fiji|TrackMate-Skeleton|git@github.com:trackmate-sc/TrackMate-Skeleton|pull/2/head +# sc.fiji|bigwarp_fiji|git@github.com:saalfeldlab/bigwarp|pull/170/head +# net.imagej|imagej-ops|git@github.com:imagej/imagej-ops|pull/654/head +# ' +# +# One entry per line inside the components variable declaration. +# No leading or trailing whitespace anywhere. +# +# Each component will: +# 1. Be updated to that ref (cloning as needed); +# 2. Have its version adjusted to 999 in its pom.xml and gav marker; +# 3. Be `mvn install`ed to the local repo cache at that version; +# 4. Have its version adjusted to 999 in melting pot's build.sh; +# 5. Be added to the list of components to build in melt.sh (if not already present). +components='' +failFile="$meltingPotDir/fail" +rm -f "$failFile" +echo "$components" | while read component +do + test "$component" || continue + + g=${component%%|*}; r=${component#*|} + a=${r%%|*}; r=${r#*|} + remote=${r%%|*}; ref=${r#*|} + test "$g" -a "$a" -a "$remote" -a "$ref" || { + touch "$failFile" + die "Invalid component line: $component" + } + d="$meltingPotDir/$g/$a" + printf "[$g:$a] " + + # Update component working copy to desired ref (cloning as needed). + mkdir -p "$d" && + echo "Log of actions for custom version of $g:$a" > "$d/surgery.log" && + echo >> "$d/surgery.log" && + test -f "$d/.git" || git init "$d" >> "$d/surgery.log" || { + touch "$failFile" + die "Failed to access or initialize repository in directory $d" + } + printf . + cd "$d" && + git remote add mega-melt "$remote" >> surgery.log && + printf . && + git fetch mega-melt --depth 1 "$ref":mega-melt >> surgery.log 2>&1 && + printf . && + git switch mega-melt >> surgery.log 2>&1 || { + touch "$failFile" + die "$g:$a: failed to fetch ref '$ref' from remote $remote" + } + printf . + + # Adjust component version to 999. + mvn versions:set -DnewVersion=999 >> surgery.log || { + touch "$failFile" + die "$g:$a: failed to adjust pom.xml version" + } + printf . + if [ -f gav ] + then + mv gav gav.prehacks + sed -E "s;:[^:]*$;:999;" gav.prehacks > gav || { + touch "$failFile" + die "$g:$a: failed to adjust gav version" + } + fi + printf . + + # Install changed component into the local repo cache. + mvn -Denforcer.skip -Dmaven.test.skip install >> surgery.log || { + touch "$failFile" + die "$g:$a: failed to build and install component" + } + printf . + + # Adjust component version to 999 in melting pot's build.sh. + cd "$meltingPotDir" + test -f "$buildScript.prehacks" || cp "$buildScript" "$buildScript.prehacks" || { + touch "$failFile" + die "$g:$a: failed to back up $buildScript" + } + printf . + mv -f "$buildScript" "$buildScript.tmp" && + sed -E "s;(-D($g\\.)?$a\\.version)=[^ ]*;\1=999;g" "$buildScript.tmp" > "$buildScript" || { + touch "$failFile" + die "$g:$a: failed to adjust component version in $buildScript" + } + printf . + + # Add component to the build list in melt.sh (if not already present). + grep -q "\b$g/$a\b" "$meltScript" || { + test -f "$meltScript.prehacks" || cp "$meltScript" "$meltScript.prehacks" + mv -f "$meltScript" "$meltScript.tmp" && + perl -0777 -pe 's;\n+do\n;\n '"$g/$a"' \\$&;igs' "$meltScript.tmp" > "$meltScript" + } || { + touch "$failFile" + die "$g:$a: failed to add component to the build list in $meltScript" + } + printf ".\n" +done +rm -f "$buildScript.tmp" "$meltScript.tmp" +test ! -f "$failFile" || + die "Failed to hack in changed components!" + +sectionStart 'Adjusting the melting pot: build.sh script' + cp "$buildScript" "$buildScript.original" && # HACK: Remove known-duplicate short version properties, keeping # the short version declaration only for the more common groupId. # E.g.: org.antlr:antlr is preferred over antlr:antlr, so we set # antlr.version to match org.antlr:antlr, not antlr:antlr. -mv -f "$buildScript" "$buildScriptTemp" && -sed -E 's;(-D('"$shortVersionClashes"').version=[^ ]*) -D[^ ]*;\1;' "$buildScriptTemp" > "$buildScript" && +mv -f "$buildScript" "$buildScript.tmp" && +sed -E 's;(-D('"$shortVersionClashes"').version=[^ ]*) -D[^ ]*;\1;' "$buildScript.tmp" > "$buildScript" && # HACK: Add leading underscore to version properties that start with a digit. -mv -f "$buildScript" "$buildScriptTemp" && -sed -E 's; -D([0-9][^ ]*);& -D_\1;' "$buildScriptTemp" > "$buildScript" && +mv -f "$buildScript" "$buildScript.tmp" && +sed -E 's; -D([0-9][^ ]*);& -D_\1;' "$buildScript.tmp" > "$buildScript" && # HACK: Add non-standard version properties used prior to # pom-scijava 32.0.0-beta-1; see d0bf752070d96a2613c42e4e1ab86ebdd07c29ee. -mv -f "$buildScript" "$buildScriptTemp" && -sed -E 's; -Dsc.fiji.3D_Blob_Segmentation\.version=([^ ]*);& -DFiji_3D_Blob_Segmentation.version=\1;' "$buildScriptTemp" > "$buildScript" && -mv -f "$buildScript" "$buildScriptTemp" && -sed -E 's; -Dsc.fiji.(3D_Objects_Counter|3D_Viewer)\.version=([^ ]*);& -DImageJ_\1.version=\2;' "$buildScriptTemp" > "$buildScript" && +mv -f "$buildScript" "$buildScript.tmp" && +sed -E 's; -Dsc.fiji.3D_Blob_Segmentation\.version=([^ ]*);& -DFiji_3D_Blob_Segmentation.version=\1;' "$buildScript.tmp" > "$buildScript" && +mv -f "$buildScript" "$buildScript.tmp" && +sed -E 's; -Dsc.fiji.(3D_Objects_Counter|3D_Viewer)\.version=([^ ]*);& -DImageJ_\1.version=\2;' "$buildScript.tmp" > "$buildScript" && # HACK: Add non-standard net.imagej:ij version property used prior to # pom-scijava 28.0.0; see 7d2cc442b107b3ac2dcb799d282f2c0b5822649d. -mv -f "$buildScript" "$buildScriptTemp" && -sed -E 's; -Dij\.version=([^ ]*);& -Dimagej1.version=\1;' "$buildScriptTemp" > "$buildScript" && +mv -f "$buildScript" "$buildScript.tmp" && +sed -E 's; -Dij\.version=([^ ]*);& -Dimagej1.version=\1;' "$buildScript.tmp" > "$buildScript" && # HACK: Add explicit kotlin.version to match our pom-scijava-base. # Otherwise, components built on older pom-scijava-base will have @@ -170,13 +290,17 @@ enforcerVersion=$( mvn -B -U -q -Denforcer.skip=true -Dexec.executable=echo \ -Dexec.args='${maven-enforcer-plugin.version}' --non-recursive validate exec:exec 2>&1 | head -n1 | sed 's;\(.\[[0-9]m\)*;;') && -mv -f "$buildScript" "$buildScriptTemp" && -sed -E "s;mvn -Denforcer.skip;& -Dmaven-enforcer-plugin.version=$enforcerVersion -Dkotlin.version=$kotlinVersion;" "$buildScriptTemp" > "$buildScript" && +mv -f "$buildScript" "$buildScript.tmp" && +sed -E "s;mvn -Denforcer.skip;& -Dmaven-enforcer-plugin.version=$enforcerVersion -Dkotlin.version=$kotlinVersion;" "$buildScript.tmp" > "$buildScript" && chmod +x "$buildScript" && -rm "$buildScriptTemp" || +rm "$buildScript.tmp" || die 'Error adjusting melting pot build script!' +sectionEnd # Adjusting the melting pot: build.sh script + +sectionStart 'Adjusting the melting pot: component POMs' + # HACK: Adjust component POMs to satisfy Maven HTTPS strictness. find "$meltingPotDir" -name pom.xml | while read pom @@ -195,6 +319,10 @@ do perl -0777 -i -pe 's/(\s*org.scijava<\/groupId>\s*pom-scijava<\/artifactId>\s*)[^\n]*/${1}999-mega-melt<\/version>/igs' "$pom" done +sectionEnd # Adjusting the melting pot: component POMs + +sectionStart 'Adjusting the melting pot: melt.sh script' + # HACK: Skip tests for projects with known problems. mv "$meltScript" "$meltScript.original" && @@ -207,6 +335,10 @@ grep -qxF "$f" $dir/skipTests.txt \&\& buildFlags=-DskipTests\ chmod +x "$meltScript" || die "Failed to adjust $meltScript" +sectionEnd # Adjusting the melting pot: melt.sh script + +sectionStart 'Adjusting the melting pot: unit test hacks' + # HACK: Remove flaky tests from imagej-ops builds. # CachedOpEnvironmentTest fails intermittently. Of course, it should be # somehow fixed in imagej-ops. But for now, let's not let it ruin the melt. @@ -219,7 +351,7 @@ echo "org.janelia.saalfeldlab/n5-aws-s3" >> "$skipTestsFile" && echo "sc.fiji/labkit-pixel-classification" >> "$skipTestsFile" || die "Failed to generate $skipTestsFile" -sectionEnd # Adjusting the melting pot +sectionEnd # Adjusting the melting pot: unit test hacks # Run the melting pot now, unless -s flag was given. doMelt=t