mirror of https://github.com/rwf2/Rocket.git
Cache Cargo in Travis.
This commit is contained in:
parent
a29d56c52e
commit
4595338a39
|
@ -1,4 +1,5 @@
|
||||||
language: rust
|
language: rust
|
||||||
|
cache: cargo
|
||||||
rust:
|
rust:
|
||||||
- nightly
|
- nightly
|
||||||
script: ./scripts/test.sh
|
script: ./scripts/test.sh
|
||||||
|
|
|
@ -3,10 +3,12 @@
|
||||||
SCRIPT_PATH=$(cd "$(dirname "$0")" ; pwd -P)
|
SCRIPT_PATH=$(cd "$(dirname "$0")" ; pwd -P)
|
||||||
DATABASE_URL=${SCRIPT_PATH}/db/db.sql
|
DATABASE_URL=${SCRIPT_PATH}/db/db.sql
|
||||||
|
|
||||||
pushd $SCRIPT_PATH
|
pushd $SCRIPT_PATH > /dev/null
|
||||||
# install the diesel CLI tools
|
# install the diesel CLI tools if they're not installed
|
||||||
|
if ! command -v diesel >/dev/null 2>&1; then
|
||||||
cargo install diesel_cli
|
cargo install diesel_cli
|
||||||
|
fi
|
||||||
|
|
||||||
# create db/db.sql
|
# create db/db.sql
|
||||||
diesel migration --database-url=$DATABASE_URL run
|
diesel migration --database-url=$DATABASE_URL run
|
||||||
popd $SCRIPT_PATH
|
popd $SCRIPT_PATH > /dev/null
|
||||||
|
|
|
@ -46,6 +46,9 @@ function check_versions_match() {
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Update dependencies first.
|
||||||
|
cargo update
|
||||||
|
|
||||||
build_and_test "${LIB_DIR}"
|
build_and_test "${LIB_DIR}"
|
||||||
build_and_test "${CODEGEN_DIR}"
|
build_and_test "${CODEGEN_DIR}"
|
||||||
build_and_test "${CONTRIB_DIR}"
|
build_and_test "${CONTRIB_DIR}"
|
||||||
|
|
Loading…
Reference in New Issue