-
Notifications
You must be signed in to change notification settings - Fork 53
83 lines (81 loc) · 2.26 KB
/
main.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
name: CI
on:
push:
branches:
- main
- 'releases/*'
pull_request:
branches:
- '*'
jobs:
linux:
name: 'Linux (JDK 8)'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: 'Set up JDK 8'
uses: actions/setup-java@v1
with:
java-version: 8
- name: 'Test'
shell: bash
run: ./mvnw clean install
benchmark:
name: ${{ matrix.mapper }} Benchmark
needs: linux
runs-on: ubuntu-latest
strategy:
matrix:
mapper: [Manual, MapStruct, Selma, JMapper, datus, Orika, ModelMapper, BULL, Dozer, ReMap]
steps:
- uses: actions/checkout@master
- name: 'Set up JDK 8'
uses: actions/setup-java@v1
with:
java-version: 8
- name: 'Install'
shell: bash
run: ./mvnw clean install -DskipTests
- name: 'Benchmark'
shell: bash
run: java -jar target/benchmarks.jar -p type=${{ matrix.mapper }} -rff results_${{ matrix.mapper }}.csv -rf csv
- uses: actions/upload-artifact@master
name: Upload Benchmark Results
with:
name: benchmark_results
path: results_${{ matrix.mapper }}.csv
collect_benchmark:
name: Collect benchmarks
needs: benchmark
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/download-artifact@master
name: Download benchmarks
with:
name: benchmark_results
- shell: bash
name: Prepare CSV Results
run: |
head -1 results_Manual.csv > results.csv
for mapper in Manual MapStruct Selma JMapper datus Orika ModelMapper BULL Dozer ReMap; do sed 1d results_${mapper}.csv >> results.csv; done
less results.csv
- uses: actions/upload-artifact@master
name: Upload CSV Results
with:
name: results
path: results.csv
- shell: bash
name: Install gnuplot
run: |
sudo apt-get update
sudo apt-get install gnuplot
- shell: bash
name: Plot Results
run: |
gnuplot -c benchmark.plt
- uses: actions/upload-artifact@master
name: Upload Plot
with:
name: results
path: results.png