You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
1.8 KiB

name: build
on:
push:
pull_request:
types: [ opened, reopened, synchronize ]
jobs:
dists-and-docs:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ '3.8', '3.x' ]
language: [ 'en', 'ja' ]
name: dists & docs (${{ matrix.python-version }}/${{ matrix.language }})
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 0
- name: Set up CPython ${{ matrix.python-version }}
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -U -r requirements.txt
- name: Build distributions
run: |
python ./setup.py sdist bdist_wheel
# - name: Upload artifacts
# uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
# with:
# name: distributions-${{ matrix.python-version }}-${{ matrix.language }}
# path: dist/*
- name: Install package
run: |
pip install -e .[docs,speed,voice]
- name: Build docs
shell: bash
run: |
cd docs
sphinx-build -b html -D language=${DOCS_LANGUAGE} -j auto -a -n -T -W --keep-going . _build/html
env:
DOCS_LANGUAGE: ${{ matrix.language }}
# - name: Upload docs
# uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
# if: always()
# with:
# name: docs-${{ matrix.python-version }}-${{ matrix.language }}
# path: docs/_build/html/*