Skip to content

Commit

Permalink
Bring R5 in line with analysis-backend v6.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
abyrd committed Oct 8, 2020
1 parent 57b1172 commit 06bc4d3
Show file tree
Hide file tree
Showing 508 changed files with 82,619 additions and 31,334 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Java CI
# On [push, pull_request] causes double-builds when creating PRs.
# But triggering on push only will miss pull requests from outside authors.
on:
# Should catch merged pull requests, pushes to Conveyal PR branches, and tags.
# The push event's ref reveals the branch name for S3 upload, unlike pull_request which sees the merge target.
push
# Try to catch PRs from outside authors, which don't need to be uploaded to S3.
# pull_request:
# branches:
# - dev
# - master
jobs:
build:
runs-on: ubuntu-latest
# Start a separate docker container that we can contact over TCP (for tests)
# Apparently there's something tricky going on with the port binding though
# https://help.github.com/en/articles/workflow-syntax-for-github-actions#jobsjob_idservices
services:
mongodb:
image: mongo:latest
ports:
- 27017:27017
# You can specify a docker container on which to run steps, rather than on the metal of runs-on above.
# container:
# image: mherwig/docker-alpine-java-mongo:latest
# env:
# BUILD_TARGET:staging
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
GPR_USERNAME: ${{ secrets.GPR_USERNAME }}
GPR_TOKEN: ${{ secrets.GPR_TOKEN }}
steps:
# Starting in v2.2 checkout action fetches all tags when fetch-depth=0, for auto-versioning.
- uses: actions/[email protected]
with:
fetch-depth: 0
# Java setup step completes very fast, no need to run in a preconfigured docker container
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- uses: actions/cache@v1
id: cache
with:
path: ~/.gradle/caches
key: gradle-caches
- name: Build and Test
run: gradle build
- name: Ensure shadow JAR is runnable as backend
run: |
cp analysis.properties.template analysis.properties
gradle testShadowJarRunnable
- name: Publish to GH Packages
run: gradle publish
- name: Upload to S3
# Use git describe to get a similar string to the Gradle project version (possibly missing .dirty).
run: |
VERSION=$(gradle -q printVersion | head -n1)
LOCAL_FILE=$(ls build/libs/*-all.jar | head -n1)
aws s3 cp --no-progress --region eu-west-1 $LOCAL_FILE s3://r5-builds/${VERSION}.jar
# If we are on the head of dev or master, also copy to branch-latest.jar. 'aws s3 cp' will overwrite by default.
- name: Copy to branch-latest.jar on S3
if: github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/master'
run: |
VERSION=$(gradle -q printVersion | head -n1)
BRANCH=${GITHUB_REF#refs/heads/}
echo VERSION is $VERSION, BRANCH is $BRANCH
aws s3 cp --no-progress --region eu-west-1 s3://r5-builds/${VERSION}.jar s3://r5-builds/${BRANCH}-latest.jar
46 changes: 0 additions & 46 deletions .github/workflows/maven.yml

This file was deleted.

53 changes: 48 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,50 @@
.idea
.DS_Store
.gradle/
/build/
/out/

# Ignore Gradle GUI config
gradle-app.setting

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar

# Cache of project
.gradletasknamecache

# Other gradle build objects
gradle
gradlew.bat
gradlew

# IntelliJ IDEA
.idea/

logs
project/project
project/target
.target
target
hs_err_pid*
cache
*.iml
.DS_Store
tmp
.history
dist
/.idea
/*.iml
/out
/.idea_modules
/.classpath
/.project
/RUNNING_PID
/.settings
/data
s3credentials
*.class
/bin
/cache/
*~
nbproject
logentries.xml
src/main/resources/git.properties
pom.xml.versionsBackup
analysis.properties
/src/test/resources/snapshots/com/conveyal/analysis/controllers/
12 changes: 6 additions & 6 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)
MIT License

Copyright (c) 2014-2018 Conveyal
Copyright (c) 2020 Conveyal

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -9,13 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
117 changes: 0 additions & 117 deletions README-OTP2-TERMINOLOGY.md

This file was deleted.

Loading

0 comments on commit 06bc4d3

Please sign in to comment.