Skip to content

Commit

Permalink
Hello ripgrep-prebuilt
Browse files Browse the repository at this point in the history
  • Loading branch information
roblourens committed Jul 2, 2019
1 parent f0216ec commit f524ee3
Show file tree
Hide file tree
Showing 13 changed files with 511 additions and 331 deletions.
330 changes: 0 additions & 330 deletions .gitignore

This file was deleted.

5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# ripgrep-prebuilt

# Contributing
[ripgrep](https://github.com/BurntSushi/ripgrep) builds on multiple platforms, used by VS Code.

## Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
Expand Down
45 changes: 45 additions & 0 deletions build/build.sh
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
Loading

0 comments on commit f524ee3

Please sign in to comment.