Skip to content

Commit

Permalink
Add analysis to performance
Browse files Browse the repository at this point in the history
  • Loading branch information
smeyer198 committed Dec 11, 2024
1 parent 0c496b8 commit bc2abbe
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/actions/performance/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,5 @@ runs:
shell: bash

- name: Switch to default branch
run: git checkout ${{ github.ref_name }}
run: git checkout ${{ github.ref_name }}
shell: bash
41 changes: 35 additions & 6 deletions .github/workflows/performance_pre.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,36 @@ env:
JAVA_VERSION: 17

jobs:
performance-analysis:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Build and test Analysis
uses: ./.github/actions/analysis
with:
java-version: ${{ env.JAVA_VERSION }}

- name: Create or update gh-pages-output directory
run: mkdir -p gh-pages-output

- name: Extract performance
uses: ./.github/actions/performance
with:
test-results-path: CryptoAnalysis/shippable/testresults
source-branch: gh-pages
current-results: analysis_history.txt
output-file: gh-pages-output/analysis_history.txt

- name: Store Analysis performance
uses: actions/upload-artifact@v4
with:
name: analysis-performance
path: gh-pages-output/analysis_history.txt

performance-android:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -68,17 +98,16 @@ jobs:

- name: Generate HTML report
run: |
for f in "$gh-pages-output"/*
do
echo "$f"
done
echo "<html><body><h1>Aggregated Test Results</h1><ul>" > gh-pages-output/index.html
cat gh-pages-output/android_history.txt | while read line; do
echo "${line}"
echo "<li>${line}</li>" >> gh-pages-output/index.html
done
cat gh-pages-output/analysis_history.txt | while read line; do
echo "${line}"
echo "<li>${line}</li>" >> gh-pages-output/index.html
done
echo "</ul></body></html>" >> gh-pages-output/index.html
- name: Deploy to GitHub Pages
Expand Down

0 comments on commit bc2abbe

Please sign in to comment.