Commit ed55ffb0 authored by Bilal Elmoussaoui's avatar Bilal Elmoussaoui

ci: generate & publish docs

why not? also could help with newcomers
parent ab00ab9a
Pipeline #219013 passed with stage
in 6 minutes and 1 second
......@@ -19,3 +19,17 @@ lint:
image: "valalang/lint:latest"
script:
- io.elementary.vala-lint src
docs:
image: "fedora:latest"
script:
- dnf install -y git valadoc vala meson glib2-devel gtk3-devel libhandy1-devel gsound-devel gnome-desktop3-devel libgweather-devel geoclue2-devel
- meson -Ddocs=true _build
- meson compile -C _build
- rm -rf public
- mv _build/docs public
artifacts:
paths:
- public
# rules:
# - if: '$CI_COMMIT_BRANCH == "master"'
\ No newline at end of file
......@@ -132,7 +132,8 @@
"name": "gnome-clocks",
"buildsystem": "meson",
"config-opts": [
"-Dprofile=development"
"-Dprofile=development",
"-Ddocs=false"
],
"sources": [
{
......
......@@ -21,6 +21,7 @@ geocodeglib = dependency('geocode-glib-1.0', version: '>=1.0')
libgeoclue = dependency('libgeoclue-2.0', version: '>=2.4')
libhandy = dependency ('libhandy-1', version: '>= 1.0.0', required: false)
libhandy_subproj = libhandy
if not libhandy.found()
libhandy_subproj = subproject(
'libhandy',
......
......@@ -8,3 +8,5 @@ option(
value: 'default',
description: 'The build profile for Clock. One of "default" or "development".'
)
option('docs', type : 'boolean', value : false)
\ No newline at end of file
......@@ -82,3 +82,35 @@ executable('gnome-clocks', clocks_sources,
dependencies: clocks_dependencies,
install: true
)
if get_option('docs')
valadoc = find_program('valadoc')
custom_target('docs',
input: clocks_vala_sources,
output: 'docs',
command: [
valadoc,
'--doclet=html',
'--force',
'--package-name=@0@'.format(meson.project_name()),
'--package-version=@0@'.format(meson.project_version()),
'--pkg=glib-2.0',
'--pkg=gio-2.0',
'--pkg=gio-unix-2.0',
'--pkg=gtk+-3.0',
'--pkg=gobject-2.0',
'--pkg=libhandy-1',
'--pkg=gsound',
'--pkg=gweather-3.0',
'--pkg=gnome-desktop-3.0',
'--pkg=geocode-glib-1.0',
'--pkg=libgeoclue-2.0',
'--pkg=config',
'--directory=@OUTDIR@/../docs',
'--vapidir=@0@'.format(meson.current_source_dir()),
'--use-svg-images',
clocks_vala_sources
],
build_by_default: true,
)
endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment