File size: 556 Bytes
0220cd3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/env bash
set -euo pipefail

if ! test -v SSHTARGET; then
        echo >&2 SSHTARGET is not set
        exit 1
fi
BUILDDIR=ci_builds/chatmailcore

echo "--- Copying files to $SSHTARGET:$BUILDDIR"

rsync -az --delete --mkpath --files-from=<(git ls-files) ./ "$SSHTARGET:$BUILDDIR"

echo "--- Running Rust tests remotely"

ssh -oBatchMode=yes -- "$SSHTARGET" <<_HERE
    set +x -e
    # make sure all processes exit when ssh dies
    shopt -s huponexit
    export RUSTC_WRAPPER=\`command -v sccache\`
    cd $BUILDDIR

    cargo nextest run
_HERE