forked from axiak/pyre2
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #50 from sarnold/sphinx-apidocs
add basic sphinx docs build using apidoc
- Loading branch information
Showing
16 changed files
with
946 additions
and
53 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
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
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 |
---|---|---|
|
@@ -12,7 +12,23 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-22.04, macos-latest, windows-latest] | ||
include: | ||
- os: "ubuntu-22.04" | ||
arch: "x86_64" | ||
- os: "ubuntu-22.04" | ||
arch: "aarch64" | ||
- os: "macos-13" | ||
arch: "x86_64" | ||
macosx_deployment_target: "13.0" | ||
- os: "macos-14" | ||
arch: "arm64" | ||
macosx_deployment_target: "14.0" | ||
- os: "windows-latest" | ||
arch: "auto64" | ||
triplet: "x64-windows" | ||
- os: "windows-latest" | ||
arch: "auto32" | ||
triplet: "x86-windows" | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
@@ -22,43 +38,41 @@ jobs: | |
- uses: actions/setup-python@v5 | ||
name: Install Python | ||
with: | ||
python-version: '3.8' | ||
python-version: '3.9' | ||
|
||
- name: Prepare compiler environment for Windows | ||
if: runner.os == 'Windows' | ||
uses: ilammy/msvc-dev-cmd@v1 | ||
- name: Set up QEMU | ||
if: runner.os == 'Linux' | ||
uses: docker/setup-qemu-action@v3 | ||
with: | ||
arch: amd64 | ||
|
||
- name: Install cibuildwheel | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install -r requirements-cibw.txt | ||
platforms: all | ||
|
||
- name: Build wheels | ||
uses: pypa/[email protected] | ||
env: | ||
CIBW_MANYLINUX_X86_64_IMAGE: quay.io/pypa/manylinux2010_x86_64:latest | ||
CIBW_MANYLINUX_I686_IMAGE: quay.io/pypa/manylinux2010_i686:latest | ||
CIBW_BUILD: cp38-* cp39-* cp310-* cp311-* | ||
CIBW_SKIP: "*-win32" | ||
# configure cibuildwheel to build native archs ('auto'), and some | ||
# emulated ones, plus cross-compile on macos | ||
CIBW_ARCHS: ${{ matrix.arch }} | ||
CIBW_TEST_SKIP: "*_arm64 *universal2:arm64 *linux_i686" | ||
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 | ||
CIBW_MANYLINUX_I686_IMAGE: manylinux2010 | ||
CIBW_BUILD: cp38-* cp39-* cp310-* cp311-* cp312-* | ||
CIBW_SKIP: "*musllinux* *i686" | ||
CIBW_BEFORE_ALL_LINUX: > | ||
yum -y -q --enablerepo=extras install epel-release | ||
&& yum install -y re2-devel ninja-build | ||
CIBW_REPAIR_WHEEL_COMMAND_LINUX: "auditwheel show {wheel} && auditwheel repair -w {dest_dir} {wheel}" | ||
yum -y update && yum -y install epel-release && yum install -y re2-devel ninja-build | ||
CIBW_BEFORE_ALL_MACOS: > | ||
brew install re2 pybind11 ninja | ||
CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=10.09 | ||
CIBW_REPAIR_WHEEL_COMMAND_MACOS: "pip uninstall -y delocate && pip install git+https://github.com/Chia-Network/delocate.git && delocate-listdeps {wheel} && delocate-wheel -w {dest_dir} -v {wheel}" | ||
brew install re2 pybind11 | ||
# macos target should be at least 10.13 to get full c++17 | ||
CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=${{ matrix.macosx_deployment_target }} | ||
CIBW_BEFORE_ALL_WINDOWS: > | ||
vcpkg install re2:x64-windows | ||
vcpkg install pkgconf:${{ matrix.triplet }} re2:${{ matrix.triplet }} | ||
&& vcpkg integrate install | ||
CIBW_ENVIRONMENT_WINDOWS: 'CMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake' | ||
CIBW_TEST_COMMAND: python -c "import re2" | ||
run: | | ||
python -m cibuildwheel --output-dir wheelhouse | ||
CIBW_TEST_REQUIRES: "" | ||
CIBW_TEST_COMMAND: "" | ||
|
||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: wheels-${{ matrix.os }}-${{ matrix.arch }} | ||
path: ./wheelhouse/*.whl | ||
|
||
build_sdist: | ||
|
@@ -70,12 +84,12 @@ jobs: | |
- uses: actions/setup-python@v5 | ||
name: Install Python | ||
with: | ||
python-version: '3.8' | ||
python-version: '3.9' | ||
|
||
- name: Build sdist | ||
run: | | ||
pip install pep517 | ||
python -m pep517.build -s . | ||
pip install build | ||
python -m build -s . | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
|
@@ -99,10 +113,13 @@ jobs: | |
- uses: actions/setup-python@v5 | ||
name: Install Python | ||
with: | ||
python-version: 3.7 | ||
python-version: 3.9 | ||
|
||
# download all artifacts to project dir | ||
# download all artifacts to artifacts dir | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
merge-multiple: true | ||
path: artifacts | ||
|
||
- name: Generate changes file | ||
uses: sarnold/gitchangelog-action@master | ||
|
@@ -121,7 +138,7 @@ jobs: | |
draft: false | ||
prerelease: false | ||
# uncomment below to upload wheels to github releases | ||
files: dist/cibw-wheels/pyre2*.whl | ||
files: artifacts/pyre2* | ||
|
||
- uses: pypa/gh-action-pypi-publish@master | ||
if: ${{ github.actor == github.repository_owner && github.ref == 'refs/heads/master' }} | ||
|
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 |
---|---|---|
@@ -0,0 +1,59 @@ | ||
name: Docs | ||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install Ubuntu build deps | ||
run: | | ||
sudo apt-get -qq update | ||
sudo apt-get install -y libre2-dev | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.9' | ||
|
||
- name: Add python requirements | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install tox | ||
- name: Install Ubuntu build deps | ||
run: | | ||
sudo apt-get -qq update | ||
sudo apt-get install -y libre2-dev | ||
- name: Build docs | ||
run: | | ||
tox -e ldocs,docs | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: ApiDocsHTML | ||
path: "docs/_build/html/" | ||
|
||
- name: set nojekyll for github | ||
run: | | ||
touch docs/_build/html/.nojekyll | ||
- name: Deploy docs to gh-pages | ||
if: ${{ github.event_name == 'push' }} | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
branch: gh-pages | ||
folder: docs/_build/html/ | ||
single-commit: true |
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
Oops, something went wrong.