mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-05-19 01:30:21 -07:00
This modifies CI to check that we generate completion files and a man page. We also enable tests on arm.
71 lines
1.2 KiB
Bash
71 lines
1.2 KiB
Bash
#!/bin/bash
|
|
|
|
# Various utility functions used through CI.
|
|
|
|
host() {
|
|
case "$TRAVIS_OS_NAME" in
|
|
linux)
|
|
echo x86_64-unknown-linux-gnu
|
|
;;
|
|
osx)
|
|
echo x86_64-apple-darwin
|
|
;;
|
|
esac
|
|
}
|
|
|
|
architecture() {
|
|
case "$TARGET" in
|
|
x86_64-*)
|
|
echo amd64
|
|
;;
|
|
i686-*|i586-*|i386-*)
|
|
echo i386
|
|
;;
|
|
arm*-unknown-linux-gnueabihf)
|
|
echo armhf
|
|
;;
|
|
*)
|
|
die "architecture: unexpected target $TARGET"
|
|
;;
|
|
esac
|
|
}
|
|
|
|
gcc_prefix() {
|
|
case "$(architecture)" in
|
|
armhf)
|
|
echo arm-linux-gnueabihf-
|
|
;;
|
|
*)
|
|
return
|
|
;;
|
|
esac
|
|
}
|
|
|
|
is_ssse3_target() {
|
|
case "$(architecture)" in
|
|
amd64) return 0 ;;
|
|
*) return 1 ;;
|
|
esac
|
|
}
|
|
|
|
is_x86() {
|
|
case "$(architecture)" in
|
|
amd64|i386) return 0 ;;
|
|
*) return 1 ;;
|
|
esac
|
|
}
|
|
|
|
is_arm() {
|
|
case "$(architecture)" in
|
|
armhf) return 0 ;;
|
|
*) return 1 ;;
|
|
esac
|
|
}
|
|
|
|
is_linux() {
|
|
case "$TRAVIS_OS_NAME" in
|
|
linux) return 0 ;;
|
|
*) return 1 ;;
|
|
esac
|
|
}
|