blueprint-compiler/.gitlab-ci.yml
2025-06-14 11:39:31 -05:00

85 lines
2 KiB
YAML

include:
- component: "gitlab.gnome.org/GNOME/citemplates/release-service@master"
inputs:
job-stage: "release"
dist-job-name: "build-release-tarball"
tarball-artifact-path: "${TARBALL_ARTIFACT_PATH}"
stages:
- build
- release
- pages
variables:
MESON_BUILD_DIR: "_build"
TARBALL_ARTIFACT_PATH: "${MESON_BUILD_DIR}/meson-dist/${CI_PROJECT_NAME}-${CI_COMMIT_TAG}.tar.xz"
build:
image: registry.gitlab.gnome.org/gnome/blueprint-compiler
stage: build
script:
- black --check --diff ./ tests
- isort --check --diff --profile black ./ tests
- mypy --python-version=3.9 blueprintcompiler/
- G_DEBUG=fatal-warnings xvfb-run coverage run -m unittest
- coverage report
- coverage html
- coverage xml
- meson _build -Ddocs=true --prefix=/usr
- ninja -C _build
- ninja -C _build install
- ninja -C _build docs/en
- git clone https://gitlab.gnome.org/jwestman/blueprint-regression-tests.git
- cd blueprint-regression-tests
- git checkout 5f9e155c1333e84e6f683cdb26b02a5925fd8db3
- ./test.sh
- cd ..
coverage: '/TOTAL.*\s([.\d]+)%/'
artifacts:
paths:
- _build
- htmlcov
reports:
coverage_report:
coverage_format: cobertura
path: coverage.xml
fuzz:
image: registry.gitlab.gnome.org/gnome/blueprint-compiler
stage: build
script:
- meson _build
- ninja -C _build install
- ./tests/fuzz.sh 5000
artifacts:
when: always
paths:
- corpus
- crashes
build-release-tarball:
stage: build
image: registry.gitlab.gnome.org/gnome/blueprint-compiler
only:
- tags
script:
- meson setup "${MESON_BUILD_DIR}"
- xvfb-run meson dist -C "${MESON_BUILD_DIR}" --include-subprojects
artifacts:
name: "${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
when: "always"
paths:
- "${TARBALL_ARTIFACT_PATH}"
pages:
stage: pages
dependencies:
- build
script:
- mv _build/docs/en public
- mv htmlcov public/coverage
artifacts:
paths:
- public
only:
- main