-
Notifications
You must be signed in to change notification settings - Fork 135
Refine CI #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Refine CI #22
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
cef9608
Refine CI
Hoverbear 5cb2812
Debug
Hoverbear c237b3e
debug
Hoverbear f966556
Update windows path
Hoverbear cf0159d
Correct switchdaemon
Hoverbear c955323
Nocapture
Hoverbear da18ef5
Merge before and script
Hoverbear 8873192
Try removing the travis cargo build cache
brson abcb28f
Install protoc
Hoverbear 10d09c2
Add some dependencies
Hoverbear 63b9a17
Try to get windows to detect environment properly
Hoverbear 58c1e84
Sudo is disabled on linux
Hoverbear 1c2b771
Add updated ubuntu package
Hoverbear 62f6706
Note why windows is disabled
Hoverbear 188d430
Correct pkg name
Hoverbear 1c5fab4
Add mac dependencies
Hoverbear 197fc73
Merge branch 'master' into refined-ci
Hoverbear 0f5bf04
Merge branch 'master' into refined-ci
Hoverbear 17d5345
Merge branch 'master' into refined-ci
Hoverbear 559e915
Resolve lint
Hoverbear d28adbd
Allow unused code in select places
Hoverbear 9e463ef
Merge branch 'refined-ci' of github.com:tikv/client-rust into refined-ci
Hoverbear c212a6b
fmt
Hoverbear 929dda1
Use raft 0.5.0 branch
Hoverbear 5a01eac
Remove AppVeyor, don't need it.
Hoverbear File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
---|---|---|
@@ -1,44 +1,47 @@ | ||
branches: | ||
only: | ||
# This is where pull requests from "bors r+" are built. | ||
- staging | ||
# This is where pull requests from "bors try" are built. | ||
- trying | ||
# Enable building pull requests. | ||
- master | ||
sudo: false | ||
|
||
language: rust | ||
sudo: false | ||
os: | ||
- linux | ||
# - windows # TODO: https://github.com/pingcap/kvproto/issues/355 | ||
- osx | ||
rust: | ||
- stable | ||
- nightly | ||
env: | ||
global: | ||
- RUST_BACKTRACE=1 | ||
- RUSTFLAGS="-D warnings" | ||
cache: cargo | ||
|
||
rust: | ||
os: | ||
- linux | ||
- windows | ||
- osx | ||
|
||
matrix: | ||
include: | ||
# This build uses stable and checks rustfmt and clippy. | ||
# We don't check them on nightly since their lints and formatting may differ. | ||
- rust: stable | ||
install: | ||
- rustup component add rustfmt-preview | ||
- rustup component add clippy-preview | ||
before_script: | ||
- cargo fmt --all -- --check | ||
- cargo clippy --all -- -D clippy | ||
# Since many users will use nightlies, also test that. | ||
- rust: nightly | ||
addons: | ||
apt: | ||
update: true | ||
sources: | ||
- sourceline: 'ppa:maarten-fonville/protobuf' | ||
packages: | ||
- protobuf-compiler | ||
homebrew: | ||
packages: | ||
- protobuf | ||
- cmake | ||
- go | ||
|
||
install: | ||
- if [[ $TRAVIS_RUST_VERSION == "stable" && $TRAVIS_OS_NAME == "linux" ]]; then rustup component add rustfmt; fi | ||
- if [[ $TRAVIS_RUST_VERSION == "stable" && $TRAVIS_OS_NAME == "linux" ]]; then rustup component add clippy; fi | ||
- if [[ $TRAVIS_OS_NAME == "windows" ]]; then choco install golang cmake strawberryperl protoc; fi | ||
- if [[ $TRAVIS_OS_NAME == "windows" ]]; then export PATH="$PATH:/c/Go/bin/:/c/Program Files/CMake/bin"; fi | ||
|
||
script: | ||
- docker run -d --net=host --name pd --rm pingcap/pd --name "pd" --data-dir "pd" --client-urls "http://127.0.0.1:2379" --advertise-client-urls "http://127.0.0.1:2379" | ||
- docker run -d --net=host --name kv --rm pingcap/tikv --pd-endpoints "127.0.0.1:2379" --addr "127.0.0.1:2378" --data-dir "kv" | ||
- if [[ $TRAVIS_RUST_VERSION == "stable" && $TRAVIS_OS_NAME == "linux" ]]; then cargo fmt -- --check; fi | ||
- if [[ $TRAVIS_RUST_VERSION == "stable" && $TRAVIS_OS_NAME == "linux" ]]; then cargo clippy -- -D clippy::all; fi | ||
- cargo test --all -- --nocapture | ||
# Validate benches still work. | ||
- cargo bench --all -- --test | ||
# For now we only run full integration tests on Linux. Here's why: | ||
# * Docker on OS X is not supported by Travis. | ||
# * Docker on Windows seems to not have the correct binary at `"/c/Program Files/Docker/Docker/DockerCli.exe" to switch it to Linux containers. | ||
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then docker run -d --net=host --name pd --rm pingcap/pd --name "pd" --data-dir "pd" --client-urls "http://127.0.0.1:2379" --advertise-client-urls "http://127.0.0.1:2379"; fi | ||
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then docker run -d --net=host --name kv --rm --ulimit nofile=90000:90000 pingcap/tikv --pd-endpoints "127.0.0.1:2379" --addr "127.0.0.1:2378" --data-dir "kv"; fi | ||
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then docker ps; fi | ||
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then docker logs pd; fi | ||
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then docker logs kv; fi | ||
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then PD_ADDR="127.0.0.1:2379" cargo test --all --features integration-tests -- --nocapture; fi |
This file contains hidden or 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 was deleted.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,25 @@ | ||
// Copyright 2019 The TiKV Project Authors | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
mod raw; | ||
|
||
use std::env::var; | ||
const ENV_PD_ADDR: &str = "PD_ADDR"; | ||
|
||
pub fn pd_addr() -> Vec<String> { | ||
var(ENV_PD_ADDR) | ||
.expect(&format!("Expected {}:", ENV_PD_ADDR)) | ||
.split(",") | ||
.map(From::from) | ||
.collect() | ||
} |
This file contains hidden or 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 hidden or 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,15 @@ | ||
// Copyright 2019 The TiKV Project Authors | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
#[cfg(feature = "integration-tests")] | ||
mod integration_tests; |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.