mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-05-19 09:40:22 -07:00
ci: remove Travis and appveyor specific stuff
This commit is contained in:
parent
cda9acb876
commit
c0d78240df
110
.travis.yml
110
.travis.yml
@ -1,110 +0,0 @@
|
|||||||
language: rust
|
|
||||||
dist: xenial
|
|
||||||
env:
|
|
||||||
global:
|
|
||||||
- PROJECT_NAME: ripgrep
|
|
||||||
- RUST_BACKTRACE: full
|
|
||||||
addons:
|
|
||||||
apt:
|
|
||||||
packages:
|
|
||||||
# For generating man page.
|
|
||||||
- libxslt1-dev
|
|
||||||
- asciidoc
|
|
||||||
- docbook-xsl
|
|
||||||
- xsltproc
|
|
||||||
- libxml2-utils
|
|
||||||
# Needed for completion-function test.
|
|
||||||
- zsh
|
|
||||||
# Needed for testing decompression search.
|
|
||||||
- xz-utils
|
|
||||||
- liblz4-tool
|
|
||||||
# For building MUSL static builds on Linux.
|
|
||||||
- musl-tools
|
|
||||||
matrix:
|
|
||||||
fast_finish: true
|
|
||||||
include:
|
|
||||||
# Nightly channel.
|
|
||||||
# All *nix releases are done on the nightly channel to take advantage
|
|
||||||
# of the regex library's multiple pattern SIMD search.
|
|
||||||
- os: linux
|
|
||||||
rust: nightly
|
|
||||||
env: TARGET=i686-unknown-linux-musl
|
|
||||||
- os: linux
|
|
||||||
rust: nightly
|
|
||||||
env: TARGET=x86_64-unknown-linux-musl
|
|
||||||
- os: osx
|
|
||||||
rust: nightly
|
|
||||||
# XML_CATALOG_FILES is apparently necessary for asciidoc on macOS.
|
|
||||||
env: TARGET=x86_64-apple-darwin XML_CATALOG_FILES=/usr/local/etc/xml/catalog
|
|
||||||
- os: linux
|
|
||||||
rust: nightly
|
|
||||||
env: TARGET=arm-unknown-linux-gnueabihf GCC_VERSION=4.8
|
|
||||||
addons:
|
|
||||||
apt:
|
|
||||||
packages:
|
|
||||||
- gcc-4.8-arm-linux-gnueabihf
|
|
||||||
- binutils-arm-linux-gnueabihf
|
|
||||||
- libc6-armhf-cross
|
|
||||||
- libc6-dev-armhf-cross
|
|
||||||
# For generating man page.
|
|
||||||
- libxslt1-dev
|
|
||||||
- asciidoc
|
|
||||||
- docbook-xsl
|
|
||||||
- xsltproc
|
|
||||||
- libxml2-utils
|
|
||||||
# Beta channel. We enable these to make sure there are no regressions in
|
|
||||||
# Rust beta releases.
|
|
||||||
- os: linux
|
|
||||||
rust: beta
|
|
||||||
env: TARGET=x86_64-unknown-linux-musl
|
|
||||||
- os: linux
|
|
||||||
rust: beta
|
|
||||||
env: TARGET=x86_64-unknown-linux-gnu
|
|
||||||
# Minimum Rust supported channel. We enable these to make sure ripgrep
|
|
||||||
# continues to work on the advertised minimum Rust version.
|
|
||||||
- os: linux
|
|
||||||
rust: 1.41.0
|
|
||||||
env: TARGET=x86_64-unknown-linux-gnu
|
|
||||||
- os: linux
|
|
||||||
rust: 1.41.0
|
|
||||||
env: TARGET=x86_64-unknown-linux-musl
|
|
||||||
- os: linux
|
|
||||||
rust: 1.41.0
|
|
||||||
env: TARGET=arm-unknown-linux-gnueabihf GCC_VERSION=4.8
|
|
||||||
addons:
|
|
||||||
apt:
|
|
||||||
packages:
|
|
||||||
- gcc-4.8-arm-linux-gnueabihf
|
|
||||||
- binutils-arm-linux-gnueabihf
|
|
||||||
- libc6-armhf-cross
|
|
||||||
- libc6-dev-armhf-cross
|
|
||||||
# For generating man page.
|
|
||||||
- libxslt1-dev
|
|
||||||
- asciidoc
|
|
||||||
- docbook-xsl
|
|
||||||
- xsltproc
|
|
||||||
- libxml2-utils
|
|
||||||
install: ci/install.sh
|
|
||||||
script: ci/script.sh
|
|
||||||
before_deploy: ci/before_deploy.sh
|
|
||||||
deploy:
|
|
||||||
provider: releases
|
|
||||||
file_glob: true
|
|
||||||
file: deployment/${PROJECT_NAME}-${TRAVIS_TAG}-${TARGET}.tar.gz
|
|
||||||
skip_cleanup: true
|
|
||||||
on:
|
|
||||||
condition: $TRAVIS_RUST_VERSION = nightly
|
|
||||||
branch: master # i guess we do need this after all?
|
|
||||||
tags: true
|
|
||||||
api_key:
|
|
||||||
secure: "IbSnsbGkxSydR/sozOf1/SRvHplzwRUHzcTjM7BKnr7GccL86gRPUrsrvD103KjQUGWIc1TnK1YTq5M0Onswg/ORDjqa1JEJPkPdPnVh9ipbF7M2De/7IlB4X4qXLKoApn8+bx2x/mfYXu4G+G1/2QdbaKK2yfXZKyjz0YFx+6CNrVCT2Nk8q7aHvOOzAL58vsG8iPDpupuhxlMDDn/UhyOWVInmPPQ0iJR1ZUJN8xJwXvKvBbfp3AhaBiAzkhXHNLgBR8QC5noWWMXnuVDMY3k4f3ic0V+p/qGUCN/nhptuceLxKFicMCYObSZeUzE5RAI0/OBW7l3z2iCoc+TbAnn+JrX/ObJCfzgAOXAU3tLaBFMiqQPGFKjKg1ltSYXomOFP/F7zALjpvFp4lYTBajRR+O3dqaxA9UQuRjw27vOeUpMcga4ZzL4VXFHzrxZKBHN//XIGjYAVhJ1NSSeGpeJV5/+jYzzWKfwSagRxQyVCzMooYFFXzn8Yxdm3PJlmp3GaAogNkdB9qKcrEvRINCelalzALPi0hD/HUDi8DD2PNTCLLMo6VSYtvc685Zbe+KgNzDV1YyTrRCUW6JotrS0r2ULLwnsh40hSB//nNv3XmwNmC/CmW5QAnIGj8cBMF4S2t6ohADIndojdAfNiptmaZOIT6owK7bWMgPMyopo="
|
|
||||||
branches:
|
|
||||||
only:
|
|
||||||
# Pushes and PR to the master branch
|
|
||||||
- master
|
|
||||||
# Ruby regex to match tags. Required, or travis won't trigger deploys when
|
|
||||||
# a new tag is pushed.
|
|
||||||
- /^\d+\.\d+\.\d+.*$/
|
|
||||||
notifications:
|
|
||||||
email:
|
|
||||||
on_success: never
|
|
82
appveyor.yml
82
appveyor.yml
@ -1,82 +0,0 @@
|
|||||||
cache:
|
|
||||||
- c:\cargo\registry
|
|
||||||
- c:\cargo\git
|
|
||||||
|
|
||||||
init:
|
|
||||||
- mkdir c:\cargo
|
|
||||||
- mkdir c:\rustup
|
|
||||||
- SET PATH=c:\cargo\bin;%PATH%
|
|
||||||
|
|
||||||
clone_folder: c:\projects\ripgrep
|
|
||||||
|
|
||||||
environment:
|
|
||||||
CARGO_HOME: "c:\\cargo"
|
|
||||||
RUSTUP_HOME: "c:\\rustup"
|
|
||||||
CARGO_TARGET_DIR: "c:\\projects\\ripgrep\\target"
|
|
||||||
global:
|
|
||||||
PROJECT_NAME: ripgrep
|
|
||||||
RUST_BACKTRACE: full
|
|
||||||
matrix:
|
|
||||||
- TARGET: x86_64-pc-windows-gnu
|
|
||||||
CHANNEL: stable
|
|
||||||
BITS: 64
|
|
||||||
MSYS2: 1
|
|
||||||
- TARGET: x86_64-pc-windows-msvc
|
|
||||||
CHANNEL: stable
|
|
||||||
BITS: 64
|
|
||||||
- TARGET: i686-pc-windows-gnu
|
|
||||||
CHANNEL: stable
|
|
||||||
BITS: 32
|
|
||||||
MSYS2: 1
|
|
||||||
- TARGET: i686-pc-windows-msvc
|
|
||||||
CHANNEL: stable
|
|
||||||
BITS: 32
|
|
||||||
|
|
||||||
matrix:
|
|
||||||
fast_finish: true
|
|
||||||
|
|
||||||
# Install Rust and Cargo
|
|
||||||
# (Based on from https://github.com/rust-lang/libc/blob/master/appveyor.yml)
|
|
||||||
install:
|
|
||||||
- curl -sSf -o rustup-init.exe https://win.rustup.rs/
|
|
||||||
- rustup-init.exe -y --default-host %TARGET%
|
|
||||||
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
|
|
||||||
- if defined MSYS2 set PATH=C:\msys64\mingw%BITS%\bin;%PATH%
|
|
||||||
- rustc -V
|
|
||||||
- cargo -V
|
|
||||||
|
|
||||||
# Hack to work around a harmless warning in Appveyor builds?
|
|
||||||
build: false
|
|
||||||
|
|
||||||
# Equivalent to Travis' `script` phase
|
|
||||||
test_script:
|
|
||||||
- echo done
|
|
||||||
# - cargo test --verbose --all --features pcre2
|
|
||||||
|
|
||||||
before_deploy:
|
|
||||||
# Generate artifacts for release
|
|
||||||
- cargo build --release --features pcre2
|
|
||||||
- mkdir staging
|
|
||||||
- copy target\release\rg.exe staging
|
|
||||||
- ps: copy target\release\build\ripgrep-*\out\_rg.ps1 staging
|
|
||||||
- cd staging
|
|
||||||
# release zipfile will look like 'ripgrep-1.2.3-x86_64-pc-windows-msvc'
|
|
||||||
- 7z a ../%PROJECT_NAME%-%APPVEYOR_REPO_TAG_NAME%-%TARGET%.zip *
|
|
||||||
- appveyor PushArtifact ../%PROJECT_NAME%-%APPVEYOR_REPO_TAG_NAME%-%TARGET%.zip
|
|
||||||
|
|
||||||
deploy:
|
|
||||||
description: 'Automatically deployed release'
|
|
||||||
# All the zipped artifacts will be deployed
|
|
||||||
artifact: /.*\.zip/
|
|
||||||
auth_token:
|
|
||||||
secure: vv4vBCEosGlyQjaEC1+kraP2P6O4CQSa+Tw50oHWFTGcmuXxaWS0/yEXbxsIRLpw
|
|
||||||
provider: GitHub
|
|
||||||
# deploy when a new tag is pushed and only on the stable channel
|
|
||||||
on:
|
|
||||||
CHANNEL: stable
|
|
||||||
appveyor_repo_tag: true
|
|
||||||
|
|
||||||
branches:
|
|
||||||
only:
|
|
||||||
- /^\d+\.\d+\.\d+$/
|
|
||||||
- master
|
|
@ -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
|
|
@ -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
|
|
60
ci/script.sh
60
ci/script.sh
@ -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
|
|
Loading…
x
Reference in New Issue
Block a user