forked from opentripplanner/OpenTripPlanner
-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (72 loc) · 3.08 KB
/
performance-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: Performance test
on:
push:
branches:
- dev-2.x
jobs:
perf-test:
if: github.repository_owner == 'opentripplanner' && !startsWith(github.event.head_commit.message ,'Bump serialization version id for')
runs-on: performance-test
strategy:
matrix:
include:
- location: norway
osm-url: https://download.geofabrik.de/europe/norway-210101.osm.pbf
transit-url: https://leonard.io/otp/rb_norway-aggregated-netex-2021-12-11.zip
transit-filename: rb_norway-aggregated-netex.zip
- location: baden-wuerttemberg # German state of Baden-Württemberg: https://en.wikipedia.org/wiki/Baden-W%C3%BCrttemberg
osm-url: https://download.geofabrik.de/europe/germany/baden-wuerttemberg-220101.osm.pbf
transit-url: https://leonard.io/otp/baden-wuerttemberg-2022-07-25.gtfs.tidy.zip
transit-filename: baden-wuerttemberg.gtfs.zip
steps:
- uses: actions/[email protected]
with:
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Set up Maven
uses: stCarolas/[email protected]
with:
maven-version: 3.8.2
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven
- name: Cache graph input files
uses: actions/cache@v2
with:
path: |
graph/*.pbf
graph/*.zip
key: graph-${{ matrix.location }}
- name: Build jar
run: mvn -DskipTests --batch-mode package -P prettierSkip
- name: Download OSM & Netex data
run: |
mkdir -p graph
wget ${{ matrix.osm-url }} -O graph/osm.pbf --no-clobber -q --show-progress --progress=bar:force || true
wget ${{ matrix.transit-url }} -O graph/${{ matrix.transit-filename }} --no-clobber -q --show-progress --progress=bar:force || true
- name: Build graph
run: |
cp test/performance/${{ matrix.location }}/build-config.json graph/build-config.json
cp target/otp-*-SNAPSHOT-shaded.jar otp.jar
java -Xmx32G -jar otp.jar --build --save graph
- name: Copy graph, run speed test
env:
PERFORMANCE_INFLUX_DB_PASSWORD: ${{ secrets.PERFORMANCE_INFLUX_DB_PASSWORD }}
MEASUREMENT_ENVIRONMENT: CI
SPEEDTEST_LOCATION: ${{ matrix.location }}
run: |
mv graph/graph.obj test/performance/${{ matrix.location }}
mvn exec:java -Dexec.mainClass="org.opentripplanner.transit.raptor.speed_test.SpeedTest" -Dexec.classpathScope=test -Dexec.args="--dir=test/performance/${{ matrix.location }} -p md -n 4 -i 3 -0"
- name: Archive travel results file
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.location }}-travelSearch-results.csv
path: |
test/performance/${{ matrix.location }}/travelSearch-results.csv