| 1 |
version: 2.1 |
| 2 |
apt-run: &apt-install |
| 3 |
name: Install apt packages |
| 4 |
command: | |
| 5 |
sudo apt update |
| 6 |
sudo apt install -y graphviz build-essential libopenjp2-7 python3-dev pandoc libcairo2-dev |
| 7 |
tox: &tox |
| 8 |
name: Setup tox |
| 9 |
command: | |
| 10 |
python -m pip install --upgrade tox |
| 11 |
jobs: |
| 12 |
website: |
| 13 |
resource_class: large |
| 14 |
docker: |
| 15 |
- image: cimg/python:3.13 |
| 16 |
steps: |
| 17 |
- checkout |
| 18 |
- run: *apt-install |
| 19 |
- run: *tox |
| 20 |
- run: python -m tox -e website -- -j 8 |
| 21 |
- store_artifacts: |
| 22 |
path: build_preview/_build/html |
| 23 |
theme: |
| 24 |
docker: |
| 25 |
- image: cimg/python:3.13 |
| 26 |
steps: |
| 27 |
- checkout |
| 28 |
- run: *apt-install |
| 29 |
- run: *tox |
| 30 |
- run: python -m tox -e build_docs |
| 31 |
- store_artifacts: |
| 32 |
path: build_preview/_build/html |
| 33 |
theme-bootstrap: |
| 34 |
docker: |
| 35 |
- image: cimg/python:3.13 |
| 36 |
steps: |
| 37 |
- checkout |
| 38 |
- run: *apt-install |
| 39 |
- run: *tox |
| 40 |
- run: python -m tox -e build_docs-bootstrap |
| 41 |
- store_artifacts: |
| 42 |
path: build_preview/_build/html |
| 43 |
theme-devdeps: |
| 44 |
docker: |
| 45 |
- image: cimg/python:3.13 |
| 46 |
steps: |
| 47 |
- checkout |
| 48 |
- run: *apt-install |
| 49 |
- run: *tox |
| 50 |
- run: python -m tox -e build_docs-devdeps |
| 51 |
- store_artifacts: |
| 52 |
path: build_preview/_build/html |
| 53 |
astropy: |
| 54 |
resource_class: large |
| 55 |
docker: |
| 56 |
- image: cimg/python:3.13 |
| 57 |
steps: |
| 58 |
- checkout |
| 59 |
- run: *apt-install |
| 60 |
- run: *tox |
| 61 |
# the large resource_class has 4 CPUs but auto detection does not work |
| 62 |
- run: python -m tox -e astropy_docs -- -j 8 |
| 63 |
# Remove some parts of the build to speed up upload |
| 64 |
- run: rm -r build_preview/_build/html/.doctrees |
| 65 |
- run: rm -r build_preview/_build/html/_downloads |
| 66 |
- run: rm -r build_preview/_build/html/_sources |
| 67 |
- store_artifacts: |
| 68 |
path: build_preview/_build/html |
| 69 |
css_linting: |
| 70 |
resource_class: small |
| 71 |
docker: |
| 72 |
- image: cimg/node:current |
| 73 |
steps: |
| 74 |
- checkout |
| 75 |
- run: sudo npm install -g stylelint |
| 76 |
- run: sudo npm install stylelint-config-recommended |
| 77 |
- run: sudo stylelint "astropy_sphinx_theme/astropy-unified/**/*.{css,scss,sass}" |
| 78 |
workflows: |
| 79 |
version: 2 |
| 80 |
tests: |
| 81 |
jobs: |
| 82 |
- website |
| 83 |
- theme |
| 84 |
- theme-bootstrap |
| 85 |
- theme-devdeps |
| 86 |
- astropy |
| 87 |
- css_linting |