Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: generate doxygen gh-pages (#3000) #3032

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions .github/workflows/docs.yml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we want this for each PR, and it should be a weekly update for develop, IMHO.

For 1.14.x, the document should only be updated/generated for a release.

Copy link

@hdfeos hdfeos Jun 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to recommend it for each PR because developers often forget to document codes properly.
Doxygen is very good at detecting lexical error.
It is also useful for writing documentation first approach in software development (e.g., API prototyping with skeleton).

By the way, please check these URLs if you want to see the latest manuals until this action is merged:

https://hdfeos.github.io/hdf5/develop/
https://hdfeos.github.io/hdf5/1.14.1/

Copy link
Contributor

@brtnfld brtnfld Jun 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We discussed a separate action to check for doxygen warnings and other issues for PRs. This #3000 is for generating up-to-date docs.

Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: doxygen gh-pages

on:
workflow_dispatch:
push:
pull_request:
branches: [ develop ]
paths-ignore:
- '.github/CODEOWNERS'
- '.github/FUNDING.yml'
- 'doc/**'
- 'release_docs/**'
- 'ACKNOWLEDGEMENTS'
- 'COPYING**'
- '**.md'

# Using concurrency to cancel any in-progress job or run
concurrency:
group: ${{ github.workflow }}-${{ github.sha || github.event.pull_request.number }}
cancel-in-progress: true

jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
steps:
- name: Get Sources
uses: actions/checkout@v3

- name: Install Dependencies
run: |
sudo apt update -y
sudo apt install -y libunwind-dev
sudo apt-get install -y graphviz
sudo apt-get install -y --no-install-recommends doxygen
sudo apt-get install -y cmake

- name: Build Develop Documentation
run: |
git clone https://github.com/HDFGroup/hdf5.git
cd hdf5
mkdir build
cd build
cmake -DHDF5_BUILD_DOC:BOOL=ON ..
make doxygen

- name: Deploy Develop
uses: peaceiris/actions-gh-pages@v3
with:
publish_dir: ./hdf5/build/hdf5lib_docs/html
destination_dir: develop
github_token: ${{ secrets.GITHUB_TOKEN }}


- name: Build 1.14.1 Documentation
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why build 1.14.1 docs in a develop PR? Also, this file will need to be fixed every time 1.14 is released.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Get branch name · Actions · GitHub Marketplace]
( https://github.com/marketplace/actions/get-branch-name )

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@byrnHDF Thanks for reviewing! This PR was a quick demo patch for @brtnfld to show him how both develop & 1.14.1-2 Doxygen documentation should look like on GH pages since S3 docs were out of sync.

run: |
rm -rf ./hdf5
git clone https://github.com/HDFGroup/hdf5.git
cd hdf5
git checkout hdf5-1_14_1-2
mkdir build
cd build
cmake -DHDF5_BUILD_DOC:BOOL=ON ..
make doxygen

- name: Deploy 1.14.1
uses: peaceiris/actions-gh-pages@v3
with:
publish_dir: ./hdf5/build/hdf5lib_docs/html
destination_dir: 1.14.1
github_token: ${{ secrets.GITHUB_TOKEN }}