Skip to content

Commit

Permalink
Merge branch 'upstream-main' into 215-deterministic_ordering-v2
Browse files Browse the repository at this point in the history
  • Loading branch information
phanecak-maptiler committed Oct 30, 2023
2 parents f71ee5c + 9f96002 commit 8d381c9
Show file tree
Hide file tree
Showing 179 changed files with 50,207 additions and 1,829 deletions.
3 changes: 2 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ updates:
labels:
- dependencies
ignore:
- dependency-name: "com.graphhopper:graphhopper-reader-osm"
- dependency-name: "com.google.protobuf:protobuf-java"
versions: [ "3.23.3" ]
- package-ecosystem: maven
# workaround for non-standard pom.xml filename (https://github.com/dependabot/dependabot-core/issues/4425)
directory: "/.github/planetiler-examples-dependabot"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
# don't need to check planetiler-openmaptiles
submodules: false
Expand Down
33 changes: 16 additions & 17 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: 17
java-version: 21
distribution: 'temurin'
cache: 'maven'
- name: Ensure code formatted with mvn spotless:apply
Expand All @@ -34,19 +34,18 @@ jobs:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
jdk: [ 17 ]
jdk: [ 21 ]
include:
- os: ubuntu-latest
jdk: 17
jdk: 21
args: "-DargLine='-Duser.language=fr -Duser.country=FR'"
- os: ubuntu-latest
jdk: 18
- os: ubuntu-latest
jdk: 19
jdk: 21
args: ""
runs-on: ${{ matrix.os }}
timeout-minutes: 15
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
- name: Set up JDK ${{ matrix.jdk }}
Expand All @@ -70,13 +69,13 @@ jobs:
timeout-minutes: 15
continue-on-error: true
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: 17
java-version: 21
distribution: 'temurin'
- name: Build and test
run: mvn --batch-mode -no-transfer-progress package --file standalone.pom.xml
Expand All @@ -85,7 +84,7 @@ jobs:
run: mv target/*with-deps.jar ./run.jar
working-directory: planetiler-examples
- name: Run
run: java -jar run.jar --osm-path=../planetiler-core/src/test/resources/monaco-latest.osm.pbf --mbtiles=data/out.mbtiles
run: java -jar run.jar --osm-path=../planetiler-core/src/test/resources/monaco-latest.osm.pbf --output=data/out.mbtiles
working-directory: planetiler-examples
- name: Verify
run: java -cp run.jar com.onthegomap.planetiler.mbtiles.Verify data/out.mbtiles
Expand All @@ -96,15 +95,15 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
- name: Cache data/sources
uses: ./.github/cache-sources-action
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 17
java-version: 21
distribution: 'temurin'
cache: 'maven'

Expand Down Expand Up @@ -133,15 +132,15 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true
- name: Cache data/sources
uses: ./.github/cache-sources-action
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 17
java-version: 21
distribution: 'temurin'
cache: 'maven'

Expand Down
130 changes: 65 additions & 65 deletions .github/workflows/performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,73 +22,73 @@ jobs:
timeout-minutes: 20
continue-on-error: true
steps:
- name: 'Cancel previous runs'
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}
- name: 'Checkout branch'
uses: actions/checkout@v3
with:
path: branch
submodules: true
- name: 'Checkout base'
uses: actions/checkout@v3
with:
path: base
ref: ${{ github.event.pull_request.base.sha }}
submodules: true
- name: Cache data/sources
uses: ./branch/.github/cache-sources-action
with:
basedir: branch
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'temurin'
cache: 'maven'
- uses: actions/setup-node@v3
with:
node-version: '14'
- run: npm install -g [email protected]
- name: 'Cancel previous runs'
uses: styfle/cancel-workflow-action@0.12.0
with:
access_token: ${{ github.token }}
- name: 'Checkout branch'
uses: actions/checkout@v4
with:
path: branch
submodules: true
- name: 'Checkout base'
uses: actions/checkout@v4
with:
path: base
ref: ${{ github.event.pull_request.base.sha }}
submodules: true
- name: Cache data/sources
uses: ./branch/.github/cache-sources-action
with:
basedir: branch
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 21
distribution: 'temurin'
cache: 'maven'
- uses: actions/setup-node@v4
with:
node-version: '14'
- run: npm install -g [email protected]

- name: 'Build branch'
run: ./scripts/build.sh
working-directory: branch
- name: 'Build base'
run: ./scripts/build.sh
working-directory: base
- name: 'Build branch'
run: ./scripts/build.sh
working-directory: branch
- name: 'Build base'
run: ./scripts/build.sh
working-directory: base

- name: 'Download data'
run: |
set -eo pipefail
cp base/planetiler-dist/target/*with-deps.jar run.jar && java -jar run.jar --only-download --area="${{ env.AREA }}"
cp branch/planetiler-dist/target/*with-deps.jar run.jar && java -jar run.jar --only-download --area="${{ env.AREA }}"
- name: 'Download data'
run: |
set -eo pipefail
cp base/planetiler-dist/target/*with-deps.jar run.jar && java -jar run.jar --only-download --area="${{ env.AREA }}"
cp branch/planetiler-dist/target/*with-deps.jar run.jar && java -jar run.jar --only-download --area="${{ env.AREA }}"
- name: 'Store build info'
run: |
mkdir build-info
echo "${{ github.event.pull_request.base.sha }}" > build-info/base_sha
echo "${{ github.sha }}" > build-info/branch_sha
echo "${{ github.event.number }}" > build-info/pull_request_number
- name: 'Store build info'
run: |
mkdir build-info
echo "${{ github.event.pull_request.base.sha }}" > build-info/base_sha
echo "${{ github.sha }}" > build-info/branch_sha
echo "${{ github.event.number }}" > build-info/pull_request_number
- name: 'Run branch'
run: |
rm -rf data/out.mbtiles data/tmp
cp branch/planetiler-dist/target/*with-deps.jar run.jar
java -Xms${{ env.RAM }} -Xmx${{ env.RAM }} -jar run.jar --area="${{ env.AREA }}" "${{ env.BOUNDS_ARG }}" --mbtiles=data/out.mbtiles 2>&1 | tee log
ls -alh run.jar | tee -a log
cat log | strip-ansi > build-info/branchlogs.txt
- name: 'Run base'
run: |
rm -rf data/out.mbtiles data/tmp
cp base/planetiler-dist/target/*with-deps.jar run.jar
java -Xms${{ env.RAM }} -Xmx${{ env.RAM }} -jar run.jar --area="${{ env.AREA }}" "${{ env.BOUNDS_ARG }}" --mbtiles=data/out.mbtiles 2>&1 | tee log
ls -alh run.jar | tee -a log
cat log | strip-ansi > build-info/baselogs.txt
- name: 'Run branch'
run: |
rm -rf data/out.mbtiles data/tmp
cp branch/planetiler-dist/target/*with-deps.jar run.jar
java -Xms${{ env.RAM }} -Xmx${{ env.RAM }} -jar run.jar --area="${{ env.AREA }}" "${{ env.BOUNDS_ARG }}" --output=data/out.mbtiles --keep-unzipped 2>&1 | tee log
ls -alh run.jar | tee -a log
cat log | strip-ansi > build-info/branchlogs.txt
- name: 'Run base'
run: |
rm -rf data/out.mbtiles data/tmp
cp base/planetiler-dist/target/*with-deps.jar run.jar
java -Xms${{ env.RAM }} -Xmx${{ env.RAM }} -jar run.jar --area="${{ env.AREA }}" "${{ env.BOUNDS_ARG }}" --output=data/out.mbtiles --keep-unzipped 2>&1 | tee log
ls -alh run.jar | tee -a log
cat log | strip-ansi > build-info/baselogs.txt
- name: 'Upload build-info'
uses: actions/upload-artifact@v3
with:
name: build-info
path: ./build-info
- name: 'Upload build-info'
uses: actions/upload-artifact@v3
with:
name: build-info
path: ./build-info
120 changes: 60 additions & 60 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,65 +18,65 @@ jobs:
contents: write
packages: write
steps:
- name: Ensure version does not start with 'v'
uses: actions/github-script@v6
with:
github-token: ${{ github.token }}
script: |
version = context.payload.inputs.version;
if (/^v/.test(version)) throw new Error("Bad version number: " + version)
- uses: actions/checkout@v3
with:
submodules: true
- name: Cache data/sources
uses: ./.github/cache-sources-action
- uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: 'maven'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Ensure version does not start with 'v'
uses: actions/github-script@v6
with:
github-token: ${{ github.token }}
script: |
version = context.payload.inputs.version;
if (/^v/.test(version)) throw new Error("Bad version number: " + version)
- uses: actions/checkout@v4
with:
submodules: true
- name: Cache data/sources
uses: ./.github/cache-sources-action
- uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'
cache: 'maven'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD

- name: Check tag does not exist yet
run: if git rev-list "v${{ github.event.inputs.version }}"; then echo "Tag already exists. Aborting the release process."; exit 1; fi
- name: Check tag does not exist yet
run: if git rev-list "v${{ github.event.inputs.version }}"; then echo "Tag already exists. Aborting the release process."; exit 1; fi

- run: ./scripts/set-versions.sh "${{ github.event.inputs.version }}"
- run: ./scripts/build-release.sh
- run: ./scripts/test-release.sh "${{ github.event.inputs.version }}"
- name: Create tag
uses: actions/github-script@v6
with:
github-token: ${{ github.token }}
script: |
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: "refs/tags/v${{ github.event.inputs.version }}",
sha: context.sha
})
- run: mv planetiler-dist/target/*with-deps.jar planetiler.jar
- run: sha256sum planetiler.jar > planetiler.jar.sha256
- run: md5sum planetiler.jar > planetiler.jar.md5
- name: Install GPG Private Key
run: |
echo -n "${{ secrets.OSSRH_GPG_SECRET_KEY }}" | base64 --decode | gpg --batch --import
- name: Create Release
uses: softprops/action-gh-release@v1
with:
fail_on_unmatched_files: true
tag_name: v${{ github.event.inputs.version }}
draft: true
files: |
planetiler.jar*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: ./scripts/push-release.sh ${{ github.event.inputs.version }}
env:
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
IMAGE_TAGS: ${{ github.event.inputs.image_tags }}
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
OSSRH_GPG_SECRET_KEY_PASSWORD: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
- run: ./scripts/set-versions.sh "${{ github.event.inputs.version }}"
- run: ./scripts/build-release.sh
- run: ./scripts/test-release.sh "${{ github.event.inputs.version }}"
- name: Create tag
uses: actions/github-script@v6
with:
github-token: ${{ github.token }}
script: |
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: "refs/tags/v${{ github.event.inputs.version }}",
sha: context.sha
})
- run: mv planetiler-dist/target/*with-deps.jar planetiler.jar
- run: sha256sum planetiler.jar > planetiler.jar.sha256
- run: md5sum planetiler.jar > planetiler.jar.md5
- name: Install GPG Private Key
run: |
echo -n "${{ secrets.OSSRH_GPG_SECRET_KEY }}" | base64 --decode | gpg --batch --import
- name: Create Release
uses: softprops/action-gh-release@v1
with:
fail_on_unmatched_files: true
tag_name: v${{ github.event.inputs.version }}
draft: true
files: |
planetiler.jar*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: ./scripts/push-release.sh ${{ github.event.inputs.version }}
env:
GITHUB_ACTOR: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
IMAGE_TAGS: ${{ github.event.inputs.image_tags }}
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
OSSRH_GPG_SECRET_KEY_PASSWORD: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
Loading

0 comments on commit 8d381c9

Please sign in to comment.