-
Notifications
You must be signed in to change notification settings - Fork 0
113 lines (107 loc) · 5.12 KB
/
tests.yml
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
name: tests
on:
push:
branches: [ "main", "dev" ]
pull_request:
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ "nogil-3.9" ]
steps:
- uses: actions/checkout@v3
- name: set up python ${{ matrix.python-version }}
uses: dpdani/setup-python@nogil
with:
python-version: ${{ matrix.python-version }}
- name: system info
run: |
uname -a
cat /proc/cpuinfo
- name: check nogil
run: |
python -c "import sys; print(sys.flags.nogil);"
- name: install dependencies & cereggii
run: |
python -m pip install --upgrade pip
pip -V
pip install .[dev]
- name: test with pytest
run: |
ulimit -c unlimited
ulimit -c
sudo mkdir -p /cores/
sudo mkdir -p ./so-libs
sudo chmod -R 777 /cores/
sudo chmod -R 777 ./so-libs
echo "/cores/core-%e-%p-%t" | sudo tee /proc/sys/kernel/core_pattern
sudo cat /proc/sys/kernel/core_pattern
pytest --junitxml=junit/test-results-${{ matrix.python-version }}.xml
if: ${{ always() }}
- name: prepare shared libs
run: |
find $pythonLocation/lib/ -name '*.so*' -exec mkdir -p $(dirname ./so-libs"{}") \;
find $pythonLocation/lib/ -name '*.so*' -exec cp "{}" ./so-libs"{}" \;
declare -a shared=(
"/home/runner/nogil-3.9.10/lib/python3.9/site-packages/cereggii/_cereggii.so"
"/home/runner/nogil-3.9.10/lib/python3.9/lib-dynload/pyexpat.nogil-39b-x86_64-linux-gnu.so"
"/home/runner/nogil-3.9.10/lib/python3.9/lib-dynload/_decimal.nogil-39b-x86_64-linux-gnu.so"
"/home/runner/nogil-3.9.10/lib/python3.9/lib-dynload/unicodedata.nogil-39b-x86_64-linux-gnu.so"
"/home/runner/nogil-3.9.10/lib/python3.9/lib-dynload/_elementtree.nogil-39b-x86_64-linux-gnu.so"
"/home/runner/nogil-3.9.10/lib/python3.9/lib-dynload/_datetime.nogil-39b-x86_64-linux-gnu.so"
"/home/runner/nogil-3.9.10/lib/python3.9/lib-dynload/_sha512.nogil-39b-x86_64-linux-gnu.so"
"/home/runner/nogil-3.9.10/lib/python3.9/lib-dynload/_random.nogil-39b-x86_64-linux-gnu.so"
"/home/runner/nogil-3.9.10/lib/python3.9/lib-dynload/_json.nogil-39b-x86_64-linux-gnu.so"
"/home/runner/nogil-3.9.10/lib/python3.9/lib-dynload/math.nogil-39b-x86_64-linux-gnu.so"
"/home/runner/nogil-3.9.10/lib/python3.9/lib-dynload/select.nogil-39b-x86_64-linux-gnu.so"
"/home/runner/nogil-3.9.10/lib/python3.9/lib-dynload/_posixsubprocess.nogil-39b-x86_64-linux-gnu.so"
"/home/runner/nogil-3.9.10/lib/python3.9/lib-dynload/_struct.nogil-39b-x86_64-linux-gnu.so"
"/home/runner/nogil-3.9.10/lib/python3.9/lib-dynload/_lzma.nogil-39b-x86_64-linux-gnu.so"
"/home/runner/nogil-3.9.10/lib/python3.9/lib-dynload/_bz2.nogil-39b-x86_64-linux-gnu.so"
"/home/runner/nogil-3.9.10/lib/libpython3.9.so.1.0"
"/home/runner/nogil-3.9.10/lib/python3.9/lib-dynload/_uuid.nogil-39b-x86_64-linux-gnu.so"
"/home/runner/nogil-3.9.10/lib/python3.9/lib-dynload/_bisect.nogil-39b-x86_64-linux-gnu.so"
"/home/runner/nogil-3.9.10/lib/python3.9/lib-dynload/grp.nogil-39b-x86_64-linux-gnu.so"
"/home/runner/nogil-3.9.10/lib/python3.9/lib-dynload/zlib.nogil-39b-x86_64-linux-gnu.so"
"/home/runner/nogil-3.9.10/lib/python3.9/lib-dynload/binascii.nogil-39b-x86_64-linux-gnu.so"
"/home/runner/nogil-3.9.10/lib/python3.9/lib-dynload/_csv.nogil-39b-x86_64-linux-gnu.so"
"/home/runner/nogil-3.9.10/lib/python3.9/lib-dynload/_heapq.nogil-39b-x86_64-linux-gnu.so"
"/home/runner/nogil-3.9.10/bin/python3.9"
"/usr/lib/locale/locale-archive"
"/usr/lib/x86_64-linux-gnu/libc.so.6"
"/usr/lib/x86_64-linux-gnu/libz.so.1.2.11"
"/usr/lib/locale/C.utf8/LC_CTYPE"
"/usr/lib/x86_64-linux-gnu/libm.so.6"
"/usr/lib/x86_64-linux-gnu/libutil.so.1"
"/usr/lib/x86_64-linux-gnu/libdl.so.2"
"/usr/lib/x86_64-linux-gnu/libpthread.so.0"
"/usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache"
"/usr/lib/x86_64-linux-gnu/ld-linux-x86-64.so.2"
"/lib64/ld-linux-x86-64.so.2"
)
for f in "${shared[@]}"
do
mkdir -p $(dirname "./so-libs$f")
cp "$f" "./so-libs$f"
done
if: ${{ failure() }}
- name: upload core dump file
uses: actions/upload-artifact@v3
with:
name: core-dump
path: /cores
if: ${{ always() }}
- name: upload shared libs
uses: actions/upload-artifact@v3
with:
name: shared-libs
path: ./so-libs
if: ${{ always() }}
- name: upload pytest test results
uses: actions/upload-artifact@v3
with:
name: pytest-results-${{ matrix.python-version }}
path: junit/test-results-${{ matrix.python-version }}.xml
if: ${{ always() }}