From fdd204538b93e17cecd32786603e0e2452e459c4 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Thu, 20 Jun 2024 12:46:50 +0200 Subject: [PATCH] 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 Reviewed-by: Eric Engestrom Part-of: --- .gitlab-ci/container/alpine/x86_64_build.sh | 6 ++++++ .gitlab-ci/container/gitlab-ci.yml | 6 ++++++ .gitlab-ci/image-tags.yml | 2 +- docs/gitlab-ci.yml | 24 ++++++++------------- 4 files changed, 22 insertions(+), 16 deletions(-) diff --git a/.gitlab-ci/container/alpine/x86_64_build.sh b/.gitlab-ci/container/alpine/x86_64_build.sh index ea3c5aeea10..d72cc87aa1b 100644 --- a/.gitlab-ci/container/alpine/x86_64_build.sh +++ b/.gitlab-ci/container/alpine/x86_64_build.sh @@ -29,11 +29,13 @@ DEPS=( git gettext glslang + graphviz linux-headers llvm16-static llvm16-dev meson mold + musl-dev expat-dev elfutils-dev libdrm-dev @@ -42,9 +44,11 @@ DEPS=( libpciaccess-dev zlib-dev python3-dev + py3-clang py3-cparser py3-mako py3-packaging + py3-pip py3-ply vulkan-headers spirv-tools-dev @@ -55,6 +59,8 @@ DEPS=( 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-libclc.sh diff --git a/.gitlab-ci/container/gitlab-ci.yml b/.gitlab-ci/container/gitlab-ci.yml index 5454205d14b..4d5e580cf84 100644 --- a/.gitlab-ci/container/gitlab-ci.yml +++ b/.gitlab-ci/container/gitlab-ci.yml @@ -346,6 +346,12 @@ alpine/x86_64_build: - .alpine/x86_64_build-base variables: 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: extends: diff --git a/.gitlab-ci/image-tags.yml b/.gitlab-ci/image-tags.yml index b9a6d085ed3..60e4902cb22 100644 --- a/.gitlab-ci/image-tags.yml +++ b/.gitlab-ci/image-tags.yml @@ -32,7 +32,7 @@ variables: DEBIAN_TEST_VK_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" FEDORA_X86_64_BUILD_TAG: "20240612-mold" KERNEL_TAG: "v6.6.21-mesa-f8ea" diff --git a/docs/gitlab-ci.yml b/docs/gitlab-ci.yml index cba1d51ff3f..269a47773f5 100644 --- a/docs/gitlab-ci.yml +++ b/docs/gitlab-ci.yml @@ -1,21 +1,21 @@ .docs-base: - variables: - BUILDER: html extends: - - .fdo.ci-fairy + - .build-linux + - .use-alpine/x86_64_build artifacts: expose_as: 'Documentation preview' paths: - public/ script: - - apk --no-cache add coreutils graphviz py3-clang clang-dev musl-dev linux-headers - - pip3 install sphinx===5.1.1 mako===1.2.3 hawkmoth===0.16.0 - - sphinx-build -W -b $BUILDER docs public + - meson setup _build -D prefix=$(pwd) --auto-features=disabled + -D vulkan-drivers="" -D gallium-drivers="" -D glx=disabled + -D video-codecs="" -D html-docs=enabled -D html-docs-path=public + - meson compile -C _build + - meson install -C _build pages: extends: .docs-base stage: deploy - needs: [] rules: - !reference [.no_scheduled_pipelines-rules, rules] - 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 interruptible: true stage: deploy - needs: [] rules: - !reference [.no_scheduled_pipelines-rules, rules] - if: '$CI_COMMIT_BRANCH && $CI_PROJECT_NAMESPACE != "mesa"' @@ -46,9 +45,6 @@ test-docs: test-docs-mr: extends: - test-docs - needs: - - job: sanity - optional: true rules: - if: '$CI_PIPELINE_SOURCE == "merge_request_event"' changes: *docs-or-ci @@ -60,10 +56,8 @@ linkcheck-docs: # Cancel job if a newer commit is pushed to the same branch interruptible: true stage: deploy - needs: [] rules: - !reference [.scheduled_pipeline-rules, rules] allow_failure: true - variables: - BUILDER: linkcheck - + script: + - sphinx-build -W -b linkcheck docs public