2021-01-07 04:04:44 +08:00
|
|
|
dist: bionic
|
2021-01-07 03:52:09 +08:00
|
|
|
language: rust
|
2021-04-07 11:00:04 +08:00
|
|
|
rust:
|
|
|
|
- stable
|
2021-03-25 03:22:57 +08:00
|
|
|
cache: cargo
|
2021-01-07 03:52:09 +08:00
|
|
|
env:
|
2021-04-07 11:00:04 +08:00
|
|
|
global:
|
|
|
|
- NODE_VERSION="14.7.0"
|
2021-06-10 07:18:07 +08:00
|
|
|
- SOLANA_CLI_VERSION="1.7.1"
|
2021-04-29 05:08:53 +08:00
|
|
|
git:
|
|
|
|
submodules: true
|
2021-01-07 03:52:09 +08:00
|
|
|
|
|
|
|
_defaults: &defaults
|
|
|
|
before_install:
|
2021-06-28 08:09:46 +08:00
|
|
|
- rustup component add rustfmt clippy
|
2021-01-07 03:52:09 +08:00
|
|
|
- nvm install $NODE_VERSION
|
2021-01-30 22:45:24 +08:00
|
|
|
- sudo apt-get install -y pkg-config build-essential libudev-dev
|
2021-01-07 03:52:09 +08:00
|
|
|
|
2021-01-07 04:04:44 +08:00
|
|
|
_examples: &examples
|
|
|
|
before_install:
|
|
|
|
- nvm install $NODE_VERSION
|
|
|
|
- npm install -g mocha
|
2021-03-01 17:25:59 +08:00
|
|
|
- npm install -g ts-mocha
|
|
|
|
- npm install -g typescript
|
2021-05-17 14:43:50 +08:00
|
|
|
- npm install -g buffer
|
2021-04-18 03:07:48 +08:00
|
|
|
- cd ts && yarn && yarn build && npm link && cd ../
|
2021-01-16 11:16:17 +08:00
|
|
|
- npm install -g @project-serum/serum
|
|
|
|
- npm install -g @project-serum/common
|
|
|
|
- npm install -g @solana/spl-token
|
2021-01-07 04:04:44 +08:00
|
|
|
- sudo apt-get install -y pkg-config build-essential libudev-dev
|
2021-06-10 07:18:07 +08:00
|
|
|
- sh -c "$(curl -sSfL https://release.solana.com/v${SOLANA_CLI_VERSION}/install)"
|
2021-01-07 04:04:44 +08:00
|
|
|
- export PATH="/home/travis/.local/share/solana/install/active_release/bin:$PATH"
|
2021-06-10 07:18:07 +08:00
|
|
|
- export NODE_PATH="/home/travis/.nvm/versions/node/v${NODE_VERSION}/lib/node_modules/:$NODE_PATH"
|
2021-01-07 04:04:44 +08:00
|
|
|
- yes | solana-keygen new
|
2021-04-18 03:07:48 +08:00
|
|
|
- cargo install --path $TRAVIS_BUILD_DIR/cli anchor-cli --locked
|
2021-01-07 04:04:44 +08:00
|
|
|
|
2021-01-07 03:52:09 +08:00
|
|
|
jobs:
|
|
|
|
include:
|
|
|
|
- <<: *defaults
|
2021-01-07 04:04:44 +08:00
|
|
|
name: Build and test Rust
|
2021-01-07 03:52:09 +08:00
|
|
|
script:
|
|
|
|
- cargo build
|
|
|
|
- cargo fmt -- --check
|
2021-06-28 08:09:46 +08:00
|
|
|
- cargo clippy --all-targets -- -D warnings
|
2021-01-07 03:52:09 +08:00
|
|
|
- cargo test
|
2021-01-07 04:04:44 +08:00
|
|
|
- <<: *examples
|
2021-03-24 14:26:34 +08:00
|
|
|
name: Runs the examples 1
|
2021-01-07 04:04:44 +08:00
|
|
|
script:
|
2021-02-15 18:16:59 +08:00
|
|
|
- pushd client/example && ./run-test.sh && popd
|
2021-01-12 01:22:25 +08:00
|
|
|
- pushd examples/sysvars && anchor test && popd
|
2021-01-15 14:35:50 +08:00
|
|
|
- pushd examples/composite && anchor test && popd
|
2021-01-21 09:13:02 +08:00
|
|
|
- pushd examples/errors && anchor test && popd
|
2021-01-16 11:16:17 +08:00
|
|
|
- pushd examples/spl/token-proxy && anchor test && popd
|
2021-02-01 22:33:29 +08:00
|
|
|
- pushd examples/multisig && anchor test && popd
|
2021-02-07 23:45:10 +08:00
|
|
|
- pushd examples/interface && anchor test && popd
|
2021-02-09 23:40:10 +08:00
|
|
|
- pushd examples/lockup && anchor test && popd
|
2021-05-25 13:31:48 +08:00
|
|
|
- <<: *examples
|
|
|
|
name: Runs the examples 2
|
|
|
|
script:
|
2021-02-12 17:09:27 +08:00
|
|
|
- pushd examples/misc && anchor test && popd
|
2021-03-25 11:19:29 +08:00
|
|
|
- pushd examples/events && anchor test && popd
|
2021-02-13 00:50:20 +08:00
|
|
|
- pushd examples/cashiers-check && anchor test && popd
|
2021-03-31 14:14:15 +08:00
|
|
|
- pushd examples/typescript && yarn && anchor test && popd
|
2021-04-18 03:07:48 +08:00
|
|
|
- pushd examples/zero-copy && yarn && anchor test && popd
|
2021-04-19 03:56:25 +08:00
|
|
|
- pushd examples/chat && yarn && anchor test && popd
|
2021-04-24 02:09:28 +08:00
|
|
|
- pushd examples/ido-pool && yarn && anchor test && popd
|
2021-04-29 05:08:53 +08:00
|
|
|
- pushd examples/swap/deps/serum-dex/dex && cargo build-bpf && cd ../../../ && anchor test && popd
|
2021-06-28 04:17:05 +08:00
|
|
|
- pushd examples/cfo && anchor run test && popd
|
2021-05-25 13:31:48 +08:00
|
|
|
- <<: *examples
|
|
|
|
name: Runs the examples 3
|
|
|
|
script:
|
2021-06-23 11:03:57 +08:00
|
|
|
- pushd examples/escrow && yarn && anchor test && popd
|
2021-05-17 14:43:50 +08:00
|
|
|
- pushd examples/pyth && yarn && anchor test && popd
|
2021-01-07 04:04:44 +08:00
|
|
|
- pushd examples/tutorial/basic-0 && anchor test && popd
|
|
|
|
- pushd examples/tutorial/basic-1 && anchor test && popd
|
|
|
|
- pushd examples/tutorial/basic-2 && anchor test && popd
|
2021-01-15 07:21:51 +08:00
|
|
|
- pushd examples/tutorial/basic-3 && anchor test && popd
|
2021-01-22 22:16:48 +08:00
|
|
|
- pushd examples/tutorial/basic-4 && anchor test && popd
|
2021-04-21 00:40:05 +08:00
|
|
|
- pushd examples/tutorial/basic-5 && anchor test && popd
|