Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

w22 #3

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
154 changes: 121 additions & 33 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,3 @@
os:
- osx
- windows

language: rust
rust:
- stable

install:
- source ci/rust-version.sh

script:
- source ci/env.sh
- ci/publish-tarball.sh

branches:
only:
- master
Expand All @@ -23,21 +8,124 @@ notifications:
on_success: change
secure: F4IjOE05MyaMOdPRL+r8qhs7jBvv4yDM3RmFKE1zNXnfUOqV4X38oQM1EI+YVsgpMQLj/pxnEB7wcTE4Bf86N6moLssEULCpvAuMVoXj4QbWdomLX+01WbFa6fLVeNQIg45NHrz2XzVBhoKOrMNnl+QI5mbR2AlS5oqsudHsXDnyLzZtd4Y5SDMdYG1zVWM01+oNNjgNfjcCGmOE/K0CnOMl6GPi3X9C34tJ19P2XT7MTDsz1/IfEF7fro2Q8DHEYL9dchJMoisXSkem5z7IDQkGzXsWdWT4NnndUvmd1MlTCE9qgoXDqRf95Qh8sB1Dz08HtvgfaosP2XjtNTfDI9BBYS15Ibw9y7PchAJE1luteNjF35EOy6OgmCLw/YpnweqfuNViBZz+yOPWXVC0kxnPIXKZ1wyH9ibeH6E4hr7a8o9SV/6SiWIlbYF+IR9jPXyTCLP/cc3sYljPWxDnhWFwFdRVIi3PbVAhVu7uWtVUO17Oc9gtGPgs/GrhOMkJfwQPXaudRJDpVZowxTX4x9kefNotlMAMRgq+Drbmgt4eEBiCNp0ITWgh17BiE1U09WS3myuduhoct85+FoVeaUkp1sxzHVtGsNQH0hcz7WcpZyOM+AwistJA/qzeEDQao5zi1eKWPbO2xAhi2rV1bDH6bPf/4lDBwLRqSiwvlWU=

deploy:
- provider: s3
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
bucket: release.solana.com
region: us-west-1
skip_cleanup: true
acl: public_read
local_dir: travis-s3-upload
on:
all_branches: true
- provider: releases
api_key: $GITHUB_TOKEN
skip_cleanup: true
file_glob: true
file: travis-release-upload/*
on:
tags: true
os: linux
dist: bionic
language: rust

jobs:
include:
- &release-artifacts
if: type = push
name: "macOS release artifacts"
os: osx
rust:
- stable
install:
- source ci/rust-version.sh
script:
- source ci/env.sh
- ci/publish-tarball.sh
deploy:
- provider: s3
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
bucket: release.solana.com
region: us-west-1
skip_cleanup: true
acl: public_read
local_dir: travis-s3-upload
on:
all_branches: true
- provider: releases
token: $GITHUB_TOKEN
skip_cleanup: true
file_glob: true
file: travis-release-upload/*
on:
tags: true
- <<: *release-artifacts
name: "Linux release artifacts"
os: linux
before_install:
- sudo apt-get install libssl-dev libudev-dev
- <<: *release-artifacts
name: "Windows release artifacts"
os: windows

- name: "web3.js"
if: branch = master
language: node_js
node_js:
- "lts/*"

services:
- docker

cache:
directories:
- ~/.npm

before_install:
- .travis/affects.sh ^wwwwwwwwwweb3.js/ || travis_terminate 0
- wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
- sudo apt-add-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main"
- sudo apt-get update
- sudo apt-get install -y clang-7 --allow-unauthenticated
- sudo apt-get install -y openssl --allow-unauthenticated
- sudo apt-get install -y libssl-dev --allow-unauthenticated
- sudo apt-get install -y libssl1.1 --allow-unauthenticated
- clang-7 --version
- curl https://sh.rustup.rs -sSf | sh -s -- -y
- PATH=$HOME/.cargo/bin:$PATH
- rustup --version

script:
- if [[ $TRAVIS_PULL_REQUEST != false ]]; then npx commitlint-travis; fi
- ls -l lib
- test -r lib/index.iife.js
- test -r lib/index.cjs.js
- test -r lib/index.esm.js
- npm run doc
- npm run defs
- npm run flow
- npm run lint
- npm run codecov
- make -C examples/bpf-c-noop/
- examples/bpf-rust-noop/do.sh build
- npm run localnet:update
- npm run localnet:up
- npm run test:live
- npm run localnet:down

before_deploy:
- rm -rf deploy
- mkdir -p deploy
- cp -r doc deploy/solanaWeb3Api-$TRAVIS_BRANCH
- ls -l lib
- cp lib/index.iife.js deploy/solanaWeb3.min.js
- ( cd deploy; tar zcf solanaWeb3Api.tgz solanaWeb3Api-$TRAVIS_BRANCH )

deploy:
- provider: pages
skip_cleanup: true
token: $GITHUB_TOKEN
local_dir: doc
on:
branch: master
node_js: "lts/*"
- provider: script
skip_cleanup: true
script:
- npx semantic-release
on:
branch: master
node_js: "lts/*"
- provider: releases
skip_cleanup: true
file:
- deploy/solanaWeb3.min.js
- deploy/solanaWeb3Api.tgz
token: $GITHUB_TOKEN
on:
tags: true
node_js: "lts/*"
18 changes: 18 additions & 0 deletions .travis/affects.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env bash
#
# Checks if files in the commit range match a regex
#

(
set -x
git diff --name-only $TRAVIS_COMMIT_RANGE
)

for file in $(git diff --name-only $TRAVIS_COMMIT_RANGE); do
if [[ $file =~ ^"$1" ]]; then
exit 0
fi
done

echo "No modifications to $1"
exit 1