stake/.travis.yml

59 lines
2.4 KiB
YAML
Raw Permalink Normal View History

2021-03-11 07:31:15 -08:00
dist: bionic
language: rust
rust:
2021-04-06 19:57:05 -07:00
- stable
2021-03-11 07:31:15 -08:00
env:
2021-04-06 19:57:05 -07:00
global:
- NODE_VERSION="v14.7.0"
2021-04-24 17:04:29 -07:00
- SOLANA_VERSION="v1.6.6"
2021-07-08 13:30:52 -07:00
- ANCHOR_VERSION="0.4.4"
2021-03-11 07:31:15 -08:00
before_deploy:
2021-08-29 10:38:56 -07:00
- cargo install --git https://github.com/project-serum/anchor --tag v${ANCHOR_VERSION} anchor-cli --locked
2021-03-11 07:31:15 -08:00
- anchor build --verifiable
- echo "### SHA256 Checksums" > release_notes.md
- sha256sum target/deploy/lockup.so > lockup_binary.txt
- sha256sum target/idl/lockup.json > lockup_idl.txt
- sha256sum target/deploy/registry.so > registry_binary.txt
- sha256sum target/idl/registry.json > registry_idl.txt
- cat *.txt >> release_notes.md
2021-04-06 19:57:05 -07:00
- echo "" >> release_notes.md
2021-07-08 13:30:52 -07:00
- echo "Built with Anchor [v${ANCHOR_VERSION}](https://github.com/project-serum/anchor/releases/tag/v${ANCHOR_VERSION})." >> release_notes.md
2021-03-11 07:31:15 -08:00
deploy:
provider: releases
edge: true
file:
- "target/deploy/lockup.so"
- "target/deploy/registry.so"
- "target/idl/lockup.json"
- "target/idl/registry.json"
release_notes_file: release_notes.md
skip_cleanup: true
on:
tags: true
api_key:
2021-03-13 10:55:47 -08:00
secure: "bUOLIYpmDzlEbtre7yrKoW5pjY1b/aEGtJ9K0MuSknEMCqohJAsdIz8m9aTgEZvsXRhdUBVpBL3rRbNEOe03Qo57s/Er27WQjjhg2aaxNoVyoTXdgl5eAVyFlFN2EsNPeZpWQr5KG6fvdJ+s/0v5pXA9Whx8DovKCDnCyL995wHSFP9kziB/PJIaSFOBeVLXePfUSHy8HN3RVSAQo1QZRsSwcv5/Y0vgBYZLZEpt7qcr4Z9VyUXYLfcPltJg7zvflhh41x+AKdQa3NJSpK0DOPPxaipEGtceUz43E3WrzsKcuv/e2xxf5gj8Ct8L2qwYqzh5byxLM3K+UP6GJwf4HruvtrUUU0w25GtXSjDyujPktELrDjQqcosMQ7+88V90bkpxSl7Kv4KMgpTslLYXuGl0+isT9KUfmnX+vyzp3nhzY67FRE9RyT1W6Ng+4AVI5Dz7r+3GazSyKLBJFCcmoZ6Oh1PGwjnolTHiPiSW6706O4yzSfE+qpaQLiZRlWpo5t8xDh4PAZ2kLyhu7EolZrQTToybepFoPWlV4LBQwtCuo8VoMBpSseJ4wBqv9W7BcSl8+keyhcFhhVHyZc2GvxLwYx2AA1BfQGJG8JbKt7fYbo0WjaPY002GFe08fKIdf/yYr4lHNG60XSc6jfeDioYtsDF47fbfk4nhTKGsGAQ="
2021-03-11 07:31:15 -08:00
_defaults: &defaults
before_install:
- nvm install $NODE_VERSION
- npm install -g mocha
2021-07-08 13:30:52 -07:00
- npm install -g @project-serum/anchor@${ANCHOR_VERSION}
2021-03-11 07:31:15 -08:00
- 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
2021-04-06 19:57:05 -07:00
- sh -c "$(curl -sSfL https://release.solana.com/${SOLANA_VERSION}/install)"
2021-03-11 07:31:15 -08:00
- export PATH="/home/travis/.local/share/solana/install/active_release/bin:$PATH"
2021-04-06 19:57:05 -07:00
- export NODE_PATH="/home/travis/.nvm/versions/node/${NODE_VERSION}/lib/node_modules/:${NODE_PATH}"
2021-03-11 07:31:15 -08:00
- yes | solana-keygen new
2021-08-27 20:04:18 -07:00
- yarn
2021-03-11 07:31:15 -08:00
jobs:
include:
- <<: *defaults
name: Runs the tests
script:
2021-08-27 20:04:18 -07:00
- yarn test