forked from coral-xyz/anchor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
76 lines (73 loc) · 2.77 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
dist: bionic
language: rust
rust:
- stable
cache: cargo
env:
global:
- NODE_VERSION="14.7.0"
git:
submodules: true
_defaults: &defaults
before_install:
- rustup component add rustfmt
- nvm install $NODE_VERSION
- sudo apt-get install -y pkg-config build-essential libudev-dev
_examples: &examples
before_install:
- nvm install $NODE_VERSION
- npm install -g mocha
- npm install -g ts-mocha
- npm install -g typescript
- cd ts && yarn && yarn build && npm link && cd ../
- npm install -g @project-serum/serum
- npm install -g @project-serum/common
- npm install -g @solana/spl-token
- sudo apt-get install -y pkg-config build-essential libudev-dev
- sh -c "$(curl -sSfL https://release.solana.com/v1.6.3/install)"
- export PATH="/home/travis/.local/share/solana/install/active_release/bin:$PATH"
- export NODE_PATH="/home/travis/.nvm/versions/node/v$NODE_VERSION/lib/node_modules/:$NODE_PATH"
- yes | solana-keygen new
- cargo install --path $TRAVIS_BUILD_DIR/cli anchor-cli --locked
jobs:
include:
- <<: *defaults
name: Build and test Rust
script:
- cargo build
- cargo fmt -- --check
- cargo test
- <<: *defaults
name: Build and test TypeScript
script:
- cd ts
- yarn
- yarn build
- <<: *examples
name: Runs the examples 1
script:
- pushd client/example && ./run-test.sh && popd
- pushd examples/sysvars && anchor test && popd
- pushd examples/composite && anchor test && popd
- pushd examples/errors && anchor test && popd
- pushd examples/spl/token-proxy && anchor test && popd
- pushd examples/multisig && anchor test && popd
- pushd examples/interface && anchor test && popd
- pushd examples/lockup && anchor test && popd
- pushd examples/misc && anchor test && popd
- pushd examples/events && anchor test && popd
- pushd examples/cashiers-check && anchor test && popd
- pushd examples/typescript && yarn && anchor test && popd
- pushd examples/zero-copy && yarn && anchor test && popd
- <<: *examples
name: Runs the examples 2
script:
- pushd examples/chat && yarn && anchor test && popd
- pushd examples/ido-pool && yarn && anchor test && popd
- pushd examples/swap/deps/serum-dex/dex && cargo build-bpf && cd ../../../ && anchor test && popd
- pushd examples/tutorial/basic-0 && anchor test && popd
- pushd examples/tutorial/basic-1 && anchor test && popd
- pushd examples/tutorial/basic-2 && anchor test && popd
- pushd examples/tutorial/basic-3 && anchor test && popd
- pushd examples/tutorial/basic-4 && anchor test && popd
- pushd examples/tutorial/basic-5 && anchor test && popd