summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2021-03-18 09:49:59 +0200
committerLars Wirzenius <liw@liw.fi>2021-03-18 09:49:59 +0200
commit41cebbe1fe5801eec84497e535e55519c204b75e (patch)
treea8c0280bf3b195ac7d2481829a3c54438c251b39
parent90162f385d9c75c668278bd80eca3ea63aff0e89 (diff)
downloadliw-ci-41cebbe1fe5801eec84497e535e55519c204b75e.tar.gz
run ./check if it's there
-rw-r--r--ci-prod.ick58
1 files changed, 58 insertions, 0 deletions
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