Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/PR-content-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: PR Content Check

on:
workflow_call:
outputs:
result:
description: "The first output string"
value: ${{ jobs.check-PR-content.outputs.output1 }}

jobs:
check-PR-content:
name: Check PR Content
runs-on: ubuntu-latest
outputs:
output1: ${{ steps.check-content.outputs.result }}
steps:
- name: Checkout the incoming pull request
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
path: ion-java-new

- name: Check the content of the last commit
id: check-content
run: |
cd ion-java-new
if [[ $(git log -1 --name-only) == *"src/"* ]]; then echo "result=pass" >> $GITHUB_OUTPUT; else echo "result=fail" >> $GITHUB_OUTPUT; fi
20 changes: 13 additions & 7 deletions .github/workflows/ion-java-performance-regression-detector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,18 @@

name: Ion Java performance regression detector

on: [pull_request]
on:
pull_request

jobs:
PR-Content-Check:
uses: linlin-s/ion-java/.github/workflows/PR-content-check.yml@master
detect-regression:
name: Detect Regression

needs: PR-Content-Check
if: ${{ needs.PR-Content-Check.outputs.result == 'pass' }}
outputs:
output1: ${{ steps.regression_result.outputs.result }}
runs-on: ubuntu-latest

steps:
Expand All @@ -18,7 +24,7 @@ jobs:
java-version: 1.8

- name: Checkout ion-java from the new commit.
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
path: ion-java-new
Expand All @@ -27,7 +33,7 @@ jobs:
run: cd ion-java-new && git submodule init && git submodule update && ./gradlew clean publishToMavenLocal

- name: Checkout ion-java-benchmark-cli
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: amzn/ion-java-benchmark-cli
ref: master
Expand Down Expand Up @@ -70,7 +76,7 @@ jobs:
run : rm -r /home/runner/.m2

- name: Checkout the current commit
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
repository: amzn/ion-java
ref: master
Expand Down Expand Up @@ -116,7 +122,7 @@ jobs:
run: |
result=true
cd benchmarkResults && for FILE in *; do message=$(java -jar /home/runner/work/ion-java/ion-java/ion-java-benchmark-cli/target/ion-java-benchmark-cli-0.0.1-SNAPSHOT-jar-with-dependencies.jar compare --benchmark-result-previous $FILE/previous.ion --benchmark-result-new $FILE/new.ion $FILE/report.ion | tee /dev/stderr) && if [ "$message" != "no regression detected" ]; then result=false; fi; done
echo "::set-output name=regression-result::$result"
echo "regression-result=$result" >> $GITHUB_OUTPUT
if [ "$result" = "true" ]; then echo "No regression detected!" >> $GITHUB_STEP_SUMMARY; fi

- name: Upload comparison reports to the benchmark results directory
Expand All @@ -131,4 +137,4 @@ jobs:
if: ${{ env.regression_detect == 'false' }}
run: |
cd benchmarkResults && echo "| Benchmark command | GC Allocation Rate | Heap Usage | Speed |" >> $GITHUB_STEP_SUMMARY && echo "| ----------- | ----------- |----------- | ----------- |" >> $GITHUB_STEP_SUMMARY && for FILE in *; do regressionDetection=$(java -jar /home/runner/work/ion-java/ion-java/ion-java-benchmark-cli/target/ion-java-benchmark-cli-0.0.1-SNAPSHOT-jar-with-dependencies.jar compare --benchmark-result-previous $FILE/previous.ion --benchmark-result-new $FILE/new.ion $FILE/report.ion) && if [ "$regressionDetection" != "no regression detected" ]; then command=$(echo $FILE | sed "s/_/ /g") && read gc heapUsage speed <<< $( echo ${regressionDetection} | awk -F", " '{print $1" "$2" "$3}' ) && echo "|$command|$gc|$heapUsage|$speed|" >> $GITHUB_STEP_SUMMARY; fi; done
exit 1
exit 1
8 changes: 7 additions & 1 deletion .github/workflows/ion-test-driver.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
name: ion-test-driver

on: [pull_request]
on:
pull_request

jobs:
PR-Content-Check:
uses: linlin-s/ion-java/.github/workflows/PR-content-check.yml@master
ion-test-driver:
runs-on: macos-10.15
needs: PR-Content-Check
if: ${{ needs.PR-Content-Check.outputs.result == 'pass' }}
steps:
- name: Checkout ion-java
uses: actions/checkout@master
Expand All @@ -13,6 +18,7 @@ jobs:
ref: master
path: ion-java


- name: Checkout ion-test-driver
uses: actions/checkout@master
with:
Expand Down
1 change: 0 additions & 1 deletion src/com/amazon/ion/apps/EncodeApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import java.io.IOException;
import java.util.ArrayList;


public class EncodeApp
extends BaseApp
{
Expand Down