ci: Build and tar the platform specific documentation

Enable the msys2-mingw32 CI job for merges, just like the fedora-x86_64
job is. The pair of them can then build the platform specific GIR and
documentation files.

The `download-reference.sh` script in the `docs-gtk-org` branch of GTK
can then download the docs as an artifact from the latest GLib build of
`main`, and publish them on docs.gtk.org, as is currently done for the
platform agnostic documentation.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Helps: #3037
This commit is contained in:
Philip Withnall 2024-02-06 16:34:36 +00:00
parent 434d3ff524
commit c428d6e673
2 changed files with 19 additions and 2 deletions

View File

@ -198,9 +198,11 @@ fedora-x86_64:
# can then pull it from there — see https://gitlab.gnome.org/GNOME/gtk/-/blob/docs-gtk-org/README.md # can then pull it from there — see https://gitlab.gnome.org/GNOME/gtk/-/blob/docs-gtk-org/README.md
- mkdir -p _reference/ - mkdir -p _reference/
- mv _build/docs/reference/glib/glib/ _reference/glib/ - mv _build/docs/reference/glib/glib/ _reference/glib/
- mv _build/docs/reference/glib/glib-unix/ _reference/glib-unix/
- mv _build/docs/reference/gmodule/gmodule/ _reference/gmodule/ - mv _build/docs/reference/gmodule/gmodule/ _reference/gmodule/
- mv _build/docs/reference/gobject/gobject/ _reference/gobject/ - mv _build/docs/reference/gobject/gobject/ _reference/gobject/
- mv _build/docs/reference/gio/gio/ _reference/gio/ - mv _build/docs/reference/gio/gio/ _reference/gio/
- mv _build/docs/reference/gio/gio-unix/ _reference/gio-unix/
- mv _build/docs/reference/girepository/girepository/ _reference/girepository/ - mv _build/docs/reference/girepository/girepository/ _reference/girepository/
artifacts: artifacts:
reports: reports:
@ -476,7 +478,7 @@ cross-mingw64:
- _build/gobject/libgobject-2.0-0.dll - _build/gobject/libgobject-2.0-0.dll
msys2-mingw32: msys2-mingw32:
extends: .only-default extends: .only-default-and-merges
stage: build stage: build
tags: tags:
- win32-ps - win32-ps
@ -501,6 +503,7 @@ msys2-mingw32:
paths: paths:
- _build/meson-logs - _build/meson-logs
- _coverage/ - _coverage/
- _reference/
msys2-clang64: msys2-clang64:
extends: .only-schedules-or-manual extends: .only-schedules-or-manual

View File

@ -11,10 +11,13 @@ pacman --noconfirm -S --needed \
lcov \ lcov \
"${MINGW_PACKAGE_PREFIX}"-ccache \ "${MINGW_PACKAGE_PREFIX}"-ccache \
"${MINGW_PACKAGE_PREFIX}"-gettext \ "${MINGW_PACKAGE_PREFIX}"-gettext \
"${MINGW_PACKAGE_PREFIX}"-gi-docgen \
"${MINGW_PACKAGE_PREFIX}"-gobject-introspection \
"${MINGW_PACKAGE_PREFIX}"-libffi \ "${MINGW_PACKAGE_PREFIX}"-libffi \
"${MINGW_PACKAGE_PREFIX}"-meson \ "${MINGW_PACKAGE_PREFIX}"-meson \
"${MINGW_PACKAGE_PREFIX}"-pcre2 \ "${MINGW_PACKAGE_PREFIX}"-pcre2 \
"${MINGW_PACKAGE_PREFIX}"-python3 \ "${MINGW_PACKAGE_PREFIX}"-python3 \
"${MINGW_PACKAGE_PREFIX}"-python-docutils \
"${MINGW_PACKAGE_PREFIX}"-python-pip \ "${MINGW_PACKAGE_PREFIX}"-python-pip \
"${MINGW_PACKAGE_PREFIX}"-toolchain \ "${MINGW_PACKAGE_PREFIX}"-toolchain \
"${MINGW_PACKAGE_PREFIX}"-zlib \ "${MINGW_PACKAGE_PREFIX}"-zlib \
@ -33,7 +36,12 @@ DIR="$(pwd)"
export PATH CFLAGS export PATH CFLAGS
# shellcheck disable=SC2086 # shellcheck disable=SC2086
meson setup ${MESON_COMMON_OPTIONS} --werror _build meson setup ${MESON_COMMON_OPTIONS} \
--werror \
-Ddocumentation=true \
-Dintrospection=enabled \
-Dman-pages=enabled \
_build
meson compile -C _build meson compile -C _build
@ -59,3 +67,9 @@ if [[ "$CFLAGS" == *"-coverage"* ]]; then
--capture \ --capture \
--output-file "${DIR}/_coverage/${CI_JOB_NAME}.lcov" --output-file "${DIR}/_coverage/${CI_JOB_NAME}.lcov"
fi fi
# Copy the built documentation to an artifact directory. The build for docs.gtk.org
# can then pull it from there — see https://gitlab.gnome.org/GNOME/gtk/-/blob/docs-gtk-org/README.md
mkdir -p _reference/
mv _build/docs/reference/glib/glib-win32/ _reference/glib-win32/
mv _build/docs/reference/gio/gio-win32/ _reference/gio-win32/