Skip to content

Commit

Permalink
Travis CI updates for MySQL 5.6 and 8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sodabrew committed Oct 21, 2016
1 parent 68e9d1b commit 1df20eb
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 17 deletions.
58 changes: 41 additions & 17 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,19 @@ language: ruby
bundler_args: --without benchmarks development
# Pin Rubygems to a working version. Sometimes it breaks upstream. Update now and then.
before_install:
- gem update --system 2.6.4
- gem --version
- gem update --system 2.6.7
- gem update bundler
- gem --version
- bash .travis_setup.sh
addons:
hosts:
- mysql2gem.example.com
apt:
packages:
- mysql-server-5.5
- mysql-client-core-5.5
- mysql-client-5.5
- mysql-server-5.6
- mysql-client-core-5.6
- mysql-client-5.6
rvm:
- 2.4.0-preview2
- 2.3.1
Expand All @@ -27,10 +29,26 @@ matrix:
include:
- rvm: 1.8.7
dist: precise
env: SPEC_OPTS="--order rand:11"
addons:
hosts:
- mysql2gem.example.com
apt:
packages:
- mysql-server-5.5
- mysql-client-core-5.5
- mysql-client-5.5
- rvm: ree
dist: precise
- rvm: rbx-2
dist: precise
env: SPEC_OPTS="--order rand:11"
addons:
hosts:
- mysql2gem.example.com
apt:
packages:
- mysql-server-5.5
- mysql-client-core-5.5
- mysql-client-5.5
- rvm: 2.0.0
env: DB=mariadb55
addons:
Expand All @@ -50,28 +68,34 @@ matrix:
hosts:
- mysql2gem.example.com
- rvm: 2.0.0
env: DB=mysql56
env: DB=mysql55
addons:
hosts:
- mysql2gem.example.com
apt:
packages:
- mysql-server-5.6
- mysql-client-core-5.6
- mysql-client-5.6
- mysql-server-5.5
- mysql-client-core-5.5
- mysql-client-5.5
- rvm: 2.0.0
env: DB=mysql57
addons:
hosts:
- mysql2gem.example.com
# https://github.com/travis-ci/travis-ci/issues/5122
# apt:
# packages:
# - mysql-server-5.7
# - mysql-client-core-5.7
# - mysql-client-5.7
- rvm: 2.0.0
env: DB=mysql55
env: DB=mysql80
addons:
hosts:
- mysql2gem.example.com
- rvm: 2.0.0
env: DB=mysql56
os: osx
addons:
hosts:
- mysql2gem.example.com
fast_finish: true
allow_failures:
- rvm: ruby-head
- rvm: 2.0.0
env: DB=mysql56
os: osx
12 changes: 12 additions & 0 deletions .travis_mysql80.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash

set -eux

apt-get purge -qq '^mysql*' '^libmysql*'
apt-key adv --keyserver pgp.mit.edu --recv-keys 5072E1F5
add-apt-repository 'deb http://repo.mysql.com/apt/ubuntu/ trusty mysql-8.0'
apt-get update -qq
apt-get install -qq mysql-server libmysqlclient-dev

# https://www.percona.com/blog/2016/03/16/change-user-password-in-mysql-5-7-with-plugin-auth_socket/
mysql -u root -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY ''"
5 changes: 5 additions & 0 deletions .travis_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ if [[ -n ${DB-} && x$DB =~ ^xmysql57 ]]; then
sudo bash .travis_mysql57.sh
fi

# Install MySQL 8.0 if DB=mysql80
if [[ -n ${DB-} && x$DB =~ ^xmysql80 ]]; then
sudo bash .travis_mysql80.sh
fi

# Install MySQL if OS=darwin
if [[ x$OSTYPE =~ ^xdarwin ]]; then
brew update
Expand Down

0 comments on commit 1df20eb

Please sign in to comment.