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 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
#!/bin/bash
set -ex
# First, we check that this script is not run as root because it would fail tests.
if [ "root" == "$(whoami)" ]; then exit 1; fi
echo "========="
echo "Display the current git status"
git status
git tag --list
git describe
echo "========="
echo "Prep cargo dirs"
mkdir -p ~/.cargo/{registry,git}
echo "========="
echo "Install Rustup using ./rustup-init.sh"
sh rustup-init.sh --default-toolchain=stable --profile=minimal -y
# It's the equivalent of `source`
# shellcheck source=src/cli/self_update/env.sh
source "$HOME"/.cargo/env
echo "========="
echo "Ensure we have the components we need"
rustup component add rustfmt
rustup component add clippy
echo "========="
echo "Run the freebsd check"
unset SKIP_TESTS
export LIBZ_SYS_STATIC=1
export CARGO_BUILD_JOBS=1
export TARGET="x86_64-unknown-freebsd"
# TODO: This should be split into two as the other jobs are.
export BUILD_PROFILE="release"
bash ci/run.bash
|