helix/.travis.yml

97 lines
3.0 KiB
YAML
Raw Normal View History

2017-03-07 21:57:29 +00:00
os:
- linux
- osx
dist: trusty # For linux
2017-04-24 17:27:11 +00:00
addons:
apt:
packages:
- g++-mingw-w64 # For dlltool
2017-02-24 23:43:52 +00:00
language: ruby
rvm:
- 2.4.0
cache:
2017-02-25 00:41:31 +00:00
directories:
- $HOME/.rvm/gems
- $HOME/.cargo
2017-03-18 04:31:04 +00:00
- $HOME/.multirust
2017-02-24 23:43:52 +00:00
env:
2017-03-03 20:51:31 +00:00
global:
2018-06-16 03:48:29 +00:00
- EXAMPLES="unit calculator console duration docopt game_of_life geometry json_builder membership text_transform turbo_blank"
2017-03-03 20:51:31 +00:00
- VERBOSE=true
2017-03-18 04:07:22 +00:00
- RUST_BACKTRACE=1
2017-05-03 18:51:06 +00:00
- RUST_VERSION=stable
2017-02-24 23:43:52 +00:00
matrix:
include:
- os: linux
env: RUST_VERSION=nightly
allow_failures:
- env: RUST_VERSION=nightly
2017-02-24 23:43:52 +00:00
before_install:
2017-04-24 17:27:11 +00:00
# If we've got a tag, we also want to test the release
- if [ ! -z "$TRAVIS_TAG" ]; then export TEST_RELEASE=1; fi
# This only works on Linux
- if [[ "$TRAVIS_OS_NAME" != "linux" ]]; then unset TEST_RELEASE; fi
# Only try to release on stable
# FIXME: There should be a better way of doing this
- if [[ "$RUST_VERSION" != "stable" ]]; then unset TEST_RELEASE; fi
2017-04-24 17:27:11 +00:00
# Install Rust
- if [ ! -e "$HOME/.cargo/bin" ]; then curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain $RUST_VERSION -y; fi
2017-02-24 23:43:52 +00:00
- export PATH="$HOME/.cargo/bin:$PATH"
- rustup default $RUST_VERSION
2019-07-30 17:52:19 +00:00
- gem install bundler
2017-02-24 23:43:52 +00:00
install:
2017-03-03 20:51:31 +00:00
- ./scripts/ci-install
2017-02-24 23:43:52 +00:00
2017-04-24 17:27:11 +00:00
script: |
if [ -z "$TEST_RELEASE" ]; then
# Run regular tests if we're not testing the release
rake
else
set -e
./scripts/test-release
# Release if we're also tagged
if [ ! -z "$TRAVIS_TAG" ]; then
2017-04-26 15:27:00 +00:00
# Set up Cargo and Rubygems credentials
cargo login $CARGO_TOKEN
2017-04-26 18:10:40 +00:00
2017-04-26 18:21:38 +00:00
mkdir -p ~/.gem
2017-04-26 18:43:39 +00:00
echo -e "---\n:rubygems_api_key: $RUBYGEMS_TOKEN" > ~/.gem/credentials
2017-04-26 18:10:40 +00:00
chmod 0600 ~/.gem/credentials
2017-04-26 15:27:00 +00:00
2017-04-26 18:10:40 +00:00
echo -e "Publishing helix_runtime gem...\n"
2017-04-24 17:27:11 +00:00
pushd ruby
2017-04-26 16:52:15 +00:00
gem build helix_runtime.gemspec
gem push helix_runtime-*.gem
2017-04-24 17:27:11 +00:00
popd
2017-04-26 18:10:40 +00:00
echo -e "Publishing libcruby-sys crate...\n"
# need to do this since there's a .gitignore with *.lib files
# there's a bug in Cargo, where include isn't overriding exclude
rm -rf .git
2017-04-24 17:27:11 +00:00
pushd crates/libcruby-sys
HELIX_LIB_DIR=$PWD cargo publish
popd
2017-04-26 18:10:40 +00:00
echo -e "Publishing helix crate...\n"
2017-04-24 17:27:11 +00:00
cargo publish
fi
fi
2017-03-15 03:16:30 +00:00
notifications:
slack:
rooms:
- secure: "EeBBy+QWPtj20Dh0dw9MrIiul6kmVb7YrAqaf8VzpujD8BctasqoPx8VEefHZbBYnzDo8+/yerNorwczU7w5SmSXPvYgTCpUe3eKMgbLNBDBkLhp7L5WMO6YWdlsBpOT+i7lpImqecxTasMcTeMTMPoljtkaZdF+6+kh0dPntGMXsJlh8WWipFHH08anbTz4Ll8R9kta54r9yT2YDp0LSBKC+C2mW6ll6yvRwHZMbLi3c+DzR1mqCIljmeNTIqVm0+Er34Jj8lKOL8dYhyB8TncmxlDdbpzA9R8rJ8GczwvUJOkY3IREvY0eZh1T8JZ4yZZucIq1VgukgMo8rWjMBxq5jJjHpO/EmcyGPvvNnrkg5/Jy/2zDPpdqLvAieD5DReGUEkXcyPjNC2o0K6HAMQnloO2qVRwWIsuvwPu/EK9CFtSebZYSA1cDbQsvAyQ8c4S8nxYOy5YiZwJoD55N051p6ehTGe0gPDn254GwDMEmPEpH4xP/TmYEMzMFqjeSpOKPHNKRqrTmM7dff5yQnRdcm8o2t5GABf29uRkbao0fJa5kVQkVchbzo7U0mfguMGCSMJWM9yMp+mJ8dlz5WitsbGx0Bimu2ZnjOQ5YdQaJWQnCX1Rf+DwqGEipI3ii+l9xeg1VKfZi9Geckn9cF8yaw/y5A/EuvQOKmeOQ7qQ="
on_pull_requests: false
2017-03-17 22:00:43 +00:00
on_success: change
on_failure: always