mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
995f75cdd7
This builds glib using meson/ninja/ccache with mingw-w64 on a Windows machine. The CI scripts expect a gitlab runner to exist with the "win32" tag which uses the default "cmd" shell by default. Before running the tests pacman is invoked to update the system (potentially including bash etc, thus the extra step) Then a login shell is started with CHERE_INVOKING to not change the cwd and finally the test script is executed. https://bugzilla.gnome.org/show_bug.cgi?id=793729
54 lines
1.3 KiB
YAML
54 lines
1.3 KiB
YAML
image: ebassi/gitlab-glib:latest
|
|
|
|
stages:
|
|
- build
|
|
|
|
cache:
|
|
paths:
|
|
- _ccache/
|
|
|
|
build-job:
|
|
stage: build
|
|
script:
|
|
- meson --prefix /usr --libdir /usr/lib64 --buildtype debug --werror -Dsystemtap=true -Ddtrace=true _build .
|
|
- cd _build
|
|
- ninja
|
|
- meson test
|
|
except:
|
|
- tags
|
|
artifacts:
|
|
when: on_failure
|
|
name: "glib-_${CI_COMMIT_REF_NAME}"
|
|
paths:
|
|
- "${CI_PROJECT_DIR}/_build/meson-logs"
|
|
|
|
msys2-mingw32:
|
|
stage: build
|
|
tags:
|
|
- win32
|
|
variables:
|
|
MSYSTEM: "MINGW32"
|
|
CHERE_INVOKING: "yes"
|
|
script:
|
|
- C:\msys64\usr\bin\pacman --noconfirm -Syyuu --ask 20
|
|
- C:\msys64\usr\bin\bash -lc "bash -x ./.gitlab-ci/test-msys2.sh"
|
|
|
|
dist-job:
|
|
stage: build
|
|
only:
|
|
- tags
|
|
script:
|
|
- meson --prefix /usr --libdir /usr/lib64 --buildtype release -Dgtk_doc=true -Dman=true _build .
|
|
- cd _build
|
|
- ninja dist
|
|
- ninja glib-doc
|
|
- tar -c -f "glib-docs-$CI_COMMIT_TAG.tar.xz" -C docs/reference/glib html
|
|
- tar -c -f "gobject-docs-$CI_COMMIT_TAG.tar.xz" -C docs/reference/gobject html
|
|
- tar -c -f "gio-docs-$CI_COMMIT_TAG.tar.xz" -C docs/reference/gio html
|
|
artifacts:
|
|
paths:
|
|
- "${CI_PROJECT_DIR}/_build/glib-docs.tar.xz"
|
|
- "${CI_PROJECT_DIR}/_build/gobject-docs.tar.xz"
|
|
- "${CI_PROJECT_DIR}/_build/gio-docs.tar.xz"
|
|
- "${CI_PROJECT_DIR}/_build/meson-dist/glib-*.tar.xz"
|