-
-
Notifications
You must be signed in to change notification settings - Fork 428
166 lines (156 loc) · 7.15 KB
/
ponyc-weekly-checks.yml
File metadata and controls
166 lines (156 loc) · 7.15 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
name: ponyc Weekly Checks
on:
workflow_dispatch:
inputs:
ref:
description: "Git ref to check out and test (branch, tag, or SHA)"
required: false
default: "main"
schedule:
- cron: "0 3 * * 4"
concurrency:
group: ponyc-weekly-checks-${{ github.ref }}
cancel-in-progress: true
permissions:
packages: read
jobs:
check-for-changes:
runs-on: ubuntu-latest
outputs:
has-changes: ${{ steps.check.outputs.has-changes }}
steps:
- name: Checkout
uses: actions/checkout@v6.0.2
with:
ref: ${{ inputs.ref || github.sha }}
fetch-depth: 0
- name: Check for recent commits
id: check
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
echo "has-changes=true" >> "$GITHUB_OUTPUT"
elif git log --since="7 days ago" --oneline | head -1 | grep -q .; then
echo "has-changes=true" >> "$GITHUB_OUTPUT"
else
echo "has-changes=false" >> "$GITHUB_OUTPUT"
fi
use_directives:
needs: check-for-changes
if: needs.check-for-changes.outputs.has-changes == 'true'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- image: ghcr.io/ponylang/ponyc-ci-x86-64-unknown-linux-ubuntu24.04-builder:20250115
debugger: lldb
directives: dtrace
- image: ghcr.io/ponylang/ponyc-ci-x86-64-unknown-linux-ubuntu24.04-builder:20250115
debugger: lldb
directives: pool_memalign
- image: ghcr.io/ponylang/ponyc-ci-x86-64-unknown-linux-ubuntu24.04-builder:20250115
debugger: lldb
directives: pool_retain
- image: ghcr.io/ponylang/ponyc-ci-x86-64-unknown-linux-ubuntu24.04-builder:20250115
debugger: lldb
directives: runtimestats
- image: ghcr.io/ponylang/ponyc-ci-x86-64-unknown-linux-ubuntu24.04-builder:20250115
debugger: lldb
directives: runtime_tracing
name: use ${{ matrix.directives }}
container:
image: ${{ matrix.image }}
options: --user pony --cap-add=SYS_PTRACE --security-opt seccomp=unconfined
steps:
- name: Checkout
uses: actions/checkout@v6.0.2
with:
ref: ${{ inputs.ref || github.sha }}
- name: Restore Libs Cache
id: restore-libs
uses: actions/cache/restore@v5.0.3
with:
path: |
build/libs
lib/llvm/src/compiler-rt/lib/builtins
key: libs-${{ matrix.image }}-${{ hashFiles('Makefile', 'CMakeLists.txt', 'lib/CMakeLists.txt', 'lib/llvm/patches/*') }}
- name: Build Libs
if: steps.restore-libs.outputs.cache-hit != 'true'
run: make libs build_flags=-j8
- name: Build Debug Runtime
run: |
make configure arch=x86-64 config=debug use=${{ matrix.directives }}
make build config=debug
- name: Test with Debug Runtime
run: make test-ci-core config=debug usedebugger='${{ matrix.debugger }}'
- name: Build Release Runtime
run: |
make configure arch=x86-64 config=release use=${{ matrix.directives }}
make build config=release
- name: Test with Release Runtime
run: make test-ci-core config=release usedebugger='${{ matrix.debugger }}'
- name: Send alert on failure
if: ${{ failure() }}
uses: zulip/github-actions-zulip/send-message@e4c8f27c732ba9bd98ac6be0583096dea82feea5
with:
api-key: ${{ secrets.ZULIP_SCHEDULED_JOB_FAILURE_API_KEY }}
email: ${{ secrets.ZULIP_SCHEDULED_JOB_FAILURE_EMAIL }}
organization-url: 'https://ponylang.zulipchat.com/'
to: notifications
type: stream
topic: ${{ github.repository }} scheduled job failure
content: ${{ github.server_url}}/${{ github.repository }}/actions/runs/${{ github.run_id }} failed.
with_sanitizers:
needs: check-for-changes
if: needs.check-for-changes.outputs.has-changes == 'true'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- image: ghcr.io/ponylang/ponyc-ci-x86-64-unknown-linux-ubuntu24.04-builder:20250115
debugger: lldb
directives: pool_memalign,address_sanitizer,undefined_behavior_sanitizer
name: with sanitizers ${{ matrix.directives }}
container:
image: ${{ matrix.image }}
options: --user pony --cap-add=SYS_PTRACE --security-opt seccomp=unconfined
steps:
- name: Checkout
uses: actions/checkout@v6.0.2
with:
ref: ${{ inputs.ref || github.sha }}
- name: Restore Libs Cache
id: restore-libs
uses: actions/cache/restore@v5.0.3
with:
path: |
build/libs
lib/llvm/src/compiler-rt/lib/builtins
key: libs-${{ matrix.image }}-${{ hashFiles('Makefile', 'CMakeLists.txt', 'lib/CMakeLists.txt', 'lib/llvm/patches/*') }}
- name: Build Libs
if: steps.restore-libs.outputs.cache-hit != 'true'
run: make libs build_flags=-j8
- name: Build Debug Runtime
run: |
ASAN_OPTIONS=detect_leaks=0:external_symbolizer_path=$PWD/build/libs/bin/llvm-symbolizer UBSAN_OPTIONS=external_symbolizer_path=$PWD/build/libs/bin/llvm-symbolizer make configure arch=x86-64 config=debug use=${{ matrix.directives }}
ASAN_OPTIONS=detect_leaks=0:external_symbolizer_path=$PWD/build/libs/bin/llvm-symbolizer UBSAN_OPTIONS=external_symbolizer_path=$PWD/build/libs/bin/llvm-symbolizer make build config=debug
- name: Test with Debug Runtime
run: ASAN_OPTIONS=detect_leaks=0:external_symbolizer_path=$PWD/build/libs/bin/llvm-symbolizer UBSAN_OPTIONS=external_symbolizer_path=$PWD/build/libs/bin/llvm-symbolizer make test-ci-core config=debug test_full_program_timeout=300
- name: Build Release Runtime
run: |
ASAN_OPTIONS=detect_leaks=0:external_symbolizer_path=$PWD/build/libs/bin/llvm-symbolizer UBSAN_OPTIONS=external_symbolizer_path=$PWD/build/libs/bin/llvm-symbolizer make configure arch=x86-64 config=release use=${{ matrix.directives }}
ASAN_OPTIONS=detect_leaks=0:external_symbolizer_path=$PWD/build/libs/bin/llvm-symbolizer UBSAN_OPTIONS=external_symbolizer_path=$PWD/build/libs/bin/llvm-symbolizer make build config=release
- name: Test with Release Runtime
run: ASAN_OPTIONS=detect_leaks=0:external_symbolizer_path=$PWD/build/libs/bin/llvm-symbolizer UBSAN_OPTIONS=external_symbolizer_path=$PWD/build/libs/bin/llvm-symbolizer make test-ci-core config=release test_full_program_timeout=300
- name: Send alert on failure
if: ${{ failure() }}
uses: zulip/github-actions-zulip/send-message@e4c8f27c732ba9bd98ac6be0583096dea82feea5
with:
api-key: ${{ secrets.ZULIP_SCHEDULED_JOB_FAILURE_API_KEY }}
email: ${{ secrets.ZULIP_SCHEDULED_JOB_FAILURE_EMAIL }}
organization-url: 'https://ponylang.zulipchat.com/'
to: notifications
type: stream
topic: ${{ github.repository }} scheduled job failure
content: ${{ github.server_url}}/${{ github.repository }}/actions/runs/${{ github.run_id }} failed.