From 52ced49dcac7282ee0b55506cd0d84fb5c171cae Mon Sep 17 00:00:00 2001 From: Michael Barry Date: Mon, 15 Jan 2024 14:48:34 -0500 Subject: [PATCH] Check for deterministic output in CI (#149) --- scripts/test-release.sh | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/scripts/test-release.sh b/scripts/test-release.sh index 61b08d72..b4842610 100755 --- a/scripts/test-release.sh +++ b/scripts/test-release.sh @@ -6,14 +6,18 @@ version="${1:-$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) echo "Test java build" echo "::group::OpenMapTiles monaco (java)" -rm -f data/out.mbtiles -java -jar target/*with-deps.jar --download --area=monaco --mbtiles=data/out.mbtiles -./scripts/check-monaco.sh data/out.mbtiles +# use different numbers of threads to stress-test determinism check +java -jar target/*with-deps.jar --download --area=monaco --output=data/java.mbtiles --threads=4 +./scripts/check-monaco.sh data/java.mbtiles echo "::endgroup::" echo "::endgroup::" echo "::group::OpenMapTiles monaco (docker)" -rm -f data/out.mbtiles -docker run -v "$(pwd)/data":/data openmaptiles/planetiler-openmaptiles:"${version}" --area=monaco --mbtiles=data/out.mbtiles -./scripts/check-monaco.sh data/out.mbtiles +rm -f data/docker.mbtiles +docker run -v "$(pwd)/data":/data openmaptiles/planetiler-openmaptiles:"${version}" --area=monaco --output=data/docker.mbtiles --threads=32 +./scripts/check-monaco.sh data/docker.mbtiles echo "::endgroup::" + +echo "::group::Compare" +java -cp target/*with-deps.jar com.onthegomap.planetiler.util.CompareArchives data/java.mbtiles data/docker.mbtiles +echo "::endgroup::" \ No newline at end of file