Skip to content

Commit

Permalink
Add matrix build for mysql
Browse files Browse the repository at this point in the history
Signed-off-by: Morgan Tocker <[email protected]>
  • Loading branch information
morgo committed Dec 12, 2019
1 parent d696751 commit bf22c2a
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ on: [push, pull_request]
jobs:

build:
name: Build
runs-on: ubuntu-latest
steps:
strategy:
matrix:
name: [mysql57, mysql80, mariadb101]

steps:
- name: Set up Go
uses: actions/setup-go@v1
with:
Expand All @@ -18,7 +20,24 @@ jobs:
- name: Get dependencies
run: |
sudo apt-get update
sudo apt-get install -y mysql-server mysql-client make unzip g++ etcd curl git wget ant openjdk-8-jdk
if [ ${{matrix.name}} = "mysql57" ]; then
sudo apt-get install -y mysql-server mysql-client
elif [ ${{matrix.name}} = "mysql80" ]; then
sudo apt-get remove -y mysql-server mysql-client
sudo rm -rf /var/lib/mysql
wget -c https://dev.mysql.com/get/mysql-apt-config_0.8.14-1_all.deb
echo mysql-apt-config mysql-apt-config/select-server select mysql-8.0 | sudo debconf-set-selections
sudo DEBIAN_FRONTEND="noninteractive" dpkg -i mysql-apt-config*
sudo apt-get update
sudo DEBIAN_FRONTEND="noninteractive" apt-get install -y mysql-server mysql-client
elif [ ${{matrix.name}} = "mariadb101" ]; then
sudo apt-get remove -y mysql-server mysql-client
sudo apt install -y mariadb-server mariadb-client
sudo bash -c "echo '/usr/sbin/mysqld { }' > /etc/apparmor.d/usr.sbin.mysqld" # https://bugs.launchpad.net/ubuntu/+source/mariadb-10.1/+bug/1806263
fi
sudo apt-get install -y make unzip g++ etcd curl git wget ant openjdk-8-jdk
sudo service mysql stop
sudo service etcd stop
sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/
Expand Down

0 comments on commit bf22c2a

Please sign in to comment.