Skip to content

Add GitHub Actions CI #2

Add GitHub Actions CI

Add GitHub Actions CI #2

Workflow file for this run

name: Handbook
# Manual-dispatch only. Read the Docs builds the handbook for every push and pull
# request; this exists to exercise what it does not: mzn2doc against a freshly
# built compiler, and the full LaTeX/PDF toolchain (EN + ZH).
#
# Separate from ci.yml because dispatching that would build all seven platforms
# and the test matrix to reach one job; here only linux is built.
on:
# TODO: temporary, so Actions registers the workflow and it becomes
# dispatchable. Remove after it has run once.
push:
branches: [feat/github_actions]
workflow_dispatch: {}
permissions:
contents: read
env:
GH_TOKEN: ${{ github.token }}
jobs:
build:
name: build (linux)
uses: ./.github/workflows/_build.yml
with:
platform: linux
triple: x86_64-linux-gnu
runner: ubuntu-24.04
container: "quay.io/pypa/manylinux_2_28_x86_64"
generator: "Unix Makefiles"
documentation:
name: handbook
needs: build
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
- uses: actions/download-artifact@v8
with:
name: minizinc-linux
- name: Unpack the compiler
shell: bash
run: mkdir -p minizinc && tar -xzf minizinc-compiler-only-*.tar.gz -C minizinc
- uses: actions/setup-python@v7
with:
python-version: "3.11"
- name: Install Sphinx + LaTeX toolchain
run: |
pip install sphinx -r docs/requirements.txt
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
latexmk texlive-latex-recommended texlive-latex-extra \
texlive-fonts-recommended texlive-xetex texlive-lang-chinese \
texlive-binaries xindy \
fonts-noto-cjk fonts-noto-core fonts-lato fonts-inconsolata
# Sphinx's LaTeX index rule is *named* "makeindex" but actually execs
# xindy; without it latexmk aborts and reports the failure as hundreds
# of unresolved references, which hides the real cause.
for t in makeindex xindy latexmk; do
command -v "$t" >/dev/null || { echo "missing required tool: $t"; exit 1; }
done
- name: Fetch pinned vendor deps (gecode + chuffed)
shell: bash
run: bash scripts/fetch_vendor.sh x86_64-linux-gnu gecode chuffed
- name: Build handbook (EN + ZH, HTML + PDF)
run: ROOT="$PWD" bash scripts/build_docs.sh
- uses: actions/upload-artifact@v7
with:
name: documentation
path: docs-deploy/