-
Notifications
You must be signed in to change notification settings - Fork 46
143 lines (117 loc) · 3.92 KB
/
tutorials.yaml
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
name: Run tutorials
on:
push:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
jobs:
installer:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- name: Free space
# HACK fixes 'No space left on device'
# see: https://github.com/orgs/community/discussions/25678#discussioncomment-5242449
# NOTE we don't use those, we use conda for everything anyway
run: rm -rf /opt/hostedtoolcache
- name: Checkout repository
uses: actions/checkout@v3
with:
sparse-checkout: |
docs
tests
sparse-checkout-cone-mode: false
lfs: false
- name: Install conda environment dependencies
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-version: latest
miniforge-variant: Mambaforge
mamba-version: "*"
channels: conda-forge,bioconda
channel-priority: strict
activate-environment: JupyText
auto-update-conda: true
environment-file: tests/conda_tutorials_env.yaml
- name: Setup Jupyter kernel
run: |
python -m ipykernel install --user
- name: Run installation notebooks
working-directory: ./docs
run: ./convert.sh --branch *_install.md
- name: Create V-pipe installation archive
# HACK this acceleraters upload while preserving Unix-specifics (case sensitivity, file attributes).
run: tar --zstd -cvf vpipeinstallation.tar.zst ./docs/vp-analysis
- name: Keep installation
uses: actions/upload-artifact@v3
with:
name: VPipeInstallation
path: vpipeinstallation.tar.zst
if-no-files-found: error
- name: Save notebooks
uses: actions/upload-artifact@v3
with:
name: JupyterNotebooks
path: ./docs/*.ipynb
tutorial:
needs: installer
strategy:
max-parallel: 5
fail-fast: false
matrix:
virus: ["hiv", "sarscov2"]
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- name: Free space
# HACK fixes 'No space left on device'
# see: https://github.com/orgs/community/discussions/25678#discussioncomment-5242449
# NOTE we don't use those, we use conda for everything anyway
run: rm -rf /opt/hostedtoolcache
- name: Checkout repository
uses: actions/checkout@v3
with:
sparse-checkout: |
docs
tests
sparse-checkout-cone-mode: false
lfs: false
- name: Reuse installation
uses: actions/download-artifact@v2
with:
name: VPipeInstallation
- name: Extract V-pipe installation archive
run: tar --zstd -xvf vpipeinstallation.tar.zst
- name: Install conda environment dependencies
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-version: latest
miniforge-variant: Mambaforge
python-version: "3.11"
mamba-version: "*"
channels: conda-forge,bioconda
channel-priority: strict
activate-environment: JupyText
auto-update-conda: true
environment-file: tests/conda_tutorials_env.yaml
- name: Setup Jupyter kernel
run: |
python -m ipykernel install --user
- name: Run analysis notebooks
working-directory: ./docs
run: ./convert.sh --branch tutorial*_${{ matrix.virus }}.md
- name: Save notebooks
uses: actions/upload-artifact@v3
with:
name: JupyterNotebooks
path: ./docs/*.ipynb
# - name: Publish
# uses: peaceiris/actions-gh-pages@v3
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# publish_dir: ./docs