Skip to content
Snippets Groups Projects
Commit ad13cd12 authored by Zeeshan Ali Khan's avatar Zeeshan Ali Khan
Browse files

Setup redirection from gitlab pages to github pages for book

parent aa0817e3
No related merge requests found
Checking pipeline status
......@@ -5,267 +5,15 @@ include:
ref: *templates_sha
file: "/templates/debian.yml"
variables:
FDO_UPSTREAM_REPO: dbus/zbus
UPSTREAM_BRANCH: "main"
RUST_BACKTRACE: "full"
RUST_LOG: "trace"
# If the MSRV needs to be updated, make sure to also change the
# rust-version fields in packages' Cargo.toml files.
MSRV: "1.60"
###
# IMPORTANT
# These are the version tags for the docker images the CI runs against.
# If you are hacking on them or need a them to rebuild, its enough
# to change any part of the string of the image you want.
###
WINDOWS_TAG: "2022-12-31.1"
WINDOWS_AMD64_SUFFIX: "amd64/windows"
WINDOWS_IMAGE: "$CI_REGISTRY_IMAGE/$WINDOWS_AMD64_SUFFIX:$WINDOWS_TAG-$UPSTREAM_BRANCH"
WINDOWS_UPSTREAM_IMAGE: "$CI_REGISTRY/$UPSTREAM_REPO/$WINDOWS_AMD64_SUFFIX:$WINDOWS_TAG-$UPSTREAM_BRANCH"
stages:
- sanity check
- container
- lint
- test
- extras
- crosscheck
- pages
fail-if-fork-is-not-public:
stage: sanity check
script:
- |
if [ $CI_PROJECT_VISIBILITY != "public" ]; then
echo "*************************************************************************************"
echo "Project visibility must be set to 'public'"
echo "Change this in $CI_PROJECT_URL/edit under 'Visibility, project features, permissions'"
echo "*************************************************************************************"
exit 1
fi
except:
- main@dbus/zbus
.debian:
variables:
# Update this tag when you want to trigger a rebuild
FDO_DISTRIBUTION_TAG: "2023-04-15.1"
# Uncomment if you want to always rebuild the container, useful when hacking on it
#FDO_FORCE_REBUILD: 1
FDO_DISTRIBUTION_VERSION: 10
FDO_DISTRIBUTION_PACKAGES: >-
git
wget
ca-certificates
build-essential
libssl-dev
dbus
libglib2.0-dev
pkg-config
lcov
python3-pip
python3-setuptools
gcc-mingw-w64-x86-64
FDO_DISTRIBUTION_EXEC: >-
CI/install-rust.sh stable $MSRV &&
pip3 install lcov_cobertura &&
pip3 install codespell
before_script:
- source ./CI/env.sh
- mkdir .cargo && echo -e "[net]\ngit-fetch-with-cli = true" > .cargo/config
# If cargo exists assume we probably will want to update
# the lockfile
- |
if command -v cargo; then
cargo generate-lockfile --color=always
cargo update --color=always
fi
container:
extends:
- .debian
- .fdo.container-build@debian
stage: container
windows amd64 docker:
stage: container
variables:
# this file needs to be relative to docker/windows/ subdir
# as it makes life easier in the powershell script
DOCKERFILE: "CI/docker/windows/Dockerfile"
timeout: 2h 30m
tags:
- windows
- shell
- "2022"
script:
# We need to pass an array and to resolve the env vars, so we can't use a variable:
- $DOCKER_BUILD_ARGS = @("--build-arg", "DEFAULT_BRANCH=$UPSTREAM_BRANCH")
- "& CI/docker/windows/container.ps1 $CI_REGISTRY $CI_REGISTRY_USER $CI_REGISTRY_PASSWORD $WINDOWS_IMAGE $WINDOWS_UPSTREAM_IMAGE $DOCKERFILE"
- |
if (!($?)) {
echo "Failed to build the image"
Exit 1
}
.debian_img:
extends:
- .debian
- .fdo.distribution-image@debian
check:
extends: .debian_img
stage: "lint"
variables:
RUSTFLAGS: "-D warnings"
script:
- rustc --version
- cargo --version
- cargo fmt --all -- --check
- cargo clippy -- -D warnings
- cargo audit
- codespell
check msrv:
extends: .debian_img
stage: "lint"
script:
- rustup override set $MSRV
- cargo check
# This would be nice but some optional deps (e.g `time`) move very fast wrt to MSRV.
#- cargo check --all-features
docs build:
extends: .debian_img
stage: "lint"
variables:
RUSTDOCFLAGS: "-D warnings"
script:
- cargo doc
.cargo_test_var: &cargo_test
- rustc --version
- cargo --version
- mkdir -p /run/user/$UID
- sed -e s/UID/$UID/ -e s/PATH/path/ CI/dbus-session.conf > /tmp/dbus-session.conf
- sed -e s/UID/$UID/ -e s/PATH/abstract/ CI/dbus-session.conf > /tmp/dbus-session-abstract.conf
- dbus-run-session --config-file /tmp/dbus-session-abstract.conf -- cargo test --verbose -- basic_connection
- dbus-run-session --config-file /tmp/dbus-session.conf -- cargo test --verbose --all-features -- --skip fdpass_systemd
# check cookie-sha1 auth against dbus-daemon
- sed -i s/EXTERNAL/DBUS_COOKIE_SHA1/g /tmp/dbus-session.conf
- dbus-run-session --config-file /tmp/dbus-session.conf -- cargo test --verbose -- basic_connection
# Test tokio support.
- dbus-run-session --config-file /tmp/dbus-session.conf -- cargo test --verbose --tests -p zbus --no-default-features --features tokio -- --skip fdpass_systemd
- dbus-run-session --config-file /tmp/dbus-session.conf -- cargo test --verbose --doc --no-default-features connection::Connection::executor
test:
extends: .debian_img
stage: test
variables:
RUSTFLAGS: "-D warnings"
script:
- rustup override set stable
- *cargo_test
nightly:
extends: .debian_img
stage: test
allow_failure: true
variables:
RUSTFLAGS: "-D warnings"
script:
- rustup override set nightly
- *cargo_test
msvc:
image: $WINDOWS_IMAGE
stage: test
tags:
- "docker"
- "windows"
- "2022"
needs:
- "windows amd64 docker"
variables:
ErrorActionPreference: "Stop"
WarningPreference: "Stop"
PKG_CONFIG_PATH: "C:/lib/pkgconfig"
DBUS_SESSION_BUS_ADDRESS: "tcp:host=127.0.0.1,port=9876"
TRYBUILD: "overwrite" # ignore ui tests
timeout: "45min"
script:
- $env:PATH += ";C:\bin"
- Start-Process dbus-daemon.exe --config-file=CI/win32-session.conf
- cargo test
- $env:DBUS_SESSION_BUS_ADDRESS = $null
- $env:ZBUS_GDBUS_TEST = "1"
# This is an undocumented implementation detail, but easier and faster than calling the gdbus C library
- Start-Process gdbus.exe _win32_run_session_bus
# The gdbus process above will exit when idle for more than three seconds, usually right in the middle
# of the doc tests. This process will keep it alive.
- Start-Process gdbus.exe 'monitor -e -d org.freedesktop.DBus'
- cargo test --package zbus --features windows-gdbus
zvariant_fuzz:
extends: .debian_img
stage: test
script:
- rustup override set nightly
- cargo fuzz run --fuzz-dir zvariant/fuzz dbus -- -max_total_time=30 -max_len=100M
- cargo fuzz run --fuzz-dir zvariant/fuzz gvariant -- -max_total_time=30 -max_len=100M
coverage:
extends: .debian_img
stage: extras
variables:
RUSTFLAGS: "-Zinstrument-coverage"
LLVM_PROFILE_FILE: "zbus-%p-%m.profraw"
script:
- rustup override set nightly
- *cargo_test
# generate html report
- grcov . --binary-path ./target/debug/ -s . -t html --branch --ignore-not-existing --ignore "*cargo*" -o ./coverage/
# generate cobertura report for gitlab integration
- grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --ignore "*cargo*" -o coverage.lcov
- python3 /usr/local/lib/python3.5/dist-packages/lcov_cobertura.py coverage.lcov
# output coverage summary for gitlab parsing
- lcov -l coverage.lcov
- lcov --summary coverage.lcov
when: manual
artifacts:
paths:
- "coverage"
reports:
coverage_report:
coverage_format: cobertura
path: coverage.xml
crosscheck:
extends: .debian_img
stage: crosscheck
script:
- cargo check --target x86_64-apple-darwin
- cargo check --target x86_64-unknown-freebsd
- cargo check --target x86_64-unknown-netbsd
- cargo check --target x86_64-pc-windows-gnu
pages:
image: "hrektts/mdbook"
stage: pages
before_script:
- export PATH="$PATH:$CARGO_HOME/bin"
- mdbook --version || cargo install --debug mdbook
script:
- mkdir -p public/1.0
- mdbook build book
- mdbook build book-1.0
- cp -r ./book/book/* ./public
- cp -r ./book-1.0/book/* ./public/1.0/
- cp book.html public/index.html
- cp book-1.0.html public/1.0/index.html
- find $PWD/public | grep "\.html\$"
artifacts:
......@@ -273,7 +21,4 @@ pages:
- public
only:
refs:
- tags
changes:
- book/**/*
- book-redirection
<meta http-equiv="refresh" content="5; url='https://dbus2.github.io/zbus/1.0'" />
<meta http-equiv="refresh" content="5; url='https://dbus2.github.io/zbus/'" />
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment