forked from graphhopper/graphhopper
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
7 changed files
with
182 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Please read [our contributing guide](https://github.com/graphhopper/graphhopper/blob/master/CONTRIBUTING.md) and note that also your contribution falls under the Apache License 2.0 as outlined there. | ||
|
||
Your first contribution should include a change where you add yourself to the CONTRIBUTORS.md file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Build and Test | ||
on: push | ||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
java-version: [ 20, 21-ea ] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
java-version: ${{ matrix.java-version }} | ||
distribution: temurin | ||
- name: Cache Maven artifacts | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-maven- | ||
- name: Cache node | ||
uses: actions/cache@v3 | ||
with: | ||
path: web-bundle/node | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os}}-node- | ||
- name: Cache node_modules | ||
uses: actions/cache@v3 | ||
with: | ||
path: web-bundle/node_modules | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/pom.xml', '**/package.json') }} | ||
restore-keys: | | ||
${{ runner.os}}-node_modules- | ||
- name: Build ${{ matrix.java-version }} | ||
run: mvn -B clean test | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Publish to GitHub Packages | ||
|
||
# ignore tags as the untagged commit has the same GITHUB_SHA and would conflict | ||
on: | ||
push: | ||
branches: | ||
- '**' | ||
|
||
jobs: | ||
publish: | ||
if: github.repository_owner == 'graphhopper' | ||
runs-on: ubuntu-20.04 | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
java-version: 17 | ||
distribution: temurin | ||
- name: Cache Maven artifacts | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-maven- | ||
- name: Cache node | ||
uses: actions/cache@v3 | ||
with: | ||
path: web-bundle/node | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os}}-node- | ||
- name: Cache node_modules | ||
uses: actions/cache@v3 | ||
with: | ||
path: web-bundle/node_modules | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/pom.xml', '**/package.json') }} | ||
restore-keys: | | ||
${{ runner.os}}-node_modules- | ||
- name: Build and publish package ${{ matrix.java-version }} | ||
# special 'wagon' option due to https://github.com/orgs/community/discussions/49001 | ||
run: | | ||
mvn -B versions:set -DnewVersion=$GITHUB_SHA -DgenerateBackupPoms=false | ||
mvn -Dmaven.resolver.transport=wagon -B -DskipTests -Pskip-shaded-web-jar -Pskip-tools-jar source:jar deploy | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: Publish to Maven Central | ||
|
||
on: | ||
push: | ||
tags: | ||
- '**' | ||
|
||
jobs: | ||
maven-central-publish: | ||
if: github.repository_owner == 'graphhopper' | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
java-version: 8 | ||
distribution: temurin | ||
server-id: ossrh | ||
server-username: MAVEN_USERNAME | ||
server-password: MAVEN_PASSWORD | ||
# feed directly as multi line value | ||
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} | ||
gpg-passphrase: GPG_PASSPHRASE | ||
|
||
- name: Cache Maven artifacts | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.m2/repository | ||
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os }}-maven- | ||
- name: Cache node | ||
uses: actions/cache@v3 | ||
with: | ||
path: web-bundle/node | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/pom.xml') }} | ||
restore-keys: | | ||
${{ runner.os}}-node- | ||
- name: Cache node_modules | ||
uses: actions/cache@v3 | ||
with: | ||
path: web-bundle/node_modules | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/pom.xml', '**/package.json') }} | ||
restore-keys: | | ||
${{ runner.os}}-node_modules- | ||
- name: clean install | ||
run: | | ||
mvn -Dkey=$API_KEY clean install -B | ||
- name: Build and publish package to maven central ${{ matrix.java-version }} | ||
run: | | ||
echo "release to maven central" | ||
mvn -B versions:set -DnewVersion=$GITHUB_REF_NAME -DgenerateBackupPoms=false | ||
mvn deploy -P release -DskipTests=true -Dpgp.secretkey=keyring:id=0E2FBADB -B | ||
env: | ||
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} | ||
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} | ||
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Remove old artifacts | ||
on: | ||
schedule: | ||
- cron: '0 3 1 * *' # Every 1st of the month at 3am | ||
workflow_dispatch: | ||
jobs: | ||
remove-old-artifacts: | ||
if: github.repository_owner == 'graphhopper' | ||
name: Remove old artifacts | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 # stop the task if it takes longer | ||
|
||
steps: | ||
- name: Remove old artifacts | ||
uses: c-hive/gha-remove-artifacts@v1 | ||
with: | ||
age: '11 months' | ||
skip-tags: true | ||
skip-recent: 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: Trigger Benchmarks | ||
on: push | ||
jobs: | ||
trigger_measurement: | ||
if: github.repository_owner == 'graphhopper' | ||
runs-on: ubuntu-22.04 | ||
environment: benchmarks | ||
steps: | ||
- name: trigger | ||
run: | | ||
curl -X POST -H "Authorization: token ${{ secrets.BENCHMARKS_TOKEN }}" \ | ||
-H "Accept: application/vnd.github+json" \ | ||
"https://api.github.com/repos/${{ secrets.BENCHMARKS_REPO }}/dispatches" \ | ||
-d '{"event_type":"measurement_core","client_payload":{"core_commit": "'$GITHUB_SHA'", "core_branch": "${{ github.ref_name }}" }}' |