Skip to content

Check and document build requirements for Sphinx venv #232

Check and document build requirements for Sphinx venv

Check and document build requirements for Sphinx venv #232

# The purpose of this workflow file is to confirm that the Sphinx
# virtual environment can be built from source, consequently documenting
# the packages required in the build environment to do that.
#
# This is needed because some projects embeds the documentation into built
# artifacts which involves rendering the documentation on the target
# architecture.
#
# Depending on the architecture, pip may or may not have already built wheels
# available, and as such we need to make sure building wheels from source can
# succeed.
name: Check and document build requirements for Sphinx venv
on:
schedule:
- cron: "0 2 * * 1,5" # Runs at 02:00 AM on every Monday and Friday.
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: build
runs-on:
- linux
- self-hosted
- x64
- large
- ${{ (github.repository_owner == 'juju' && 'aws') || (github.repository_owner == 'canonical' && 'noble') }}
steps:
- name: Checkout code
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: "Squid"
if: github.repository_owner != 'juju'
run: ./.github/squid.sh
- name: Install dependencies
run: |
set -ex
sudo apt -y update
sudo apt -y install \
cmake \
libfreetype6-dev \
libharfbuzz-dev \
libjpeg8-dev \
liblcms2-dev \
libopenjp2-7-dev \
libpython3-dev \
libtiff5-dev \
libwebp-dev \
libxcb1-dev \
libxml2-dev \
libxslt1-dev \
make \
ninja-build \
python3-venv \
zlib1g-dev
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \
sh -s -- -y --default-toolchain stable
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
- name: Build Sphinx venv
run: |
set -ex
cd docs
make -f Makefile \
install \
PIPOPTS="--no-binary :all: --only-binary canonical-sphinx" \
|| ( cat .venv/pip_install.log && exit 1 )
- name: Notify on failure
if: failure()
uses: ./.github/actions/notify-mm
with:
mm_url: ${{ secrets.MM_URL }}
mm_token: ${{ secrets.MM_TOKEN }}
channel: ${{ secrets.MM_CHANNEL }}
message: |
🤖 **Beep boop! Build failure detected!**
📍 **Branch:** `${{ github.ref_name }}`
🔗 **Workflow run:** [Click here to investigate](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})
⚠️ The Sphinx venv build has failed. Please review the logs and fix the issue.