diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9e39d6f..8002fc6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,7 +54,7 @@ jobs: - name: Install Python dependencies run: | - python -m pip install -e . + python -m pip install . python -m pip install pytest - name: Vendor pelfy @@ -89,7 +89,7 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install Python dependencies - run: python -m pip install -e .[dev] + run: python -m pip install .[dev] - name: Compile coparun run: | @@ -234,7 +234,7 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install Python dependencies - run: python -m pip install -e .[dev] + run: python -m pip install .[dev] - name: Set up MSVC environment uses: microsoft/setup-msbuild@v2 @@ -310,26 +310,47 @@ jobs: fi build-docs: - #if: github.event_name == 'push' needs: [build_stencils, build-ubuntu, build-windows, build-arm64, build-armv6, build-armv7] runs-on: ubuntu-latest steps: - 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: path: build/tmp - - name: Set up Python - uses: actions/setup-python@v3 + - uses: actions/setup-python@v3 with: python-version: "3.x" - 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 run: | + mkdir -p build/stencils + python stencils/generate_stencils.py build/stencils/stencils.c + cd docs 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 \ No newline at end of file diff --git a/docs/Makefile b/docs/Makefile index f748edf..473fdf1 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -15,9 +15,10 @@ help: .PHONY: help prepare-docs html prepare-docs: + mkdir -p $(BUILDDIR) python $(SOURCEDIR)/generate_class_list.py --api-dir $(SOURCEDIR)/api 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 # Build documentation (generate API and extract sections first)