Skip to content

Update ion-java-performance-regression-detector.yml #184

Update ion-java-performance-regression-detector.yml

Update ion-java-performance-regression-detector.yml #184

# Sample workflow for building and deploying a Jekyll site to GitHub Pages
name: Deploy Jekyll with GitHub Pages dependencies preinstalled
on:
push:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.PAT_TOKEN }}
- name: check commit
run: echo "COMMIT_ID=${{ github.sha }}" >> $GITHUB_ENV
- name: Build ion-java
run: git submodule init && git submodule update && ./gradlew clean publishToMavenLocal
- name: Checkout ion-java-benchmark-cli
uses: actions/checkout@v3
with:
repository: amazon-ion/ion-java-benchmark-cli
ref: master
path: ion-java-benchmark-cli
- name: Build ion-java-benchmark-cli
run: cd ion-java-benchmark-cli && mvn clean install
- name: Checkout ion-data-generator
uses: actions/checkout@v3
with:
repository: amazon-ion/ion-data-generator
ref: main
path: ion-data-generator
- name: Build ion-data-generator
run: cd ion-data-generator && mvn clean install
- name: Generate test Ion Data
run: |
mkdir -p testData
java -jar ion-data-generator/target/ion-data-generator-1.0-SNAPSHOT.jar generate -S 50000 --input-ion-schema ion-data-generator/tst/com/amazon/ion/workflow/nestedStruct.isl testData/testStructs.10n
- name: Checkout gh-pages
uses: actions/checkout@v3
with:
ref: "gh-pages"
token: ${{ secrets.PAT_TOKEN }}
path: gh-pages
- name: Benchmark ion-java from the new commit
run: |
cd ion-java-benchmark-cli && java -jar target/ion-java-benchmark-cli-0.0.1-SNAPSHOT-jar-with-dependencies.jar write --api streaming --io-type buffer --results-format ion --results-file /home/runner/work/ion-java/ion-java/gh-pages/benchmarkResult.ion /home/runner/work/ion-java/ion-java/testData/testStructs.10n
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: '14.x'
- name: search yValues
run: |
cd gh-pages
npm install ion-js
echo "NEW_SPEED=$(node /home/runner/work/ion-java/ion-java/gh-pages/processSpeed.js ${{ env.SPEED }})" >> $GITHUB_ENV
- name: Update data.js
run: |
sed -i 's/const x = \[[^]]*\]/const x = '${{ env.SPEED }}'/g' /home/runner/work/ion-java/ion-java/gh-pages/data.js
cat /home/runner/work/ion-java/ion-java/gh-pages/data.js
- name: commit change
uses: stefanzweifel/git-auto-commit-action@v4
with:
repository: ./gh-pages
file_pattern: '*.ion *.js'
branch: gh-pages
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ./gh-pages/
destination: ./_site
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
# Deployment job
deploy:
environment:
name: performance
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2