From 41cebbe1fe5801eec84497e535e55519c204b75e Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Thu, 18 Mar 2021 09:49:59 +0200 Subject: run ./check if it's there --- ci-prod.ick | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/ci-prod.ick b/ci-prod.ick index a9660b2..896d460 100644 --- a/ci-prod.ick +++ b/ci-prod.ick @@ -335,6 +335,7 @@ projects: - ick/get_sources - rustup - ick/install_debian_build_dependencies + - rust_run_check_if_there - build_deb_ci_with_rustup_rust - ick/upload_debs - format_subplots @@ -869,6 +870,63 @@ pipelines: ick_helpers.ci_build_debian(params) where: container + - pipeline: rust_run_check_if_there + actions: + - where: container + shell: | + # Use workspace for things. + export HOME=/workspace + export PATH="$HOME/.cargo/bin:$PATH" + export TMPDIR=/workspace + + # Set up rustup Rust to use stable version of Rust. + rustup default stable + rustup show + + # Create a non-privileged account: some tests will pass if + # run as root. + apt-get install -y sudo + adduser --disabled-password --gecos worker worker + + # Change workspace to be owned by new account. + chown -R worker:worker /workspace + + + as_worker() { + sudo -u worker env "PATH=$PATH" "HOME=$HOME" "TMPDIR=$TMPDIR" "$@" + } + + as_worker rustc --version + + cd /workspace/src + if [ -e check ] + then + # Clean up so that tests run in a repeatable environment. + as_worker git clean -fdx + + # Run build-time tests. + as_worker bash -x ./check + fi + + # Change workspace back to be owned by root. + chown -R root:root /workspace + + + + + # apt-get update + # apt-get install -y subplot \ + # pandoc-citeproc \ + # texlive-latex-base \ + # texlive-latex-recommended \ + # texlive-fonts-recommended \ + # plantuml + + # rm -f obnam.html obnam.pdf + # sp-docgen obnam.md -o obnam.html + # sp-docgen obnam.md -o obnam.pdf + # install -d /workspace/examples + # install -m 0644 obnam.html obnam.pdf /workspace/examples/. # - project: subplot -- cgit v1.2.1