Skip to content

Commit

Permalink
ci: Split docs building from linting
Browse files Browse the repository at this point in the history
This lays the groundwork for automatically uploading documentation when
a release is cut.

Signed-off-by: Pablo Galindo <[email protected]>
  • Loading branch information
pablogsal authored and godlygeek committed Aug 1, 2023
1 parent d853623 commit 2748f85
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 20 deletions.
24 changes: 4 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,37 +101,21 @@ jobs:
run: |
make dev-install pycoverage
lint_and_docs:
name: "Lint and Docs"
lint:
name: "Lint"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 16
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Set up dependencies
run: |
sudo apt-get update
sudo apt-get install -qy clang-format npm libunwind-dev liblz4-dev pkg-config
- name: Install Python dependencies
run: |
python3 -m pip install -r requirements-extra.txt
- name: Install Package
- name: Install linters
run: |
python3 -m pip install -e .
python3 -m pip install mypy pre-commit
- name: Lint sources
run: |
make lint
python3 -m pre_commit run --all-files --hook-stage pre-push
- name: Build docs
run: |
towncrier build --version 99.99 --name memray --keep
make docs
valgrind:
name: "Valgrind & Helgrind"
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,44 @@ jobs:
name: dist
path: ./wheelhouse/*.whl

build_docs:
name: Build Docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Set up dependencies
run: |
sudo apt-get update
sudo apt-get install -qy libunwind-dev liblz4-dev pkg-config
- name: Install Python dependencies
run: |
python3 -m pip install -r requirements-extra.txt
- name: Install Package
run: |
python3 -m pip install -e .
- name: Build docs
run: |
towncrier build --version 99.99 --name memray --keep
make docs
- name: Create docs tarball
run: |
python3 -m pip install -e .
tar \
--dereference --hard-dereference \
--directory docs/_build/html \
--exclude=.buildinfo \
-cvf "$RUNNER_TEMP/artifact.tar" \
.
- name: Stash docs tarball
uses: actions/upload-artifact@v3
with:
name: github-pages
path: ${{ runner.temp }}/artifact.tar

upload_pypi:
needs: [build_wheels, build_wheels_macos, build_sdist]
runs-on: ubuntu-latest
Expand Down

0 comments on commit 2748f85

Please sign in to comment.