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

Enable automatic snap build and release #781

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
108 changes: 75 additions & 33 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,79 @@
language: ruby
cache: bundler
matrix:
include:
- language: ruby
cache: bundler

os:
- linux
os:
- linux

rvm:
- jruby
- "2.4"
- "2.5"
- "2.6"
- "2.7"
rvm:
- jruby
- "2.4"
- "2.5"
- "2.6"
- "2.7"

jobs:
include:
- rvm: "2.3"
before_script:
- gem install faraday -v 1.0.1
- os: osx
rvm: "2.5"
- os: osx
rvm: "2.6"
jobs:
include:
- rvm: "2.3"
before_script:
- gem install faraday -v 1.0.1
- os: osx
rvm: "2.5"
- os: osx
rvm: "2.6"
- stage: deploy
if: repo = travis-ci/travis.rb and branch = master and type = push
os: linux
rvm: "2.6"
deploy:
provider: rubygems
api_key:
secure: KcBpkFaes74KGMm8X/rRA8e13+t3PmkefsAvOAR+iF4g1GyuLSPkP92Fb9vFfsXBph+qmFh5rNa2lIRf/3RXW6COxY7CMMaARxUfJOKE0rmIwF0qfKI+RZDh6abg92iYngunMZVN8WVft6Lv9ZTOYCWxr1Zs1Ll/Rl4PfvHNd1g=
gem: travis
edge: true

script:
- bundle exec rake
- gem build travis.gemspec
- gem install travis-*.gem

- language: shell
dist: xenial
os: linux

env:
global:
- LC_ALL: C.UTF-8
- LANG: C.UTF-8
- SNAPCRAFT_ENABLE_SILENT_REPORT: y
- SNAPCRAFT_BUILD_INFO: 1
- SNAPCRAFT_BUILD_ENVIRONMENT: 'lxd'

addons:
snaps:
- name: snapcraft
channel: stable
confinement: classic
- name: lxd
channel: stable

script:
- sudo usermod --append --groups lxd $USER
- sudo /snap/bin/lxd.migrate -yes
- sudo /snap/bin/lxd waitready
- sudo /snap/bin/lxd init --auto
- sg lxd -c snapcraft

after_failure:
- sudo journalctl -u snapd

- stage: deploy
if: repo = travis-ci/travis.rb and branch = master and type = push
os: linux
rvm: "2.6"
deploy:
provider: rubygems
api_key:
secure: KcBpkFaes74KGMm8X/rRA8e13+t3PmkefsAvOAR+iF4g1GyuLSPkP92Fb9vFfsXBph+qmFh5rNa2lIRf/3RXW6COxY7CMMaARxUfJOKE0rmIwF0qfKI+RZDh6abg92iYngunMZVN8WVft6Lv9ZTOYCWxr1Zs1Ll/Rl4PfvHNd1g=
gem: travis
edge: true

script:
- bundle exec rake
- gem build travis.gemspec
- gem install travis-*.gem
if: repo = travis-ci/travis.rb and branch = master and type = push
os: linux
deploy:
provider: snap
snap: travis_*.snap
channel: ${SNAP_DEPLOY_TRACK:-latest}/stable
cleanup: false
skip_cleanup: true