-
Notifications
You must be signed in to change notification settings - Fork 0
Add ion-java performance regression detector to GitHub workflow #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| # 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: Ion Jave performance regression detector | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ master ] | ||
| pull_request: | ||
| branches: [ master ] | ||
|
|
||
| jobs: | ||
| detetct-regression: | ||
| name: Detetct Regression | ||
|
|
||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Set up JDK 1.8 | ||
| uses: actions/setup-java@v1 | ||
| with: | ||
| java-version: 1.8 | ||
|
|
||
| - name: Checkout ion-java repository from the current commit | ||
| uses: actions/checkout@v2 | ||
| with: | ||
| fetch-depth: 2 | ||
| submodules: recursive | ||
| - run: git checkout HEAD^ | ||
|
|
||
| - name: Build ion-java from the current commit | ||
| run: mvn clean install | ||
|
|
||
| - name: Build ion-java-benchmark-cli based on the current ion-java | ||
| uses: actions/checkout@v2 | ||
| with: | ||
| repository: amzn/ion-java-benchmark-cli | ||
| ref: master | ||
| - run: mvn clean install | ||
|
|
||
| - name: Check the version of ion-java | ||
| run: java -jar target/ion-java-benchmark-cli-0.0.1-SNAPSHOT-jar-with-dependencies.jar --version | ||
|
|
||
| - name: Generate test Ion Data | ||
| run: java -jar target/ion-java-benchmark-cli-0.0.1-SNAPSHOT-jar-with-dependencies.jar generate -S 500 -T string -f ion_text testWorkflow.ion | ||
|
|
||
| - name: Test read preformance of the ion-java from the current commit | ||
| run: java -jar target/ion-java-benchmark-cli-0.0.1-SNAPSHOT-jar-with-dependencies.jar read testWorkflow.ion -o readPerformanceCurrent.ion -r ion | ||
|
|
||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Redundant empty lines.
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Changes will be updated. |
||
| - name: Clean maven dependency repository | ||
| run : rm -r /home/runner/.m2 | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it possible to avoid deleting the whole directory? E.g., The only different thing we have is different commits of ion-java, Is there anyway to replace ion-java only? This would make the workflow more efficient.
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Is that mean replace the /.m2/repository/ion/ion-java? When the first version of ion-java has been built, all dependencies relevant to this version of ion-java will be downloaded to /.m2/repository/ion/ion-java, the reason I deleted the whole directory is to make sure when the new commit come in, and build ion-java-benchmark-cli will not reuse the dependency from the last step. But yes, if only delete the .m2/repository/ion/ion-jave would be more efficient, that would be better.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Discussed offline. |
||
|
|
||
| - name: Checkout ion-java repository from the new commit | ||
| uses: actions/checkout@v2 | ||
| with: | ||
| submodules: recursive | ||
|
|
||
| - name: Build ion-java from the new commit | ||
| run: mvn clean install | ||
|
|
||
| - name: Build ion-java-benchmark-cli based on the new ion-java | ||
| uses: actions/checkout@v2 | ||
| with: | ||
| repository: amzn/ion-java-benchmark-cli | ||
| ref: master | ||
| - run: mvn clean install | ||
|
|
||
| - name: Check the version of ion-java | ||
| run: java -jar target/ion-java-benchmark-cli-0.0.1-SNAPSHOT-jar-with-dependencies.jar --version | ||
|
|
||
| - name: Test read preformance of ion-java from the new commit | ||
| run: java -jar target/ion-java-benchmark-cli-0.0.1-SNAPSHOT-jar-with-dependencies.jar read testWorkflow.ion -o readPerformanceNew.ion -r ion | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to add
on: pull requesttoo? So we can see the performance changes during code review section as well.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good idea, changes will be updated in the following commit