Merge pull request #2507 from SasView/perspective_fix_5.0.6 #2047
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docs | |
on: | |
[push, pull_request] | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
doc-build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python-version: [3.9] | |
steps: | |
- name: Obtain SasView source from git | |
uses: actions/checkout@v1 | |
- name: Set up Python | |
uses: actions/setup-python@v1 | |
with: | |
python-version: ${{ matrix.python-version }} | |
### Caching of pip downloads and local wheel builds | |
- name: Obtain pip cache | |
uses: actions/cache@v2 | |
with: | |
path: ~/.cache/pip | |
key: ${{ matrix.OS }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/test.yml') }} | |
restore-keys: | | |
${{ matrix.OS }}-pip-${{ matrix.python-version }}- | |
${{ matrix.OS }}-pip- | |
### Installation of build-dependencies | |
- name: Install packaged dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install opencl-headers ocl-icd-opencl-dev libpocl2 xvfb pyqt5-dev-tools | |
- name: Install Python dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install wheel setuptools | |
python -m pip install numpy scipy matplotlib docutils "pytest<6" sphinx unittest-xml-reporting tinycc lxml h5py sphinx pyparsing html5lib reportlab pybind11 appdirs six numba mako ipython qtconsole xhtml2pdf unittest-xml-reporting pylint qt5reactor periodictable PyQt5 | |
- name: Install pyopencl | |
run: | | |
python -m pip install pyopencl | |
- name: Fetch sources for sibling projects | |
run: | | |
git clone --depth=50 --branch=master https://github.com/SasView/sasmodels.git ../sasmodels | |
git clone --depth=50 --branch=master https://github.com/bumps/bumps.git ../bumps | |
- name: Build and install sasmodels | |
run: | | |
cd ../sasmodels | |
rm -rf build | |
rm -rf dist | |
python setup.py clean | |
python setup.py build | |
python -m pip install . | |
- name: Build and install bumps | |
run: | | |
cd ../bumps | |
rm -rf build | |
rm -rf dist | |
python setup.py clean | |
python setup.py build | |
python -m pip install . | |
### Actual building/testing of sasview | |
- name: Build sasview | |
run: | | |
# SET SASVIEW GITHASH | |
githash=$( git rev-parse HEAD ) | |
sed -i.bak s/GIT_COMMIT/$githash/g src/sas/sasview/__init__.py | |
# BUILD SASVIEW | |
python setup.py clean | |
python setup.py build | |
python -m pip install . | |
- name: Build sasmodels and bumps docs | |
run: | | |
make -C ../bumps/doc html || true | |
mkdir -p ~/.sasmodels/compiled_models | |
make -j4 -C ../sasmodels/doc html || true | |
- name: Build sasview docs | |
run: | | |
cd docs/sphinx-docs/ | |
xvfb-run -a --server-args="-screen 0 1024x768x24" python build_sphinx.py || true |