Skip to content

Commit a2795bb

Browse files
committed
Add separate github action to build & publish docs
Fix syntax in build script for python wrapper in conda recipe
1 parent 96273c0 commit a2795bb

File tree

2 files changed

+44
-15
lines changed

2 files changed

+44
-15
lines changed

.github/workflows/test-suite.yml

Lines changed: 41 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -168,10 +168,6 @@ jobs:
168168
run: |
169169
conda info
170170
conda list
171-
- name: Install doxgen on unix systems
172-
if: matrix.os != 'windows-latest'
173-
run: |
174-
conda install doxygen>=1.9.2 graphviz -y
175171
- name: Install compilers using conda on Linux/Mac
176172
if: matrix.os != 'windows-latest' && matrix.with-valgrind != true
177173
run: |
@@ -353,14 +349,6 @@ jobs:
353349
run: |
354350
pytest -sv tests/python
355351
356-
###################################
357-
# Docs tests
358-
###################################
359-
- name: Build docs
360-
if: matrix.os != 'windows-latest'
361-
run: |
362-
python scripts/devtasks.py docs --rebuild
363-
364352
###################################
365353
# Coverage
366354
###################################
@@ -372,3 +360,44 @@ jobs:
372360
token: ${{ secrets.CODECOV_TOKEN }}
373361
file: coverage/coverage.info
374362
functionalities: gcov
363+
364+
#######################################
365+
# Build & Publish docs
366+
#######################################
367+
docs:
368+
name: Build/Publish the Docs
369+
runs-on: ubuntu-latest
370+
steps:
371+
- uses: actions/checkout@v4
372+
with:
373+
submodules: true
374+
- name: Get tags required by setuptools_scm to generate version
375+
run: |
376+
git fetch --prune --unshallow
377+
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
378+
- name: Set up miniconda test environment
379+
if: matrix.with-mpi == false
380+
uses: conda-incubator/setup-miniconda@v3
381+
with:
382+
activate-environment: ephoto
383+
environment-file: environment.yml
384+
auto-update-conda: true
385+
channels: conda-forge
386+
channel-priority: strict
387+
miniforge-variant: Miniforge3
388+
miniforge-version: latest
389+
conda-remove-defaults: true
390+
- name: Install doc dependencies
391+
run: |
392+
conda install -f environment_docs.yml
393+
- name: Build docs
394+
if: matrix.os != 'windows-latest'
395+
run: |
396+
python scripts/devtasks.py docs --rebuild
397+
- name: Publish docs to Github pages
398+
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
399+
uses: JamesIves/github-pages-deploy-action@3.7.1
400+
with:
401+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
402+
BRANCH: gh-pages
403+
FOLDER: build/doc/html/

recipe/meta.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ build:
1919
# TODO: Add Python wrapper as export?
2020
outputs:
2121
- name: ephotosynthesis
22-
version: {{ version }}
22+
version: {{ version }}
2323
script: build_cpp.sh # [unix]
2424
script: bld_cpp.bat # [win]
2525
about:
@@ -55,8 +55,8 @@ outputs:
5555
- if not exist %LIBRARY_INC%\\ePhotosynthesis\\ePhotosynthesis.hpp exit 1 # [win]
5656
- if not exist %LIBRARY_BIN%\\ePhoto.exe exit 1 # [win]
5757
- name: pyphotosynthesis
58-
version: {{ version }}
59-
script: '{{ PYTHON }} -m pip install . --no-deps --ignore-installed --no-cache-dir -vvv '
58+
version: {{ version }}
59+
script: python -m pip install . --no-deps --ignore-installed --no-cache-dir -vvv
6060
about:
6161
summary:
6262
description: |

0 commit comments

Comments
 (0)