ci: build docs using meson

To avoid having to inflate the image here even further, let's just add
what we need to the the normal x86 Alpine build image, and use that.

Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11494>
This commit is contained in:
Erik Faye-Lund
2024-06-20 12:46:50 +02:00
committed by Marge Bot
parent 1e7636fbb1
commit fdd204538b
4 changed files with 22 additions and 16 deletions

View File

@@ -29,11 +29,13 @@ DEPS=(
git git
gettext gettext
glslang glslang
graphviz
linux-headers linux-headers
llvm16-static llvm16-static
llvm16-dev llvm16-dev
meson meson
mold mold
musl-dev
expat-dev expat-dev
elfutils-dev elfutils-dev
libdrm-dev libdrm-dev
@@ -42,9 +44,11 @@ DEPS=(
libpciaccess-dev libpciaccess-dev
zlib-dev zlib-dev
python3-dev python3-dev
py3-clang
py3-cparser py3-cparser
py3-mako py3-mako
py3-packaging py3-packaging
py3-pip
py3-ply py3-ply
vulkan-headers vulkan-headers
spirv-tools-dev spirv-tools-dev
@@ -55,6 +59,8 @@ DEPS=(
apk --no-cache add "${DEPS[@]}" "${EPHEMERAL[@]}" apk --no-cache add "${DEPS[@]}" "${EPHEMERAL[@]}"
pip3 install --break-system-packages sphinx===5.1.1 hawkmoth===0.16.0
. .gitlab-ci/container/build-llvm-spirv.sh . .gitlab-ci/container/build-llvm-spirv.sh
. .gitlab-ci/container/build-libclc.sh . .gitlab-ci/container/build-libclc.sh

View File

@@ -346,6 +346,12 @@ alpine/x86_64_build:
- .alpine/x86_64_build-base - .alpine/x86_64_build-base
variables: variables:
MESA_IMAGE_TAG: &alpine-x86_64_build ${ALPINE_X86_64_BUILD_TAG} MESA_IMAGE_TAG: &alpine-x86_64_build ${ALPINE_X86_64_BUILD_TAG}
rules:
- !reference [pages, rules]
- !reference [test-docs, rules]
- !reference [test-docs-mr, rules]
- !reference [linkcheck-docs, rules]
- !reference [.container, rules]
.use-alpine/x86_64_build: .use-alpine/x86_64_build:
extends: extends:

View File

@@ -32,7 +32,7 @@ variables:
DEBIAN_TEST_VK_TAG: "20240613-piglit-fd" DEBIAN_TEST_VK_TAG: "20240613-piglit-fd"
KERNEL_ROOTFS_TAG: "20240613-piglit-fd" KERNEL_ROOTFS_TAG: "20240613-piglit-fd"
ALPINE_X86_64_BUILD_TAG: "20240612-mold" ALPINE_X86_64_BUILD_TAG: "20240620-sphinx"
ALPINE_X86_64_LAVA_SSH_TAG: "20240401-wlproto" ALPINE_X86_64_LAVA_SSH_TAG: "20240401-wlproto"
FEDORA_X86_64_BUILD_TAG: "20240612-mold" FEDORA_X86_64_BUILD_TAG: "20240612-mold"
KERNEL_TAG: "v6.6.21-mesa-f8ea" KERNEL_TAG: "v6.6.21-mesa-f8ea"

View File

@@ -1,21 +1,21 @@
.docs-base: .docs-base:
variables:
BUILDER: html
extends: extends:
- .fdo.ci-fairy - .build-linux
- .use-alpine/x86_64_build
artifacts: artifacts:
expose_as: 'Documentation preview' expose_as: 'Documentation preview'
paths: paths:
- public/ - public/
script: script:
- apk --no-cache add coreutils graphviz py3-clang clang-dev musl-dev linux-headers - meson setup _build -D prefix=$(pwd) --auto-features=disabled
- pip3 install sphinx===5.1.1 mako===1.2.3 hawkmoth===0.16.0 -D vulkan-drivers="" -D gallium-drivers="" -D glx=disabled
- sphinx-build -W -b $BUILDER docs public -D video-codecs="" -D html-docs=enabled -D html-docs-path=public
- meson compile -C _build
- meson install -C _build
pages: pages:
extends: .docs-base extends: .docs-base
stage: deploy stage: deploy
needs: []
rules: rules:
- !reference [.no_scheduled_pipelines-rules, rules] - !reference [.no_scheduled_pipelines-rules, rules]
- if: '$CI_PROJECT_NAMESPACE == "mesa" && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH && $CI_COMMIT_BRANCH' - if: '$CI_PROJECT_NAMESPACE == "mesa" && $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH && $CI_COMMIT_BRANCH'
@@ -35,7 +35,6 @@ test-docs:
# Cancel job if a newer commit is pushed to the same branch # Cancel job if a newer commit is pushed to the same branch
interruptible: true interruptible: true
stage: deploy stage: deploy
needs: []
rules: rules:
- !reference [.no_scheduled_pipelines-rules, rules] - !reference [.no_scheduled_pipelines-rules, rules]
- if: '$CI_COMMIT_BRANCH && $CI_PROJECT_NAMESPACE != "mesa"' - if: '$CI_COMMIT_BRANCH && $CI_PROJECT_NAMESPACE != "mesa"'
@@ -46,9 +45,6 @@ test-docs:
test-docs-mr: test-docs-mr:
extends: extends:
- test-docs - test-docs
needs:
- job: sanity
optional: true
rules: rules:
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"' - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
changes: *docs-or-ci changes: *docs-or-ci
@@ -60,10 +56,8 @@ linkcheck-docs:
# Cancel job if a newer commit is pushed to the same branch # Cancel job if a newer commit is pushed to the same branch
interruptible: true interruptible: true
stage: deploy stage: deploy
needs: []
rules: rules:
- !reference [.scheduled_pipeline-rules, rules] - !reference [.scheduled_pipeline-rules, rules]
allow_failure: true allow_failure: true
variables: script:
BUILDER: linkcheck - sphinx-build -W -b linkcheck docs public