-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f0216ec
commit f524ee3
Showing
13 changed files
with
511 additions
and
331 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/bin/bash | ||
# Adapted from https://github.com/BurntSushi/ripgrep/blob/master/ci/script.sh | ||
|
||
# build, test and generate docs in this phase | ||
|
||
set -ex | ||
|
||
. "$(dirname $0)/utils.sh" | ||
|
||
main() { | ||
CARGO="$(builder)" | ||
|
||
# Test a normal debug build. | ||
if is_arm || is_aarch64; then | ||
"$CARGO" build --target "$TARGET" --release | ||
else | ||
# Technically, MUSL builds will force PCRE2 to get statically compiled, | ||
# but we also want PCRE2 statically build for macOS binaries. | ||
PCRE2_SYS_STATIC=1 "$CARGO" build --target "$TARGET" --release --features 'pcre2' | ||
fi | ||
|
||
# Show the output of the most recent build.rs stderr. | ||
set +x | ||
stderr="$(find "target/$TARGET/release" -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 | ||
file target/"$TARGET"/release/rg | ||
|
||
# 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 || is_aarch64; then | ||
return 0 | ||
fi | ||
|
||
# Run tests for ripgrep and all sub-crates. | ||
"$CARGO" test --target "$TARGET" --verbose --all --features 'pcre2' | ||
} | ||
|
||
main |
Oops, something went wrong.