-
Notifications
You must be signed in to change notification settings - Fork 8
169 lines (162 loc) · 6.22 KB
/
deploy.yml
File metadata and controls
169 lines (162 loc) · 6.22 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
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
name: Deploy
on:
push:
branches: [ main ]
jobs:
# Run all the test jobs first
arithmetic:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Conda config
run: echo -e "channels:\n - conda-forge\n" > .condarc
- uses: conda-incubator/setup-miniconda@v3
with:
python-version: "3.12"
miniforge-version: latest
condarc-file: .condarc
environment-file: binder/environment.yml
- name: Installation and setup
shell: bash -l {0}
run: |
pip install --no-deps --no-build-isolation -e .
conda install -c conda-forge jupyter papermill
verdi presto --profile-name pwd
- name: Tests
shell: bash -l {0}
run: |
cd example_workflows/arithmetic
papermill aiida.ipynb aiida_out.ipynb -k "python3"
papermill cwl.ipynb cwl_out.ipynb -k "python3"
papermill jobflow.ipynb jobflow_out.ipynb -k "python3"
papermill pyiron_base.ipynb pyiron_base_out.ipynb -k "python3"
papermill pyiron_workflow.ipynb pyiron_workflow_out.ipynb -k "python3"
papermill universal_workflow.ipynb universal_workflow_out.ipynb -k "python3"
- name: Upload executed notebooks
uses: actions/upload-artifact@v4
with:
name: arithmetic-notebooks
path: example_workflows/arithmetic/*_out.ipynb
retention-days: 1
quantumespresso:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup environment
shell: bash -l {0}
run: |
echo -e "channels:\n - conda-forge\n" > .condarc
tail --lines=+4 example_workflows/quantum_espresso/environment.yml >> binder/environment.yml
- uses: conda-incubator/setup-miniconda@v3
with:
python-version: "3.12"
miniforge-version: latest
condarc-file: .condarc
environment-file: binder/environment.yml
- name: Installation and setup
shell: bash -l {0}
run: |
pip install --no-deps --no-build-isolation -e example_workflows/quantum_espresso/qe_xml_parser
pip install --no-deps --no-build-isolation -e .
conda install -c conda-forge jupyter papermill
verdi presto --profile-name pwd
- name: Tests
shell: bash -l {0}
run: |
export ESPRESSO_PSEUDO=$(pwd)/espresso/pseudo
cp -r example_workflows/quantum_espresso/espresso .
cd example_workflows/quantum_espresso
papermill aiida.ipynb aiida_out.ipynb -k "python3"
papermill cwl.ipynb cwl_out.ipynb -k "python3"
papermill jobflow.ipynb jobflow_out.ipynb -k "python3"
papermill pyiron_base.ipynb pyiron_base_out.ipynb -k "python3"
papermill pyiron_workflow.ipynb pyiron_workflow_out.ipynb -k "python3"
papermill universal_workflow.ipynb universal_workflow_out.ipynb -k "python3"
- name: Upload executed notebooks
uses: actions/upload-artifact@v4
with:
name: quantumespresso-notebooks
path: example_workflows/quantum_espresso/*_out.ipynb
retention-days: 1
nfdi4ing:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Conda config
run: echo -e "channels:\n - conda-forge\n" > .condarc
- uses: conda-incubator/setup-miniconda@v3
with:
python-version: "3.12"
miniforge-version: latest
condarc-file: .condarc
environment-file: binder/environment.yml
- name: Installation and setup
shell: bash -l {0}
run: |
pip install --no-deps --no-build-isolation -e .
conda install -c conda-forge jupyter papermill
verdi presto --profile-name pwd
sudo apt-get install -y $(cat binder/apt.txt)
- name: Create Additional Conda Environments
shell: bash -l {0}
run: |
conda env create -n preprocessing -f example_workflows/nfdi/source/envs/preprocessing.yaml -y
conda env create -n processing -f example_workflows/nfdi/source/envs/processing.yaml -y
conda env create -n postprocessing -f example_workflows/nfdi/source/envs/postprocessing.yaml -y
- name: Tests
shell: bash -l {0}
run: |
cd example_workflows/nfdi/
papermill aiida.ipynb aiida_out.ipynb -k "python3"
papermill cwl.ipynb cwl_out.ipynb -k "python3"
papermill jobflow.ipynb jobflow_out.ipynb -k "python3"
papermill pyiron_base.ipynb pyiron_base_out.ipynb -k "python3"
papermill pyiron_workflow.ipynb pyiron_workflow_out.ipynb -k "python3"
papermill universal_workflow.ipynb universal_workflow_out.ipynb -k "python3"
- name: Upload executed notebooks
uses: actions/upload-artifact@v4
with:
name: nfdi-notebooks
path: example_workflows/nfdi/*_out.ipynb
retention-days: 1
documentation:
runs-on: ubuntu-latest
needs: [arithmetic, quantumespresso, nfdi4ing]
steps:
- uses: actions/checkout@v4
- name: Conda config
run: echo -e "channels:\n - conda-forge\n" > .condarc
- uses: conda-incubator/setup-miniconda@v3
with:
python-version: "3.12"
miniforge-version: latest
condarc-file: .condarc
environment-file: documentation/environment.yml
- name: Download executed notebooks
uses: actions/download-artifact@v4
with:
path: executed-notebooks
- name: Copy executed notebooks to their locations
run: |
# Copy arithmetic notebooks
cp executed-notebooks/arithmetic-notebooks/*.ipynb example_workflows/arithmetic/
# Copy quantum espresso notebooks
cp executed-notebooks/quantumespresso-notebooks/*.ipynb example_workflows/quantum_espresso/
# Copy nfdi notebooks
cp executed-notebooks/nfdi-notebooks/*.ipynb example_workflows/nfdi/
- name: Build Jupyterbook
shell: bash -l {0}
run: |
cp documentation/_config.yml .
cp documentation/_toc.yml .
cp documentation/*.md .
jupyter-book build . --path-output public
mv public/_build/html public_html
touch public_html/.nojekyll
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@3.7.1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: public_html
CLEAN: true