diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d0a2c80a9a..7897a479d0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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" diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index aec76ee0f6..db52140024 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -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