Skip to content

jmh/benchmark-binary-tree #63

jmh/benchmark-binary-tree

jmh/benchmark-binary-tree #63

name: jmh/benchmark-binary-tree
on:
push:
paths:
- 'jmh/benchmark-binary-tree/**'
- '.github/workflows/jmh-binary-tree.yml'
pull_request:
paths:
- 'jmh/benchmark-binary-tree/**'
- '.github/workflows/jmh-binary-tree.yml'
schedule:
- cron: "0 0 1 * *" # run every month
workflow_dispatch:
permissions:
contents: read
jobs:
build:
name: GraalVM Binary Tree Benchmark
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v3
- uses: graalvm/setup-graalvm@v1
with:
java-version: '17.0.7'
distribution: 'graalvm'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Test Java Code
run: |
cd jmh/benchmark-binary-tree
# build the Java code
./mvnw --no-transfer-progress clean package
# build the native exe
./mvnw --no-transfer-progress -Pnative -DskipNativeTests package
# Could just replace with a check that the binary exists?
./target/benchmark-binary-tree
# build and run the instrumented native exe
./mvnw --no-transfer-progress -Pinstrumented -DskipNativeTests package
./target/benchmark-binary-tree-instr
# build and run the optimised native exe
./mvnw --no-transfer-progress -Poptimised -DskipNativeTests package
./target/benchmark-binary-tree-opt