-
Notifications
You must be signed in to change notification settings - Fork 12
84 lines (78 loc) · 3 KB
/
nightly.yml
File metadata and controls
84 lines (78 loc) · 3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- 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