-
Notifications
You must be signed in to change notification settings - Fork 23
82 lines (69 loc) · 2.06 KB
/
docs.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
name: Docs
on:
pull_request:
push:
branches: [main]
jobs:
test:
name: Build docs
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.12.0
with:
access_token: ${{ github.token }}
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- name: Cache conda and dependencies
id: cache
uses: actions/cache@v3
env:
# Increase this to reset the cache if the key hasn't changed.
CACHE_NUM: 3
with:
path: |
/usr/share/miniconda/envs/anaconda-client-env
~/osx-conda
~/.profile
key: conda-v${{ env.CACHE_NUM }}-${{ hashFiles('requirements/CI-docs/requirements.txt') }}
- name: Install Conda
uses: conda-incubator/setup-miniconda@v2
if: steps.cache.outputs.cache-hit != 'true'
with:
activate-environment: anaconda-client-env
python-version: "3.10"
channels: conda-forge
channel-priority: strict
auto-update-conda: true
- name: Install slim
if: steps.cache.outputs.cache-hit != 'true'
shell: bash -l {0} #We need a login shell to get conda
run: |
conda install --yes slim
- name: Install pip deps
if: steps.cache.outputs.cache-hit != 'true'
shell: bash -l {0}
run: |
pip install -r requirements/CI-docs/requirements.txt
# # Retaining commented block for next devel cycle
# - name: Build SLiM
# run: |
# git clone https://github.com/messerlab/SLiM.git
# cd SLiM
# mkdir -p Release
# cd Release
# cmake -D CMAKE_BUILD_TYPE=Release ..
# make -j 2
- name: Build docs
run: |
source ~/.profile
conda activate anaconda-client-env
export PATH=$PWD/SLiM/Release:$PATH
slim -v
pip list
cd docs && make