-
Notifications
You must be signed in to change notification settings - Fork 2
68 lines (66 loc) · 2.44 KB
/
build_docs.yml
File metadata and controls
68 lines (66 loc) · 2.44 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
60
61
62
63
64
65
66
67
68
name: Build Documentation
on: [push, pull_request]
jobs:
build_docs:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v2
with:
submodules: "recursive" # Fetch Hugo themes (true OR recursive)
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
- name: Get CPP Notebooks
run: scripts/genMyst.sh
- name: Cache conda
uses: actions/cache@v1
env:
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key:
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
hashFiles('symedocs.yml') }}
- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('symedocs.yml') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: symedocs
environment-file: symedocs.yml
python-version: 3.9
auto-activate-base: false
- name: Build SymEngine CPP core
run: |
git clone https://github.com/symengine/symengine symengine-cpp
cd symengine-cpp
mkdir build
cd build
export LDFLAGS="-Wl,-rpath,${NB_PYTHON_PREFIX}/lib -L${NB_PYTHON_PREFIX}/lib"
cmake -DWITH_COTIRE=no -DBUILD_SHARED_LIBS=yes -DWITH_MPC=yes -DWITH_ARB=yes -DINTEGER_CLASS=flint -DWITH_LLVM=yes -DCMAKE_PREFIX_PATH=${NB_PYTHON_PREFIX} -DCMAKE_INSTALL_PREFIX=${NB_PYTHON_PREFIX} -DBUILD_TESTS=off -DBUILD_BENCHMARKS=off -DCMAKE_INSTALL_LIBDIR=lib ..
make -j4
sudo make install
cd ..
rm -rf build
- name: Build Docs
run: sphinx-build docs ./public
- name: Deploy Docs
if: ${{ github.ref == 'refs/heads/sources' && github.repository == 'Symengine/symengine.github.io' }}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./public
- name: Deploy Notebooks
if: ${{ github.ref == 'refs/heads/sources' && github.repository == 'Symengine/symengine.github.io' }}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: notebooks
publish_dir: ./notebooks