summaryrefslogtreecommitdiffstats
path: root/ci
diff options
context:
space:
mode:
authorAndrew Gallant <jamslam@gmail.com>2020-03-15 20:28:28 -0400
committerAndrew Gallant <jamslam@gmail.com>2020-03-15 21:06:45 -0400
commitc0d78240dfe4e67244767296e1f89284925d6d82 (patch)
treeaa04bc9b9b0affe25011f6abf8bdc550414c7bb6 /ci
parentcda9acb876277c3a703ddd99c4d06db2dd2a11e2 (diff)
ci: remove Travis and appveyor specific stuff
Diffstat (limited to 'ci')
-rwxr-xr-xci/before_deploy.sh62
-rwxr-xr-xci/install.sh61
-rwxr-xr-xci/script.sh60
3 files changed, 0 insertions, 183 deletions
diff --git a/ci/before_deploy.sh b/ci/before_deploy.sh
deleted file mode 100755
index 561cbb51..00000000
--- a/ci/before_deploy.sh
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/bin/bash
-
-# package the build artifacts
-
-set -ex
-
-. "$(dirname $0)/utils.sh"
-
-# Generate artifacts for release
-mk_artifacts() {
- CARGO="$(builder)"
- if is_arm; 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
-}
-
-mk_tarball() {
- # When cross-compiling, use the right `strip` tool on the binary.
- local gcc_prefix="$(gcc_prefix)"
- # Create a temporary dir that contains our staging area.
- # $tmpdir/$name is what eventually ends up as the deployed archive.
- local tmpdir="$(mktemp -d)"
- local name="${PROJECT_NAME}-${TRAVIS_TAG}-${TARGET}"
- local staging="$tmpdir/$name"
- mkdir -p "$staging"/{complete,doc}
- # The deployment directory is where the final archive will reside.
- # This path is known by the .travis.yml configuration.
- local out_dir="$(pwd)/deployment"
- mkdir -p "$out_dir"
- # Find the correct (most recent) Cargo "out" directory. The out directory
- # contains shell completion files and the man page.
- local cargo_out_dir="$(cargo_out_dir "target/$TARGET")"
-
- # Copy the ripgrep binary and strip it.
- cp "target/$TARGET/release/rg" "$staging/rg"
- "${gcc_prefix}strip" "$staging/rg"
- # Copy the licenses and README.
- cp {README.md,UNLICENSE,COPYING,LICENSE-MIT} "$staging/"
- # Copy documentation and man page.
- cp {CHANGELOG.md,FAQ.md,GUIDE.md} "$staging/doc/"
- if command -V a2x 2>&1 > /dev/null; then
- # The man page should only exist if we have asciidoc installed.
- cp "$cargo_out_dir/rg.1" "$staging/doc/"
- fi
- # Copy shell completion files.
- cp "$cargo_out_dir"/{rg.bash,rg.fish,_rg.ps1} "$staging/complete/"
- cp complete/_rg "$staging/complete/"
-
- (cd "$tmpdir" && tar czf "$out_dir/$name.tar.gz" "$name")
- rm -rf "$tmpdir"
-}
-
-main() {
- mk_artifacts
- mk_tarball
-}
-
-main
diff --git a/ci/install.sh b/ci/install.sh
deleted file mode 100755
index 37af9d7a..00000000
--- a/ci/install.sh
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/bin/bash
-
-# install stuff needed for the `script` phase
-
-# Where rustup gets installed.
-export PATH="$PATH:$HOME/.cargo/bin"
-
-set -ex
-
-. "$(dirname $0)/utils.sh"
-
-install_rustup() {
- curl https://sh.rustup.rs -sSf \
- | sh -s -- -y --default-toolchain="$TRAVIS_RUST_VERSION"
- rustc -V
- cargo -V
-}
-
-install_targets() {
- if [ $(host) != "$TARGET" ]; then
- rustup target add $TARGET
- fi
-}
-
-install_osx_dependencies() {
- if ! is_osx; then
- return
- fi
-
- brew install asciidoc docbook-xsl
-}
-
-configure_cargo() {
- local prefix=$(gcc_prefix)
- if [ -n "${prefix}" ]; then
- local gcc_suffix=
- if [ -n "$GCC_VERSION" ]; then
- gcc_suffix="-$GCC_VERSION"
- fi
- local gcc="${prefix}gcc${gcc_suffix}"
-
- # information about the cross compiler
- "${gcc}" -v
-
- # tell cargo which linker to use for cross compilation
- mkdir -p .cargo
- cat >>.cargo/config <<EOF
-[target.$TARGET]
-linker = "${gcc}"
-EOF
- fi
-}
-
-main() {
- install_osx_dependencies
- install_rustup
- install_targets
- configure_cargo
-}
-
-main
diff --git a/ci/script.sh b/ci/script.sh
deleted file mode 100755
index af90582e..00000000
--- a/ci/script.sh
+++ /dev/null
@@ -1,60 +0,0 @@
-#!/bin/bash
-
-exit 0
-
-# 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; then
- "$CARGO" build --target "$TARGET" --verbose
- else
- "$CARGO" build --target "$TARGET" --verbose --all --features 'pcre2'
- fi
-
- # 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
- file target/"$TARGET"/debug/rg
-
- # Check that we've generated man page and other shell completions.
- outdir="$(cargo_out_dir "target/$TARGET/debug")"
- file "$outdir/rg.bash"
- file "$outdir/rg.fish"
- file "$outdir/_rg.ps1"
- file "$outdir/rg.1"
-
- # 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.
- "$(dirname "${0}")/test_complete.sh"
-
- # Run tests for ripgrep and all sub-crates.
- "$CARGO" test --target "$TARGET" --verbose --all --features 'pcre2'
-
- # Check formatting.
- if [ "$TRAVIS_RUST_VERSION" = "1.41.0" ]; then
- rustup component add rustfmt
- "$CARGO" fmt --all -- --check
- fi
-}
-
-main