travis: Cache all example target dirs and breakup build jobs (#120)

This commit is contained in:
Armani Ferrante 2021-03-23 23:26:34 -07:00 committed by GitHub
parent cf1feafb06
commit 0a4eb05c68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 23 additions and 2 deletions

View File

@ -2,7 +2,25 @@ dist: bionic
language: rust language: rust
rust: rust:
- nightly - nightly
cache: cargo cache:
directories:
- $HOME/.cargo
- $TRAVIS_BUILD_DIR/target
- $TRAVIS_BUILD_DIR/client/example/target
- $TRAVIS_BUILD_DIR/examples/sysvars/target
- $TRAVIS_BUILD_DIR/examples/composite/target
- $TRAVIS_BUILD_DIR/examples/errors/target
- $TRAVIS_BUILD_DIR/examples/spl/token-proxy/target
- $TRAVIS_BUILD_DIR/examples/multisig/target
- $TRAVIS_BUILD_DIR/examples/interface/target
- $TRAVIS_BUILD_DIR/examples/lockup/target
- $TRAVIS_BUILD_DIR/examples/misc/target
- $TRAVIS_BUILD_DIR/examples/cashiers-check/target
- $TRAVIS_BUILD_DIR/examples/tutorial/basic-0/target
- $TRAVIS_BUILD_DIR/examples/tutorial/basic-1/target
- $TRAVIS_BUILD_DIR/examples/tutorial/basic-2/target
- $TRAVIS_BUILD_DIR/examples/tutorial/basic-3/target
- $TRAVIS_BUILD_DIR/examples/tutorial/basic-4/target
env: env:
- NODE_VERSION="14.7.0" - NODE_VERSION="14.7.0"
@ -44,7 +62,7 @@ jobs:
- yarn - yarn
- yarn build - yarn build
- <<: *examples - <<: *examples
name: Runs the examples name: Runs the examples 1
script: script:
- pushd client/example && ./run-test.sh && popd - pushd client/example && ./run-test.sh && popd
- pushd examples/sysvars && anchor test && popd - pushd examples/sysvars && anchor test && popd
@ -56,6 +74,9 @@ jobs:
- pushd examples/lockup && anchor test && popd - pushd examples/lockup && anchor test && popd
- pushd examples/misc && anchor test && popd - pushd examples/misc && anchor test && popd
- pushd examples/cashiers-check && anchor test && popd - pushd examples/cashiers-check && anchor test && popd
- <<: *examples
name: Runs the examples 2
script:
- pushd examples/tutorial/basic-0 && anchor test && popd - pushd examples/tutorial/basic-0 && anchor test && popd
- pushd examples/tutorial/basic-1 && anchor test && popd - pushd examples/tutorial/basic-1 && anchor test && popd
- pushd examples/tutorial/basic-2 && anchor test && popd - pushd examples/tutorial/basic-2 && anchor test && popd