Nightly Sanitized Run #975
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Nightly Sanitized Run | |
| on: | |
| schedule: | |
| # Runs every day at 03:00 UTC | |
| - cron: '0 3 * * *' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| actions: read | |
| jobs: | |
| run-test: | |
| uses: ./.github/workflows/test_workflow.yml | |
| with: | |
| configuration: '["asan"]' | |
| # C++ gtests (ASan + TSan) run on every PR via native-sanitizer-tests in ci.yml. | |
| # Skip them here so the nightly focuses on Java functional tests under ASan. | |
| skip_gtest: true | |
| fuzz: | |
| runs-on: ubuntu-latest | |
| continue-on-error: true | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - name: Cache Gradle Wrapper Binaries | |
| uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 | |
| with: | |
| path: ~/.gradle/wrapper/dists | |
| key: gradle-wrapper-${{ runner.os }}-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} | |
| restore-keys: | | |
| gradle-wrapper-${{ runner.os }}- | |
| - name: Cache Gradle User Home | |
| uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5 | |
| with: | |
| path: ~/.gradle/caches | |
| key: gradle-caches-${{ runner.os }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
| restore-keys: | | |
| gradle-caches-${{ runner.os }}- | |
| - name: Setup OS | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y clang | |
| - name: Fuzz | |
| run: ./gradlew :ddprof-lib:fuzz:fuzz -Pfuzz-duration=120 --no-daemon | |
| - name: Upload crash artifacts | |
| if: failure() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: fuzz-crashes | |
| path: ddprof-lib/fuzz/build/fuzz-crashes/ | |
| report-failures: | |
| runs-on: ubuntu-latest | |
| needs: run-test | |
| if: failure() | |
| steps: | |
| - name: Download all failure artifacts | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| pattern: failures-* | |
| path: ./artifacts | |
| merge-multiple: true | |
| - name: Report failures | |
| run: | | |
| # Check if any failure files exist | |
| if ! ls ./artifacts/failures_*.txt 1> /dev/null 2>&1; then | |
| echo "No failure artifacts found" | |
| exit 0 | |
| fi | |
| # Combine all failure files | |
| find ./artifacts -name 'failures_*.txt' -exec cat {} \; > ./artifacts/all_failures.txt | |
| scenarios=$(cat ./artifacts/all_failures.txt | tr '\n' ',' | sed 's/,$//') | |
| echo "Failed scenarios: $scenarios" | |
| if [ -n "${{ secrets.SLACK_WEBHOOK }}" ]; then | |
| curl -X POST "${{ secrets.SLACK_WEBHOOK }}" \ | |
| -H 'Content-Type: application/json' \ | |
| -d "{\"scenarios\": \"${scenarios}\", \"failed_run_url\": \"${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}\"}" | |
| else | |
| echo "SLACK_WEBHOOK not configured, skipping notification" | |
| fi |