Skip to content

Commit

Permalink
Check for deterministic output in CI (#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
msbarry authored Jan 15, 2024
1 parent f038d69 commit 52ced49
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions scripts/test-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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::"

0 comments on commit 52ced49

Please sign in to comment.