Skip to content

Commit 9eb762f

Browse files
committed
added coredumps setup
1 parent 92fda46 commit 9eb762f

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

.github/actions/c3c_build_latest/action.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ runs:
2323
echo "PATH: $PATH"
2424
git config --global user.email "[email protected]"
2525
git config --global user.name "c3tools CI"
26+
mkdir /var/cores
27+
sudo bash -c 'echo "/var/cores/core.%e.%t.%p" > /proc/sys/kernel/core_pattern'
28+
sudo chmod ugo+rwx /var/cores/
2629
2730
- name: Install common deps
2831
shell: bash

.github/workflows/main.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929

3030
- name: c3tools unit tests
3131
run: |
32+
ulimit -c unlimited
3233
if [[ "${{matrix.optimize}}" == "O0" ]]; then
3334
echo "Running tests with sanitizer"
3435
c3c --sanitize=address --trust=full build c3fzf
@@ -41,31 +42,42 @@ jobs:
4142
4243
- name: c3fzf on c3tools
4344
run: |
45+
ulimit -c unlimited
4446
./build/c3fzf --project=./lib/ .
4547
./build/c3fzf --project=./lib/ . .
4648
./build/c3fzf --project=./lib/ c3tools::codefmt .
4749
4850
- name: c3fzf preview
4951
run: |
52+
ulimit -c unlimited
5053
./build/c3fzf --project=./lib/ --preview c3tools::codefmt CodeFmt
5154
5255
- name: c3fzf stdlib
5356
run: |
57+
ulimit -c unlimited
5458
./build/c3fzf --stdlib=./c3c/lib/std --project=./lib/ .
5559
./build/c3fzf --stdlib=./c3c/lib/std --project=./lib/ . .
5660
5761
- name: c3fzf stdlib symbols
5862
run: |
63+
ulimit -c unlimited
5964
./build/c3fzf --stdlib=./c3c/lib/std --project=./lib/ std::core::string .
6065
6166
- name: c3fzf stdlib preview
6267
run: |
68+
ulimit -c unlimited
6369
./build/c3fzf --preview --stdlib=./c3c/lib/std --project=./lib/ std::core::string .
6470
6571
- name: c3fzf stdlib preview full stdlib
6672
run: |
73+
ulimit -c unlimited
6774
./build/c3fzf --project=./lib/ --stdlib=./c3c/lib/std . | xargs -I{} ./build/c3fzf --project=./lib/ --preview --stdlib=./c3c/lib/std {} .
6875
76+
- uses: actions/upload-artifact@master # capture all crashes as build artifacts
77+
with:
78+
name: crashes
79+
path: /var/cores
80+
6981
build-c3fmt:
7082
runs-on: ubuntu-22.04
7183
strategy:
@@ -89,6 +101,7 @@ jobs:
89101
#
90102
- name: c3tools unit tests
91103
run: |
104+
ulimit -c unlimited
92105
if [[ "${{matrix.optimize}}" == "O0" ]]; then
93106
echo "Running tests with sanitizer"
94107
c3c --sanitize=address --trust=full build c3fmt
@@ -101,30 +114,36 @@ jobs:
101114
102115
- name: c3fmt c3tools
103116
run: |
117+
ulimit -c unlimited
104118
find lib/ | grep ".c3$" | xargs -I{} ./build/c3fmt -w ${{ matrix.line_width }} -i ${{ matrix.indent }} {}
105119
106120
- name: c3tools unit tests after formatting
107121
run: |
122+
ulimit -c unlimited
108123
c3c --trust=full test
109124
110125
- name: c3fmt c3tools (double)
111126
run: |
127+
ulimit -c unlimited
112128
find lib/ | grep ".c3$" | xargs -I{} ./build/c3fmt -w ${{ matrix.line_width }} -i ${{ matrix.indent }} {}
113129
114130
- name: c3tools unit tests after (double) formatting
115131
run: |
132+
ulimit -c unlimited
116133
c3c --trust=full test
117134
118135
#
119136
# c3c formatting block
120137
#
121138
- name: c3c compiler tests (original)
122139
run: |
140+
ulimit -c unlimited
123141
cd c3c/test
124142
python3 src/tester.py ../build/c3c test_suite/
125143
126144
- name: c3fmt stdlib
127145
run: |
146+
ulimit -c unlimited
128147
find c3c/lib/ | grep ".c3$" | xargs -I{} ./build/c3fmt -w ${{ matrix.line_width }} -i ${{ matrix.indent }} {}
129148
cd c3c/
130149
echo "Checking if any changes in files"
@@ -133,11 +152,13 @@ jobs:
133152
134153
- name: c3c stdlib unit tests formatted
135154
run: |
155+
ulimit -c unlimited
136156
cd c3c/test
137157
../build/c3c compile-test unit
138158
139159
- name: c3fmt stdlib (double)
140160
run: |
161+
ulimit -c unlimited
141162
find c3c/lib/ | grep ".c3$" | xargs -I{} ./build/c3fmt -w ${{ matrix.line_width }} -i ${{ matrix.indent }} {}
142163
cd c3c/
143164
echo "Checking if any changes after formatting (must be the same!)"
@@ -146,18 +167,27 @@ jobs:
146167
147168
- name: c3c stdlib unit tests formatted (double)
148169
run: |
170+
ulimit -c unlimited
149171
cd c3c/test
150172
../build/c3c compile-test unit
151173
152174
- name: c3fmt c3c/test/unit
153175
run: |
176+
ulimit -c unlimited
154177
find c3c/test/unit | grep ".c3$" | xargs -I{} ./build/c3fmt -w ${{ matrix.line_width }} -i ${{ matrix.indent }} {}
155178
156179
- name: c3c unit tests on formatted c3c/test/unit
157180
run: |
181+
ulimit -c unlimited
158182
cd c3c/test
159183
../build/c3c compile-test unit
160184
161185
- name: c3fmt of all *.c3t files in test_suite
162186
run: |
187+
ulimit -c unlimited
163188
./scripts/c3fmt_c3c_test_suite.sh c3c/test/test_suite/
189+
190+
- uses: actions/upload-artifact@master # capture all crashes as build artifacts
191+
with:
192+
name: crashes
193+
path: /cores

0 commit comments

Comments
 (0)