Skip to content

Commit

Permalink
don't show test failure if alignment fails
Browse files Browse the repository at this point in the history
  • Loading branch information
mikescamell committed Feb 14, 2025
1 parent 4c49a6d commit 629b8ff
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,26 +160,44 @@ jobs:
run: chmod +x scripts/check_elf_alignment.sh

- name: Check native libraries alignment
id: check-alignment
continue-on-error: true
run: ./scripts/check_elf_alignment.sh ${{ steps.find-apk.outputs.apk_path }}

- name: Handle native alignment failure
if: steps.check-alignment.outcome == 'failure'
run: |
echo "::error::Native library alignment check failed!"
echo "::error::Please check the native libraries in your APK for correct page size alignment."
exit 1
- name: Run Android Tests
if: steps.check-alignment.outcome == 'success'
run: ./gradlew runFlankAndroidTests

- name: Bundle the Android CI tests report
if: always()
if: |
always() &&
steps.check-alignment.outcome == 'success'
run: find . -type d -name 'fladleResults' | zip -@ -r android-tests-report.zip

- name: Generate json file with failures
if: ${{ failure() }}
if: |
failure() &&
steps.check-alignment.outcome == 'success'
run: cat build/fladle/fladleResults/HtmlErrorReport.html | cut -d\` -f2 >> results.json

- name: Print failure report
if: ${{ failure() }}
if: |
failure() &&
steps.check-alignment.outcome == 'success'
run: |
jq -r '.[] | .label as $id | .items[] | "Test:", $id, "Failure:", .label, "URL:", .url, "\n"' results.json
- name: Upload the Android CI tests report
if: always()
if: |
always() &&
steps.check-alignment.outcome == 'success'
uses: actions/upload-artifact@v4
with:
name: android-tests-report
Expand Down

0 comments on commit 629b8ff

Please sign in to comment.