From c428d6e67318e7b02c13111db260ed98622e982a Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Tue, 6 Feb 2024 16:34:36 +0000 Subject: [PATCH] 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 Helps: #3037 --- .gitlab-ci.yml | 5 ++++- .gitlab-ci/test-msys2.sh | 16 +++++++++++++++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 59384ccec..d1d59c62f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 - mkdir -p _reference/ - 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/gobject/gobject/ _reference/gobject/ - 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/ artifacts: reports: @@ -476,7 +478,7 @@ cross-mingw64: - _build/gobject/libgobject-2.0-0.dll msys2-mingw32: - extends: .only-default + extends: .only-default-and-merges stage: build tags: - win32-ps @@ -501,6 +503,7 @@ msys2-mingw32: paths: - _build/meson-logs - _coverage/ + - _reference/ msys2-clang64: extends: .only-schedules-or-manual diff --git a/.gitlab-ci/test-msys2.sh b/.gitlab-ci/test-msys2.sh index 6ee6f124b..b5a6d9adb 100755 --- a/.gitlab-ci/test-msys2.sh +++ b/.gitlab-ci/test-msys2.sh @@ -11,10 +11,13 @@ pacman --noconfirm -S --needed \ lcov \ "${MINGW_PACKAGE_PREFIX}"-ccache \ "${MINGW_PACKAGE_PREFIX}"-gettext \ + "${MINGW_PACKAGE_PREFIX}"-gi-docgen \ + "${MINGW_PACKAGE_PREFIX}"-gobject-introspection \ "${MINGW_PACKAGE_PREFIX}"-libffi \ "${MINGW_PACKAGE_PREFIX}"-meson \ "${MINGW_PACKAGE_PREFIX}"-pcre2 \ "${MINGW_PACKAGE_PREFIX}"-python3 \ + "${MINGW_PACKAGE_PREFIX}"-python-docutils \ "${MINGW_PACKAGE_PREFIX}"-python-pip \ "${MINGW_PACKAGE_PREFIX}"-toolchain \ "${MINGW_PACKAGE_PREFIX}"-zlib \ @@ -33,7 +36,12 @@ DIR="$(pwd)" export PATH CFLAGS # 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 @@ -59,3 +67,9 @@ if [[ "$CFLAGS" == *"-coverage"* ]]; then --capture \ --output-file "${DIR}/_coverage/${CI_JOB_NAME}.lcov" 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/ \ No newline at end of file