From 604c8f2f26ee87806df23abdae7fee40aedaedf3 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 15 Jun 2023 00:00:49 +0100 Subject: [PATCH] Add a gitlab CI file Signed-off-by: Ian Jackson --- .gitlab-ci.yml | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..60f4cda --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,90 @@ + +stages: + - early + - check + - test + +variables: + BUILD_VERBOSE: "true" + MAKE_CHECK_PACKAGES: "util-linux iproute2 userv-utils net-tools iputils-ping" + +image: "debian:bookworm-slim" + +default: + before_script: + - rustc --version ||true + - cargo --version ||true + +image: "debian:bookworm-slim" + +cargo-check: + stage: check + image: "rust:latest" + script: + - cargo check --locked --workspace --verbose --all-features + +cargo-test: + stage: test + image: "rust:latest" + script: + - cargo test --locked --workspace --verbose --all-features + +cargo-update-test-nightly: + stage: test + image: "rustlang/rust:nightly" + allow_failure: true + script: + - cargo update + - cargo test --locked --workspace --verbose --all-features + +build-docs: + stage: check + script: + - apt-get -y update + - apt-get -y -Pupstream-cargo build-dep . + - make doc + +test-rust-upstream: + stage: test + image: "rust:bookworm" + script: + - apt-get -y update + - apt-get -y -Pupstream-cargo build-dep . + - apt-get -y install $MAKE_CHECK_PACKAGES + - dpkg-buildpackage -Pupstream-cargo -uc -b + +# This test is marked allow-fail because Debian development breaks +# things on a regular basis. +test-debian-bookworm: + stage: test + image: "debian:bookworm-slim" + allow_failure: true + script: + - apt-get -y update + - apt-get -y build-dep . + - apt-get -y install $MAKE_CHECK_PACKAGES + - dpkg-buildpackage -uc -b + +# This test is marked allow-fail because Debian development breaks +# things on a regular basis. +test-debian-unstable: + stage: test + image: "debian:unstable-slim" + allow_failure: true + script: + - apt-get -y update + - apt-get -y build-dep . + - apt-get -y install $MAKE_CHECK_PACKAGES + - dpkg-buildpackage -uc -b + +# Ideally we'd run autopkgtest here. +# However, our autopkgtests use overlayfs which doesn't seem available. +# The adt-initscript test seemed to work but probably isn't worth the candle. +#autopkgtest: +# stage: comprehensive +# script: +# - apt-get -y update +# - apt-get -y -Pupstream-cargo build-dep . +# - apt-get -y install autopkgtest +# - DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -Pupstream-cargo -uc -us --build=full +# - autopkgtest --ignore-restrictions=x-hippotat-adt-broken-in-debci ../hippotat_*.changes --- null -- 2.30.2