-
Notifications
You must be signed in to change notification settings - Fork 13
89 lines (81 loc) · 3.01 KB
/
actions-test.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
name: Python Package using Conda
on: [push]
jobs:
build-linux:
runs-on: ubuntu-latest
strategy:
max-parallel: 5
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
echo "Pip is at $(which pip)"
echo $CONDA
echo $GITHUB_PATH
- name: pip cache
uses: actions/cache@v2
id: cache
with:
path: /usr/share/miniconda/lib/python3.8/site-packages/*
key: ${{ runner.os }}-condapip-${{ secrets.CACHE_VERSION }}-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-condapip-
${{ runner.os }}
- name: Install conda dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
echo "Cache miss. Installing dependencies"
conda install -yq pip numpy scipy h5py sphinx matplotlib pandas networkx cffi jupyter psutil sqlalchemy ipykernel ipywidgets
- name: Install pip dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
echo "Cache miss. Installing dependencies"
echo "Pip is at $(which pip)"
echo "Env python location: ${{ env.pythonLocation}}"
pip install recommonmark sphinx-rtd-theme nbsphinx mkdocs markdown commonmark
- name: Install BBN dependencies
run: |
export GIT_LFS_SKIP_SMUDGE=1
pip install git+https://github.com/BBN-Q/bbndb.git
pip install git+https://github.com/BBN-Q/QGL.git@develop
pip install git+https://github.com/spatialaudio/nbsphinx.git@master
pip install pyvisa coveralls scikit-learn pyusb future python-usbtmc setproctitle progress serial
export GIT_LFS_SKIP_SMUDGE=0
- name: Test with unittest
run: |
pip install -e .
python -m unittest discover -v test
- name: Build Documentation
run: |
cd doc
make html
cd ..
- name: Commit documentation changes
run: |
echo "Cloning from $GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git"
git clone $GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git --branch gh-pages --single-branch gh-pages
cp -r doc/_build/html/* gh-pages/
cp -r doc/_build/html auspex_documentation
cd gh-pages
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .
git commit -m "Update documentation" -a || true
# The above command will fail if no changes were present, so we ignore
# the return code.
- name: Push changes
uses: ad-m/github-push-action@master
with:
branch: gh-pages
directory: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Auspex Documentation
uses: actions/upload-artifact@v4
with:
path: auspex_documentation