Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

open PR to run CI #1

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
455be70
hack at ci script
cfbolz Mar 12, 2024
ee5a30b
install pip, don't setup python
cfbolz Mar 12, 2024
105371e
remove the numpy step for now
cfbolz Mar 12, 2024
2f281d8
c
cfbolz Mar 12, 2024
586473f
c
cfbolz Mar 12, 2024
62e3b2f
try using a venv
cfbolz Mar 12, 2024
86c5501
activate in every step
cfbolz Mar 12, 2024
45a8663
grumble
cfbolz Mar 12, 2024
bbc7ffc
grumble
cfbolz Mar 12, 2024
8418fc4
increase the number of runs
cfbolz Mar 12, 2024
8578acb
run it in gdb with jit off first, then with jit
cfbolz Mar 12, 2024
8f6fc99
that didn't crash. swap the order (maybe pyc)
cfbolz Mar 12, 2024
e0335f2
try to run with faulthandler
cfbolz Mar 12, 2024
f60e48a
in case it is pyc files, delete them
cfbolz Mar 12, 2024
d6a810a
turn on jit logging
cfbolz Mar 12, 2024
4bb555a
try again to run the gdb version first
cfbolz Mar 12, 2024
580b594
upload the jit out file instead of using stdout, that confuses a test
cfbolz Mar 12, 2024
f7e460c
try to use catchsegv
cfbolz Mar 12, 2024
ac575a7
fix path
cfbolz Mar 12, 2024
59c5106
try to enable coredump uploading, and disable catchsegv again
cfbolz Mar 12, 2024
1480334
try once again without traceback
cfbolz Mar 12, 2024
d7605e2
try to use tmate
cfbolz Mar 12, 2024
e2f3354
try with a new build
cfbolz Mar 12, 2024
8ff5a9c
grumble
cfbolz Mar 12, 2024
855b9f2
different build
cfbolz Mar 12, 2024
73c091a
install more deps
cfbolz Mar 12, 2024
2a2bbc7
remove python-cffi
cfbolz Mar 12, 2024
1b813ad
now that I am using a proper self-contained build, no need for instal…
cfbolz Mar 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 80 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'windows-2022', 'macos-latest']
python: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13.0-alpha.3', 'pypy3.9-v7.3.15', 'pypy3.10-v7.3.15']
os: ['ubuntu-latest']
python: ['0', '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']

name: "Python ${{ matrix.python }} / ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
Expand All @@ -31,36 +31,98 @@ jobs:
with:
submodules: true

- name: Setup Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
cache: 'pip'
- name: download lldebug pypy
run: |
wget https://cfbolz.de/stuff/pypy-nightly.tar.bz2
tar xf pypy-nightly.tar.bz2
./pypy-nightly/bin/pypy -V
./pypy-nightly/bin/pypy -m venv venv
. ./venv/bin/activate
python -V

- name: Install the latest CMake
uses: lukka/get-cmake@latest

- name: Install Eigen
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get -y install libeigen3-dev
run: sudo apt-get -y install libeigen3-dev gdb glibc-tools

- name: Install PyTest
run: |
. ./venv/bin/activate
python -m ensurepip
python -m pip install pytest pytest-github-actions-annotate-failures typing_extensions

- name: Install NumPy
if: ${{ !startsWith(matrix.python, 'pypy') && !contains(matrix.python, 'alpha') }}
run: |
python -m pip install numpy scipy

- name: Configure
run: >
cmake -S . -B build -DNB_TEST_STABLE_ABI=ON -DNB_TEST_SHARED_BUILD="$(python3 -c 'import sys; print(int(sys.version_info.minor>=11))')"
run: |
. ./venv/bin/activate
cmake -S . -B build -DNB_TEST_STABLE_ABI=ON -DNB_TEST_SHARED_BUILD="$(python -c 'import sys; print(int(sys.version_info.minor>=11))')"

- name: Build C++
run: cmake --build build -j 2
run: |
. ./venv/bin/activate
cmake --build build -j 2

- name: Run tests in gdb
run: |
. ./venv/bin/activate
find -name "*.pyc" -delete
cd build;
gdb -ex "set confirm off" -ex "set pagination off" -ex "set debuginfod enabled off" -ex run -ex where -ex quit --args python -m pytest

- name: Set cores to get stored in /cores
run: |
sudo mkdir /cores
sudo chmod 777 /cores
# Core filenames will be of the form executable.pid.timestamp:
sudo bash -c 'echo "/cores/%e.%p.%t" > /proc/sys/kernel/core_pattern'

- name: Run tests
run: >
run: |
. ./venv/bin/activate
find -name "*.pyc" -delete
cd build
ulimit -c unlimited
PYPYLOG=jit:out python -m pytest

- name: Setup tmate session
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3
with:
limit-access-to-actor: true

- name: upload coredump
uses: actions/upload-artifact@v3
if: ${{ failure() }} # Run only if something went wrong
with:
name: cores
path: /cores

- name: upload out file
if: always()
uses: actions/upload-artifact@v3
with:
name: out-${{ matrix.python }}
path: build/out

- name: Run tests without jit
run: |
. ./venv/bin/activate
find -name "*.pyc" -delete
cd build;
python -m pytest
python -X faulthandler --jit off -m pytest

- name: Run tests in gdb
run: |
. ./venv/bin/activate
find -name "*.pyc" -delete
cd build;
gdb -ex "set confirm off" -ex "set pagination off" -ex "set debuginfod enabled off" -ex run -ex where -ex quit --args python -m pytest

- name: Run tests in gdb no jit
run: |
. ./venv/bin/activate
find -name "*.pyc" -delete
cd build;
gdb -ex "set confirm off" -ex "set pagination off" -ex "set debuginfod enabled off" -ex run -ex where -ex quit --args python --jit off -m pytest

Loading