mirror of https://github.com/Nonannet/copapy.git
fixed docs build pipeline
This commit is contained in:
parent
66ffd2b132
commit
e3da894e6e
|
|
@ -54,7 +54,7 @@ jobs:
|
||||||
|
|
||||||
- name: Install Python dependencies
|
- name: Install Python dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install -e .
|
python -m pip install .
|
||||||
python -m pip install pytest
|
python -m pip install pytest
|
||||||
|
|
||||||
- name: Vendor pelfy
|
- name: Vendor pelfy
|
||||||
|
|
@ -89,7 +89,7 @@ jobs:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
|
|
||||||
- name: Install Python dependencies
|
- name: Install Python dependencies
|
||||||
run: python -m pip install -e .[dev]
|
run: python -m pip install .[dev]
|
||||||
|
|
||||||
- name: Compile coparun
|
- name: Compile coparun
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -234,7 +234,7 @@ jobs:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
|
|
||||||
- name: Install Python dependencies
|
- name: Install Python dependencies
|
||||||
run: python -m pip install -e .[dev]
|
run: python -m pip install .[dev]
|
||||||
|
|
||||||
- name: Set up MSVC environment
|
- name: Set up MSVC environment
|
||||||
uses: microsoft/setup-msbuild@v2
|
uses: microsoft/setup-msbuild@v2
|
||||||
|
|
@ -310,26 +310,47 @@ jobs:
|
||||||
fi
|
fi
|
||||||
|
|
||||||
build-docs:
|
build-docs:
|
||||||
#if: github.event_name == 'push'
|
|
||||||
needs: [build_stencils, build-ubuntu, build-windows, build-arm64, build-armv6, build-armv7]
|
needs: [build_stencils, build-ubuntu, build-windows, build-arm64, build-armv6, build-armv7]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Download artifacts
|
- uses: actions/download-artifact@v4
|
||||||
uses: actions/download-artifact@v4
|
with:
|
||||||
|
name: stencil-object-files
|
||||||
|
path: src/copapy/obj
|
||||||
|
|
||||||
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
path: build/tmp
|
path: build/tmp
|
||||||
|
|
||||||
- name: Set up Python
|
- uses: actions/setup-python@v3
|
||||||
uses: actions/setup-python@v3
|
|
||||||
with:
|
with:
|
||||||
python-version: "3.x"
|
python-version: "3.x"
|
||||||
|
|
||||||
- name: Install package and dependencies
|
- name: Install package and dependencies
|
||||||
run: pip install sphinx pydata_sphinx_theme sphinx-autodoc-typehints myst-parser
|
run: pip install .[doc_build]
|
||||||
|
|
||||||
- name: Build Docs
|
- name: Build Docs
|
||||||
run: |
|
run: |
|
||||||
|
mkdir -p build/stencils
|
||||||
|
python stencils/generate_stencils.py build/stencils/stencils.c
|
||||||
|
cd docs
|
||||||
make html
|
make html
|
||||||
touch ./build/html/.nojekyll
|
touch build/html/.nojekyll
|
||||||
|
|
||||||
|
deploy-docs:
|
||||||
|
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
|
||||||
|
needs: build-docs
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
pages: write
|
||||||
|
id-token: write
|
||||||
|
environment:
|
||||||
|
name: github-pages
|
||||||
|
url: ${{ steps.deployment.outputs.page_url }}
|
||||||
|
steps:
|
||||||
|
- name: Deploy to GitHub Pages
|
||||||
|
id: deployment
|
||||||
|
uses: actions/deploy-pages@v4
|
||||||
|
|
@ -15,9 +15,10 @@ help:
|
||||||
.PHONY: help prepare-docs html
|
.PHONY: help prepare-docs html
|
||||||
|
|
||||||
prepare-docs:
|
prepare-docs:
|
||||||
|
mkdir -p $(BUILDDIR)
|
||||||
python $(SOURCEDIR)/generate_class_list.py --api-dir $(SOURCEDIR)/api
|
python $(SOURCEDIR)/generate_class_list.py --api-dir $(SOURCEDIR)/api
|
||||||
python $(SOURCEDIR)/extract_section.py --readme $(SOURCEDIR)/../../README.md --build-dir $(BUILDDIR)
|
python $(SOURCEDIR)/extract_section.py --readme $(SOURCEDIR)/../../README.md --build-dir $(BUILDDIR)
|
||||||
python $(SOURCEDIR)/stencil_doc.py --input $(SOURCEDIR)/../../build/stencils.c --asm-pattern "$(SOURCEDIR)/../../build/tmp/runner-linux-*/stencils.asm" --output $(BUILDDIR)/stencils.md
|
python $(SOURCEDIR)/stencil_doc.py --input $(SOURCEDIR)/../../build/stencils/stencils.c --asm-pattern "$(SOURCEDIR)/../../build/tmp/runner-linux-*/stencils.asm" --output $(BUILDDIR)/stencils.md
|
||||||
python $(SOURCEDIR)/example_asm.py --input $(SOURCEDIR)/../../tools/make_example.py --asm-pattern "$(SOURCEDIR)/../../build/tmp/runner-linux-*/example.asm" --output $(BUILDDIR)/compiled_example.md
|
python $(SOURCEDIR)/example_asm.py --input $(SOURCEDIR)/../../tools/make_example.py --asm-pattern "$(SOURCEDIR)/../../build/tmp/runner-linux-*/example.asm" --output $(BUILDDIR)/compiled_example.md
|
||||||
|
|
||||||
# Build documentation (generate API and extract sections first)
|
# Build documentation (generate API and extract sections first)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue