mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-30 04:34:27 +00:00
ci: use Travis cache to reduce build time
This PR includes these changes: - use Rust installed by Travis - install x86_64-unknown-linux-musl - install rustfmt - use Travis cache - delete ci/install_vc.sh Fixes: #748 Signed-off-by: bin liu <bin@hyper.sh>
This commit is contained in:
parent
d4408807b4
commit
9e5a4b8b80
23
.travis.yml
23
.travis.yml
@ -5,8 +5,22 @@
|
||||
|
||||
dist: bionic
|
||||
os: linux
|
||||
language: go
|
||||
go: 1.14.4
|
||||
|
||||
# set cache directories manually, because
|
||||
# we are using a non-standard directory struct
|
||||
# cargo root is in srs/agent
|
||||
#
|
||||
# If needed, caches can be cleared
|
||||
# by ways documented in
|
||||
# https://docs.travis-ci.com/user/caching#clearing-caches
|
||||
language: rust
|
||||
rust:
|
||||
- 1.44.1
|
||||
cache:
|
||||
cargo: true
|
||||
directories:
|
||||
- src/agent/target
|
||||
|
||||
env:
|
||||
- target_branch=$TRAVIS_BRANCH
|
||||
- RUST_BACKTRACE=1
|
||||
@ -19,16 +33,17 @@ before_install:
|
||||
# we use install to run check agent
|
||||
# so that it is easy to skip for non-amd64 platform
|
||||
install:
|
||||
- "ci/install_rust.sh"
|
||||
- export PATH=$PATH:"$HOME/.cargo/bin"
|
||||
- export RUST_AGENT=yes
|
||||
- rustup target add x86_64-unknown-linux-musl
|
||||
- sudo ln -sf /usr/bin/g++ /bin/musl-g++
|
||||
- rustup component add rustfmt
|
||||
- make -C ${TRAVIS_BUILD_DIR}/src/agent
|
||||
- make -C ${TRAVIS_BUILD_DIR}/src/agent check
|
||||
- sudo -E PATH=$PATH make -C ${TRAVIS_BUILD_DIR}/src/agent check
|
||||
|
||||
before_script:
|
||||
- "ci/install_go.sh"
|
||||
- "ci/install_vc.sh"
|
||||
- make -C ${TRAVIS_BUILD_DIR}/src/runtime
|
||||
- make -C ${TRAVIS_BUILD_DIR}/src/runtime test
|
||||
- sudo -E PATH=$PATH GOPATH=$GOPATH make -C ${TRAVIS_BUILD_DIR}/src/runtime test
|
||||
|
Loading…
Reference in New Issue
Block a user