Skip to content

Commit ad01f59

Browse files
ekexiumandylokandy
andauthored
Use TiUP to start cluster in CI (#296)
* CI: use tiup instead of docker Signed-off-by: ekexium <[email protected]> * Update config/tikv.toml Signed-off-by: Andy Lok <[email protected]> Co-authored-by: Andy Lok <[email protected]>
1 parent 8602cdb commit ad01f59

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

.travis.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ install:
3333
- if [[ $TRAVIS_OS_NAME == "linux" && $TRAVIS_RUST_VERSION == "stable" ]]; then rustup component add clippy; fi
3434
- if [[ $TRAVIS_OS_NAME == "windows" ]]; then choco install golang cmake strawberryperl protoc; fi
3535
- if [[ $TRAVIS_OS_NAME == "windows" ]]; then export PATH="$PATH:/c/Go/bin/:/c/Program Files/CMake/bin"; fi
36+
- if [[ $TRAVIS_OS_NAME == "linux" && $TRAVIS_RUST_VERSION == "nightly" ]]; then curl --proto '=https' --tlsv1.2 -sSf https://tiup-mirrors.pingcap.com/install.sh | sh; fi
3637

3738
before_script:
3839
- eval "$(gimme stable)"
@@ -45,14 +46,8 @@ script:
4546
- cargo build --examples
4647
- if [[ $TRAVIS_OS_NAME == "linux" && $TRAVIS_RUST_VERSION == "nightly" ]]; then make doc; fi
4748
- if [[ $TRAVIS_RUST_VERSION == "nightly" ]]; then cargo test --all -- --nocapture; fi
48-
# For now we only run full integration tests on Linux. Here's why:
49-
# * Docker on OS X is not supported by Travis.
50-
# * Docker on Windows seems to not have the correct binary at `"/c/Program Files/Docker/Docker/DockerCli.exe" to switch it to Linux containers.
51-
- if [[ $TRAVIS_OS_NAME == "linux" && $TRAVIS_RUST_VERSION == "nightly" ]]; then make docker-pd; fi
52-
- if [[ $TRAVIS_OS_NAME == "linux" && $TRAVIS_RUST_VERSION == "nightly" ]]; then make docker-kv; fi
53-
- if [[ $TRAVIS_OS_NAME == "linux" && $TRAVIS_RUST_VERSION == "nightly" ]]; then docker ps; fi
54-
- if [[ $TRAVIS_OS_NAME == "linux" && $TRAVIS_RUST_VERSION == "nightly" ]]; then docker logs pd; fi
55-
- if [[ $TRAVIS_OS_NAME == "linux" && $TRAVIS_RUST_VERSION == "nightly" ]]; then docker logs kv; fi
49+
- if [[ $TRAVIS_OS_NAME == "linux" && $TRAVIS_RUST_VERSION == "nightly" ]]; then source /home/travis/.bash_profile; fi
50+
- if [[ $TRAVIS_OS_NAME == "linux" && $TRAVIS_RUST_VERSION == "nightly" ]]; then make tiup; fi
5651
- if [[ $TRAVIS_OS_NAME == "linux" && $TRAVIS_RUST_VERSION == "nightly" ]]; then sleep 60; fi
5752
- if [[ $TRAVIS_OS_NAME == "linux" && $TRAVIS_RUST_VERSION == "nightly" ]]; then MULTI_REGION=1 make integration-test; fi
5853
- if [[ $TRAVIS_OS_NAME == "linux" && $TRAVIS_RUST_VERSION == "nightly" ]]; then cargo run --example raw -- --pd="127.0.0.1:2379"; fi

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,7 @@ docker-kv:
2929

3030
docker: docker-pd docker-kv
3131

32+
tiup:
33+
tiup playground nightly --db 0 --tiflash 0 --monitor false --kv.config $(shell pwd)/config/tikv.toml --pd.config $(shell pwd)/config/pd.toml &
34+
3235
all: check doc test

config/tikv.toml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,10 @@ batch-split-limit = 100
77
region-split-check-diff = "0KB"
88
pd-heartbeat-tick-interval = "2s"
99
pd-store-heartbeat-tick-interval = "5s"
10-
split-region-check-tick-interval = "1s"
10+
split-region-check-tick-interval = "1s"
11+
12+
[rocksdb]
13+
max-open-files = 10000
14+
15+
[raftdb]
16+
max-open-files = 10000

0 commit comments

Comments
 (0)