-
-
Notifications
You must be signed in to change notification settings - Fork 201
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
200 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,60 @@ | ||
name: build the documentation | ||
on: [push, pull_request] | ||
name: Build documentation | ||
|
||
on: | ||
push: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
FORCE_COLOR: "1" | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: set up python | ||
uses: actions/setup-python@v5 | ||
with: | ||
cache: 'pip' | ||
|
||
- name: install dependencies | ||
run: | | ||
pip install ".[docs]" | ||
sudo apt-get -y update | ||
sudo apt-get -y install graphviz libclang1-11 libclang-cpp11 | ||
- name: install doxygen from SF binary archives | ||
env: | ||
DOXYGEN_VERSION: 1.9.4 | ||
run: | | ||
mkdir doxygen-bin-arc && cd doxygen-bin-arc | ||
curl -L https://sourceforge.net/projects/doxygen/files/rel-$DOXYGEN_VERSION/doxygen-$DOXYGEN_VERSION.linux.bin.tar.gz > doxygen.tar.gz | ||
gunzip doxygen.tar.gz | ||
tar xf doxygen.tar | ||
cd doxygen-$DOXYGEN_VERSION | ||
sudo make install | ||
- name: build the documentation | ||
run: | | ||
make html | ||
rm documentation/build/html/.buildinfo | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: docs build artifacts | ||
path: | | ||
documentation/build/html | ||
examples/*/*/xml | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3" | ||
|
||
- name: Install apt dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install graphviz libclang1-11 libclang-cpp11 | ||
- name: Install doxygen from SourceForge binary archives | ||
env: | ||
DOXYGEN_VERSION: 1.9.4 | ||
run: | | ||
mkdir doxygen-bin-arc && cd doxygen-bin-arc | ||
curl -L https://sourceforge.net/projects/doxygen/files/rel-$DOXYGEN_VERSION/doxygen-$DOXYGEN_VERSION.linux.bin.tar.gz > doxygen.tar.gz | ||
gunzip doxygen.tar.gz | ||
tar xf doxygen.tar | ||
cd doxygen-$DOXYGEN_VERSION | ||
sudo make install | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install .[docs] | ||
- name: Build the documentation | ||
run: | | ||
make html | ||
rm documentation/build/html/.buildinfo | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: docs build artifacts | ||
path: | | ||
documentation/build/html | ||
examples/*/*/xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,83 @@ | ||
name: lint | ||
on: [push, pull_request] | ||
jobs: | ||
build: | ||
name: Lint source code | ||
|
||
on: | ||
push: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
FORCE_COLOR: "1" | ||
|
||
jobs: | ||
black: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install "black==22.3.0" | ||
- name: Format with black | ||
run: black --check . | ||
|
||
- name: set up python | ||
uses: actions/setup-python@v5 | ||
with: | ||
cache: 'pip' | ||
flake8: | ||
runs-on: ubuntu-latest | ||
|
||
- name: install dependencies | ||
run: | | ||
pip install ".[lint]" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install --upgrade "flake8>=6" | ||
- name: Lint with flake8 | ||
run: flake8 breathe | ||
|
||
mypy: | ||
runs-on: ubuntu-latest | ||
|
||
- name: lint the source code | ||
run: make flake8 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install ".[lint]" | ||
- name: Type check with mypy | ||
run: mypy --warn-redundant-casts --warn-unused-ignores breathe tests | ||
|
||
- name: check source code formatting | ||
run: make black | ||
twine: | ||
runs-on: ubuntu-latest | ||
|
||
- name: type check the source code | ||
run: make type-check | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install --upgrade twine build | ||
- name: Lint with twine | ||
run: | | ||
python -m build . | ||
twine check dist/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters