libhandy-rs/.gitlab-ci.yml
2021-05-04 15:40:52 +00:00

53 lines
1.4 KiB
YAML

image: 'registry.fedoraproject.org/fedora:34'
before_script:
- dnf update -y
- dnf install -y git meson ninja-build glib2-devel gtk3-devel libhandy-devel gobject-introspection-devel xorg-x11-server-Xvfb
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- source "$HOME/.cargo/env"
build:
stage: test
script:
- cargo build --features v1_2
- xvfb-run -a -s "-screen 0 1024x768x24" cargo test --features v1_2
.docs:
variables:
ARTIFACT: git-docs
GIT_SUBMODULE_STRATEGY: recursive
GTK_RS_URL: https://gtk-rs.org/docs/
RUSTDOCFLAGS: >
-Z unstable-options
--enable-index-page
--extern-html-root-url=cairo=$GTK_RS_URL
--extern-html-root-url=gdk=$GTK_RS_URL
--extern-html-root-url=gdk_pixbuf=$GTK_RS_URL
--extern-html-root-url=gio=$GTK_RS_URL
--extern-html-root-url=glib=$GTK_RS_URL
--extern-html-root-url=graphene=$GTK_RS_URL
--extern-html-root-url=gtk=$GTK_RS_URL
--extern-html-root-url=pango=$GTK_RS_URL
script:
# generate the docs
- cargo install rustdoc-stripper
- ./generator.py --embed-docs
- rustup default nightly
- cargo doc --features dox --no-deps
- mv target/doc/ $ARTIFACT
artifacts:
paths:
- $ARTIFACT
docs:
stage: test
extends: .docs
pages:
stage: deploy
extends: .docs
variables:
ARTIFACT: public
rules:
- if: $CI_COMMIT_BRANCH == "release"