1
0
mirror of https://github.com/BurntSushi/ripgrep.git synced 2025-03-17 20:28:03 +02:00

Speeding CI builds

This commit is contained in:
Lilian A. Moraru 2017-12-19 01:04:49 +02:00 committed by Andrew Gallant
parent 162e085b98
commit 636bbc7c8f
6 changed files with 31 additions and 23 deletions

View File

@ -1,4 +1,5 @@
language: rust
cache: cargo
env:
global:
@ -12,6 +13,7 @@ addons:
- zsh
matrix:
fast_finish: true
include:
# Nightly channel.
# (All *nix releases are done on the nightly channel to take advantage

View File

@ -29,6 +29,9 @@ name = "rg"
name = "integration"
path = "tests/tests.rs"
[workspace]
members = [ "grep", "globset", "ignore", "termcolor", "wincolor" ]
[dependencies]
atty = "0.2.2"
bytecount = "0.2"

View File

@ -1,4 +1,20 @@
# Inspired from https://github.com/habitat-sh/habitat/blob/master/appveyor.yml
cache:
- c:\cargo\registry
- c:\cargo\git
- c:\projects\ripgrep\target
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
@ -12,12 +28,14 @@ environment:
- TARGET: x86_64-pc-windows-msvc
CHANNEL: stable
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
- rustup-init.exe -y --default-host %TARGET% --no-modify-path
- if defined MSYS2_BITS set PATH=%PATH%;C:\msys64\mingw%MSYS2_BITS%\bin
- rustc -V
- cargo -V
@ -28,12 +46,7 @@ build: false
# Equivalent to Travis' `script` phase
# TODO modify this phase as you see fit
test_script:
- cargo test --verbose
- cargo test --verbose --manifest-path grep/Cargo.toml
- cargo test --verbose --manifest-path globset/Cargo.toml
- cargo test --verbose --manifest-path ignore/Cargo.toml
- cargo test --verbose --manifest-path wincolor/Cargo.toml
- cargo test --verbose --manifest-path termcolor/Cargo.toml
- cargo test --verbose --all
before_deploy:
# Generate artifacts for release

View File

@ -4,9 +4,6 @@ set -ex
. $(dirname $0)/utils.sh
# "." - dot is for the current directory(ripgrep itself)
components=( . grep globset ignore termcolor )
# NOTE Workaround for rust-lang/rust#31907 - disable doc tests when cross compiling
# This has been fixed in the nightly channel but it would take a while to reach the other channels
disable_cross_doctests() {
@ -18,18 +15,11 @@ disable_cross_doctests() {
fi
}
run_cargo() {
for component in "${components[@]}"; do
cargo "${1:?}" --target $TARGET --verbose --manifest-path "${component}/Cargo.toml"
done
}
main() {
# disable_cross_doctests
run_cargo clean
run_cargo build
cargo build --target "${TARGET}" --verbose --all
if [ "$(architecture)" = "amd64" ] || [ "$(architecture)" = "i386" ]; then
run_cargo test
cargo test --target "${TARGET}" --verbose --all
"$( dirname "${0}" )/test_complete.sh"
fi

View File

@ -33,6 +33,3 @@ tempdir = "0.3.5"
[features]
simd-accel = ["globset/simd-accel"]
[profile.release]
debug = true

View File

@ -8,6 +8,8 @@ Note that on non-Windows platforms, this crate is empty but will compile.
# Example
```no_run
# #[cfg(windows)]
# {
use wincolor::{Console, Color, Intense};
let mut con = Console::stdout().unwrap();
@ -15,6 +17,7 @@ con.fg(Intense::Yes, Color::Cyan).unwrap();
println!("This text will be intense cyan.");
con.reset().unwrap();
println!("This text will be normal.");
# }
```
*/