mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
133 lines
3.1 KiB
YAML
133 lines
3.1 KiB
YAML
image: registry.gitlab.gnome.org/gnome/glib/master:v3
|
|
|
|
stages:
|
|
- build
|
|
- coverage
|
|
- deploy
|
|
|
|
cache:
|
|
paths:
|
|
- _ccache/
|
|
|
|
variables:
|
|
MESON_TEST_TIMEOUT_MULTIPLIER: 2
|
|
|
|
fedora-meson-x86_64:
|
|
stage: build
|
|
except:
|
|
- tags
|
|
variables:
|
|
CFLAGS: "-coverage -ftest-coverage -fprofile-arcs"
|
|
script:
|
|
- meson --buildtype debug --werror -Dsystemtap=true -Ddtrace=true -Dfam=true _build .
|
|
- ninja -C _build
|
|
- meson test -C _build --timeout-multiplier ${MESON_TEST_TIMEOUT_MULTIPLIER}
|
|
- mkdir -p _coverage
|
|
- lcov --rc lcov_branch_coverage=1 --directory . --capture --no-external --output-file "_coverage/${CI_JOB_NAME}.lcov"
|
|
artifacts:
|
|
name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
|
|
when: always
|
|
paths:
|
|
- "_build/meson-logs"
|
|
- "_coverage"
|
|
|
|
fedora-meson-android_ndk_r16_api21_arm64:
|
|
stage: build
|
|
except:
|
|
- tags
|
|
script:
|
|
# FIXME: add --werror
|
|
- meson --cross-file=/opt/cross-file-android_ndk_r16_api21_arm64.txt -Diconv=gnu -Dinternal_pcre=true --buildtype debug _build
|
|
- ninja -C _build
|
|
artifacts:
|
|
name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
|
|
when: always
|
|
paths:
|
|
- "_build/meson-logs"
|
|
|
|
fedora-meson-mingw64:
|
|
stage: build
|
|
except:
|
|
- tags
|
|
script:
|
|
# FIXME: Add --werror
|
|
- meson --cross-file=/opt/cross_file_mingw64.txt --buildtype debug _build
|
|
- ninja -C _build
|
|
artifacts:
|
|
name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
|
|
when: always
|
|
paths:
|
|
- "_build/meson-logs"
|
|
|
|
msys2-mingw32:
|
|
stage: build
|
|
except:
|
|
- tags
|
|
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"
|
|
artifacts:
|
|
name: "glib-%CI_JOB_NAME%-%CI_COMMIT_REF_NAME%"
|
|
when: always
|
|
paths:
|
|
- _build/meson-logs
|
|
- _coverage/
|
|
|
|
vs2017-x64:
|
|
stage: build
|
|
except:
|
|
- tags
|
|
tags:
|
|
- win32
|
|
script:
|
|
- .gitlab-ci/test-msvc.bat
|
|
artifacts:
|
|
name: "glib-%CI_JOB_NAME%-%CI_COMMIT_REF_NAME%"
|
|
when: always
|
|
paths:
|
|
- _build/meson-logs
|
|
|
|
coverage:
|
|
stage: coverage
|
|
artifacts:
|
|
name: "glib-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
|
|
paths:
|
|
- _coverage/
|
|
script:
|
|
- bash -x ./.gitlab-ci/coverage-docker.sh
|
|
coverage: '/^\s+lines\.+:\s+([\d.]+\%)\s+/'
|
|
|
|
pages:
|
|
stage: deploy
|
|
only:
|
|
- master
|
|
script:
|
|
- mv _coverage/ public/
|
|
artifacts:
|
|
paths:
|
|
- public
|
|
|
|
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"
|