arnaucube
arnaucube/kestoPublic Self-hosted repository
kesto/babyjubjub-wasm-example/.travis.yml
babyjubjub-wasm-example/.travis.ymlRaw
 1language: rust
 2sudo: false
 3
 4cache: cargo
 5
 6matrix:
 7  include:
 8
 9  # Builds with wasm-pack.
10  - rust: beta
11    env: RUST_BACKTRACE=1
12    addons:
13      firefox: latest
14      chrome: stable
15    before_script:
16      - (test -x $HOME/.cargo/bin/cargo-install-update || cargo install cargo-update)
17      - (test -x $HOME/.cargo/bin/cargo-generate || cargo install --vers "^0.2" cargo-generate)
18      - cargo install-update -a
19      - curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh -s -- -f
20    script:
21      - cargo generate --git . --name testing
22      # Having a broken Cargo.toml (in that it has curlies in fields) anywhere
23      # in any of our parent dirs is problematic.
24      - mv Cargo.toml Cargo.toml.tmpl
25      - cd testing
26      - wasm-pack build
27      - wasm-pack test --chrome --firefox --headless
28
29  # Builds on nightly.
30  - rust: nightly
31    env: RUST_BACKTRACE=1
32    before_script:
33      - (test -x $HOME/.cargo/bin/cargo-install-update || cargo install cargo-update)
34      - (test -x $HOME/.cargo/bin/cargo-generate || cargo install --vers "^0.2" cargo-generate)
35      - cargo install-update -a
36      - rustup target add wasm32-unknown-unknown
37    script:
38      - cargo generate --git . --name testing
39      - mv Cargo.toml Cargo.toml.tmpl
40      - cd testing
41      - cargo check
42      - cargo check --target wasm32-unknown-unknown
43      - cargo check                                 --no-default-features
44      - cargo check --target wasm32-unknown-unknown --no-default-features
45      - cargo check                                 --no-default-features --features console_error_panic_hook
46      - cargo check --target wasm32-unknown-unknown --no-default-features --features console_error_panic_hook
47      - cargo check                                 --no-default-features --features "console_error_panic_hook wee_alloc"
48      - cargo check --target wasm32-unknown-unknown --no-default-features --features "console_error_panic_hook wee_alloc"
49
50  # Builds on beta.
51  - rust: beta
52    env: RUST_BACKTRACE=1
53    before_script:
54      - (test -x $HOME/.cargo/bin/cargo-install-update || cargo install cargo-update)
55      - (test -x $HOME/.cargo/bin/cargo-generate || cargo install --vers "^0.2" cargo-generate)
56      - cargo install-update -a
57      - rustup target add wasm32-unknown-unknown
58    script:
59      - cargo generate --git . --name testing
60      - mv Cargo.toml Cargo.toml.tmpl
61      - cd testing
62      - cargo check
63      - cargo check --target wasm32-unknown-unknown
64      - cargo check                                 --no-default-features
65      - cargo check --target wasm32-unknown-unknown --no-default-features
66      - cargo check                                 --no-default-features --features console_error_panic_hook
67      - cargo check --target wasm32-unknown-unknown --no-default-features --features console_error_panic_hook
68      # Note: no enabling the `wee_alloc` feature here because it requires
69      # nightly for now.