Skip to content

Bump Wandalen/wretry.action from 1.0.36 to 3.5.0 #105

Bump Wandalen/wretry.action from 1.0.36 to 3.5.0

Bump Wandalen/wretry.action from 1.0.36 to 3.5.0 #105

Workflow file for this run

name: build docs
on:
push:
branches:
- 'master'
- 'release/*'
- 'staging'
- 'trying'
tags:
- 'v*'
pull_request:
jobs:
builddocs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
exclude:
- os: windows-latest
python-version: 3.9
- os: windows-latest
python-version: 3.10
- os: windows-latest
python-version: 3.11
- os: ubuntu-latest
python-version: 3.8
env:
DISPLAY: ':99.0'
OS: ${{ matrix.os }}
UPLOAD_TO_GHPAGES: ${{ matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10' && github.event_name == 'push' && github.ref == 'refs/heads/master' }}
# we expect no warnings from Sphinx in 3.10
# The std-lib docstring of IntEnum in 3.11.0 is not valid
# causing errors like in the docstring of from_bytes (from Int)
# WARNING: Inline interpreted text or phrase reference start-string without end-string.
SPHINX_WARNINGS_AS_ERROR: ${{ matrix.python-version == '3.10' }}
SPHINX_OPTS: "-v"
steps:
- uses: actions/[email protected]
with:
fetch-depth: '0'
# if we upload to ghpages we need the full
# history to generate correct version info
if: ${{ fromJSON(env.UPLOAD_TO_GHPAGES) }}
- uses: actions/[email protected]
if: ${{ !fromJSON(env.UPLOAD_TO_GHPAGES) }}
- name: set-sphinx-opts
run: |
echo "SPHINX_OPTS=-W -v" >> $GITHUB_ENV
if: ${{ fromJSON(env.SPHINX_WARNINGS_AS_ERROR) }}
- name: setup ubuntu-latest xvfb
uses: ./.github/actions/setup-ubuntu-latest-xvfb
if: runner.os == 'Linux'
- name: install pandoc linux
run: |
sudo apt update
sudo apt install pandoc
if: runner.os == 'Linux'
- name: Install pandoc on windows
uses: Wandalen/[email protected]
with:
action: crazy-max/[email protected]
with: |
args: install pandoc
attempt_limit: 5
attempt_delay: 1000
if: runner.os == 'Windows'
# install libhdf5-dev untill we have wheels for python 3.11
- name: install libhdf5
run: |
sudo apt update
sudo apt install libhdf5-dev
shell: bash
if: runner.os == 'Linux'
- name: Set up Python ${{ matrix.python-version }}
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: |
pyproject.toml
requirements.txt
- name: upgrade pip setuptools wheel
run: python -m pip install --upgrade pip setuptools wheel
shell: bash
- name: install qcodes
run: pip install -c requirements.txt .[docs]
- name: Build docs on linux
run: |
cd docs
export SPHINXOPTS="${{ env.SPHINX_OPTS }}"
make html
if: runner.os == 'Linux'
- name: Build docs on windows
run: |
cd docs
$env:SPHINXOPTS = "${{ env.SPHINX_OPTS }}"
./make.bat html
if: runner.os == 'Windows'
- name: Upload build docs
uses: actions/[email protected]
with:
name: docs_${{ matrix.python-version }}_${{ matrix.os }}
path: ${{ github.workspace }}/docs/_build/html
- name: Deploy to gh pages
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: ${{ github.workspace }}/docs/_build/html
clean: true
single-commit: true
git-config-email: "bot"
git-config-name: "Documentation Bot"
if: ${{ fromJSON(env.UPLOAD_TO_GHPAGES) }}