Skip to content

Workflow file for this run

name: Java Performance
on:
workflow_dispatch:
push:
branches: [ master ]
paths:
- '.github/workflows/java-perf.yml'
- 'binding/java/**/RhinoPerformanceTest.java'
- 'lib/common/**'
- 'lib/java/**'
- 'resources/contexts/beaglebone/**'
- 'resources/contexts/jetson/**'
- 'resources/contexts/linux/**'
- 'resources/contexts/mac/**'
- 'resources/contexts/raspberry-pi/**'
- 'resources/contexts/windows/**'
pull_request:
branches: [ master, 'v[0-9]+.[0-9]+' ]
paths:
- '.github/workflows/java-perf.yml'
- 'binding/java/**/RhinoPerformanceTest.java'
- 'lib/common/**'
- 'lib/java/**'
- 'resources/contexts/beaglebone/**'
- 'resources/contexts/jetson/**'
- 'resources/contexts/linux/**'
- 'resources/contexts/mac/**'
- 'resources/contexts/raspberry-pi/**'
- 'resources/contexts/windows/**'
defaults:
run:
working-directory: binding/java
jobs:
perf-github-hosted:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- os: ubuntu-latest
performance_threshold_sec: 0.5
- os: windows-latest
performance_threshold_sec: 0.5
- os: macos-latest
performance_threshold_sec: 0.6
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
- name: Build
run: ./gradlew assemble
- name: Test
run: ./gradlew test --info --tests RhinoPerformanceTest -DpvTestingAccessKey="${{secrets.PV_VALID_ACCESS_KEY}}" -DnumTestIterations="100" -DperformanceThresholdSec="${{matrix.performance_threshold_sec}}"
perf-self-hosted:
runs-on: ${{ matrix.machine }}
strategy:
fail-fast: false
matrix:
machine: [rpi2, rpi3-32, rpi3-64, rpi4-32, rpi4-64, jetson, beaglebone]
include:
- machine: rpi2
num_test_iterations: 20
performance_threshold_sec: 2.1
- machine: rpi3-32
num_test_iterations: 50
performance_threshold_sec: 0.7
- machine: rpi3-64
num_test_iterations: 50
performance_threshold_sec: 0.8
- machine: rpi4-32
num_test_iterations: 50
performance_threshold_sec: 0.4
- machine: rpi4-64
num_test_iterations: 50
performance_threshold_sec: 0.4
- machine: jetson
num_test_iterations: 50
performance_threshold_sec: 0.6
- machine: beaglebone
num_test_iterations: 20
performance_threshold_sec: 5.0
steps:
- uses: actions/checkout@v3
- name: Build
run: ./gradlew assemble
- name: Machine state before
working-directory: resources/scripts
run: bash machine-state.sh
- name: Test
run: ./gradlew test --info --tests RhinoPerformanceTest -DpvTestingAccessKey="${{secrets.PV_VALID_ACCESS_KEY}}" -DnumTestIterations="${{matrix.num_test_iterations}}" -DperformanceThresholdSec="${{matrix.performance_threshold_sec}}"
- name: Machine state after
working-directory: resources/scripts
run: bash machine-state.sh