-
Notifications
You must be signed in to change notification settings - Fork 86
94 lines (90 loc) · 2.94 KB
/
pip_install_gmpy2.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
name: pip_install_gmpy2
on: [push, pull_request]
jobs:
osx:
strategy:
fail-fast: false
matrix:
python-version: [3.11, '3.12-dev']
os: [macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- run: pip install --upgrade pip
- run: pip --verbose install -e .[tests]
- run: python test/runtests.py
- run: PYTHONPATH=`pwd`/gmpy2 python test_cython/runtests.py
if: ${{ matrix.python-version == '3.11' }}
linux:
strategy:
fail-fast: false
matrix:
python-version: [3.11]
os: [ubuntu-22.04]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- run: sudo apt-get install libmpc-dev texlive texlive-latex-extra latexmk lcov
- run: pip install --upgrade pip
- run: pip --verbose install -e .[docs,tests]
- run: python test/runtests.py
- run: PYTHONPATH=`pwd`/gmpy2 python test_cython/runtests.py
- run: sphinx-build --color -W --keep-going -b doctest docs build/sphinx/doctest
- run: sphinx-build --color -W --keep-going -b html docs build/sphinx/html
- run: sphinx-build --color -W --keep-going -b latex docs build/sphinx/latex
- run: make -C build/sphinx/latex all-pdf
- name: Run coverage tests
# XXX: why this doesn't work with pip install --editable above?
run: |
pip uninstall -y gmpy2
python setup.py clean
CFLAGS="-coverage" python setup.py develop
python test/runtests.py
lcov --capture --directory . --no-external --output-file build/coverage.info
genhtml build/coverage.info --output-directory build/coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
gcov: true
gcov_include: src/*.c
gcov_args: --no-external
- name: Archive build artifacts
uses: actions/upload-artifact@v3
with:
path: |
build/sphinx/doctest/
build/sphinx/html/
build/sphinx/latex/gmpy2.pdf
build/coverage/
windows:
strategy:
fail-fast: false
matrix:
os: [windows-latest]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v3
- uses: msys2/setup-msys2@v2
name: Setup msys2
with:
update: true
install: >-
gcc
gmp-devel
mpfr-devel
mpc-devel
python-setuptools
python-pip
- run: pip install --upgrade pip
- run: pip --verbose install -e .[tests]
- run: python test/runtests.py
- run: PYTHONPATH=`pwd`/gmpy2 python test_cython/runtests.py