ripgrep-all/ci/script.sh

49 lines
1.2 KiB
Bash
Raw Permalink Normal View History

2019-06-12 19:59:50 +00:00
#!/bin/bash
# build, test and generate docs in this phase
set -ex
. "$(dirname $0)/utils.sh"
main() {
CARGO="$(builder)"
# Test a normal debug build.
2019-06-12 20:07:46 +00:00
"$CARGO" build --target "$TARGET" --verbose
2019-06-12 19:59:50 +00:00
# Show the output of the most recent build.rs stderr.
set +x
stderr="$(find "target/$TARGET/debug" -name stderr -print0 | xargs -0 ls -t | head -n1)"
if [ -s "$stderr" ]; then
echo "===== $stderr ====="
cat "$stderr"
echo "====="
fi
set -x
# sanity check the file type
2019-06-12 20:22:44 +00:00
file target/"$TARGET"/debug/rga
2019-06-12 19:59:50 +00:00
# Check that we've generated man page and other shell completions.
2019-06-12 20:22:44 +00:00
#outdir="$(cargo_out_dir "target/$TARGET/debug")"
#file "$outdir/rg.bash"
#file "$outdir/rg.fish"
#file "$outdir/_rg.ps1"
#file "$outdir/rg.1"
2019-06-12 19:59:50 +00:00
# Apparently tests don't work on arm, so just bail now. I guess we provide
# ARM releases on a best effort basis?
if is_arm; then
return 0
fi
# Test that zsh completions are in sync with ripgrep's actual args.
2019-06-12 20:32:20 +00:00
# "$(dirname "${0}")/test_complete.sh"
2019-06-12 19:59:50 +00:00
# Run tests for ripgrep and all sub-crates.
2019-06-12 20:07:46 +00:00
"$CARGO" test --target "$TARGET" --verbose --all
2019-06-12 19:59:50 +00:00
}
main