-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (71 loc) · 2.43 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
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 ./so-libs"{}" \;
find $pythonLocation/lib/ -name '*.so' -exec cp "{}" ./so-libs"{}" \;
mkdir -p ./so-libs/lib/x86_64-linux-gnu/
mkdir -p ./so-libs/lib64/
cp /lib/x86_64-linux-gnu/libgcc_s.so.1 ./so-libs/lib/x86_64-linux-gnu/libgcc_s.so.1
cp /lib/x86_64-linux-gnu/libm.so.6 ./so-libs/lib/x86_64-linux-gnu/libm.so.6
cp /lib/x86_64-linux-gnu/libc.so.6 ./so-libs/lib/x86_64-linux-gnu/libc.so.6
cp /lib64/ld-linux-x86-64.so.2 ./so-libs/lib64/ld-linux-x86-64.so.2
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() }}