-
Notifications
You must be signed in to change notification settings - Fork 92
59 lines (59 loc) · 1.99 KB
/
build.yml
File metadata and controls
59 lines (59 loc) · 1.99 KB
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
name: Publish Python distributions to PyPI and TestPyPI
env:
BOOST_PYTHON_LIB: boost_python
BOOST_SYSTEM_LIB: boost_system
BOOST_THREAD_LIB: boost_thread
MASON_BUILD: true
CCACHE_TEMPDIR: /tmp/.ccache-temp
CCACHE_COMPRESS: 1
PYTHONUSERBASE: $(pwd)/mason_packages/.link
PYTHONPATH: $(pwd)/mason_packages/.link/lib/python2.7/site-packages
on: [push, pull_request]
jobs:
build-and-test:
strategy:
fail-fast: false
matrix:
python-version:
- "2.7"
- "3.6"
- "3.8"
system:
- ubuntu-18.04
- ubuntu-20.04
runs-on: ${{matrix.system}}
name: Build and publish Python distribution
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Git Sumbodule Update
run: |
git pull --recurse-submodules
git submodule update --remote --recursive
- name: install dependencies
run: |
sudo apt-get install libboost-python-dev python3-cairo-dev python-cairo-dev clang postgresql
- name: Initialize Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Build binary wheel and a source tarball
run: |
pip install wheel pycairo nose PyPDF2
python setup.py sdist bdist_wheel
- name: Run tests
run: |
source scripts/setup_mason.sh
export PATH=$(pwd)/mason_packages/.link/bin:${PYTHONUSERBASE}/bin:${PATH}
mkdir -p ${PYTHONPATH}
python setup.py install --prefix ${PYTHONUSERBASE}
source mason-config.env
./mason_packages/.link/bin/postgres -k ${PGHOST} > postgres.log &
python test/run_tests.py
python test/visual.py -q
./mason_packages/.link/bin/pg_ctl -w stop
- uses: actions/upload-artifact@v3
with:
name: python_${{ matrix.python-version }}-${{matrix.system}}
path: ./dist/*.whl