From 4a9e9f842d9a1ef0f469c446055f0171dd6e84cc Mon Sep 17 00:00:00 2001 From: Morgan Tocker Date: Thu, 23 Mar 2023 13:45:50 -0600 Subject: [PATCH 1/2] Add 5.7.12 to CI --- .github/workflows/mysql57.yml | 2 +- .github/workflows/mysql5712.yml | 22 ++++++++++++++++++++++ .github/workflows/mysql8.0.23.yml | 2 +- .github/workflows/mysql8.yml | 2 +- scripts/dbdeployer_install_5712.sh | 20 ++++++++++++++++++++ 5 files changed, 45 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/mysql5712.yml create mode 100755 scripts/dbdeployer_install_5712.sh diff --git a/.github/workflows/mysql57.yml b/.github/workflows/mysql57.yml index f00db14a..7053b8be 100644 --- a/.github/workflows/mysql57.yml +++ b/.github/workflows/mysql57.yml @@ -13,7 +13,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.19 + go-version: 1.20 - name: Deploy MySQL run: scripts/dbdeployer_install_57.sh diff --git a/.github/workflows/mysql5712.yml b/.github/workflows/mysql5712.yml new file mode 100644 index 00000000..fc7201ee --- /dev/null +++ b/.github/workflows/mysql5712.yml @@ -0,0 +1,22 @@ +name: MySQL 5.7.12 (Aurora version) +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.20 + + - name: Deploy MySQL + run: scripts/dbdeployer_install_5712.sh + + - name: Test + run: MYSQL_DSN="msandbox:msandbox@tcp(127.0.0.1:5712)/test" go test -v ./... diff --git a/.github/workflows/mysql8.0.23.yml b/.github/workflows/mysql8.0.23.yml index e3fd96ec..3ea98d7b 100644 --- a/.github/workflows/mysql8.0.23.yml +++ b/.github/workflows/mysql8.0.23.yml @@ -13,7 +13,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.19 + go-version: 1.20 - name: Deploy MySQL run: scripts/dbdeployer_install_8023.sh diff --git a/.github/workflows/mysql8.yml b/.github/workflows/mysql8.yml index de2c29f7..9ea866a9 100644 --- a/.github/workflows/mysql8.yml +++ b/.github/workflows/mysql8.yml @@ -13,7 +13,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.19 + go-version: 1.20 - name: Deploy MySQL run: scripts/dbdeployer_install_8.sh diff --git a/scripts/dbdeployer_install_5712.sh b/scripts/dbdeployer_install_5712.sh new file mode 100755 index 00000000..940b45c9 --- /dev/null +++ b/scripts/dbdeployer_install_5712.sh @@ -0,0 +1,20 @@ +#!/bin/bash +set -xe + +sudo apt install -y libncurses5 + +go install github.com/datacharmer/dbdeployer@latest + +dbdeployer init + +wget https://downloads.mysql.com/archives/get/p/23/file/mysql-5.7.12-linux-glibc2.5-x86_64.tar.gz +dbdeployer unpack mysql-5.7.12-linux-glibc2.5-x86_64.tar.gz +dbdeployer deploy single 5.7.12 + +# For spirit to work, binary logging must be enabled. +# It is not by default in MySQL 5.7 + +echo "log-bin" >> ~/sandboxes/msb_5_7_12/my.sandbox.cnf +echo "server-id=123" >> ~/sandboxes/msb_5_7_12/my.sandbox.cnf + +~/sandboxes/msb_5_7_12/restart From 43a863b8773e3397e50665ae9280bf6a3e1780fd Mon Sep 17 00:00:00 2001 From: Morgan Tocker Date: Thu, 23 Mar 2023 13:50:01 -0600 Subject: [PATCH 2/2] rollback to golang 1.19 --- .github/workflows/mysql57.yml | 2 +- .github/workflows/mysql5712.yml | 2 +- .github/workflows/mysql8.0.23.yml | 2 +- .github/workflows/mysql8.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/mysql57.yml b/.github/workflows/mysql57.yml index 7053b8be..f00db14a 100644 --- a/.github/workflows/mysql57.yml +++ b/.github/workflows/mysql57.yml @@ -13,7 +13,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.20 + go-version: 1.19 - name: Deploy MySQL run: scripts/dbdeployer_install_57.sh diff --git a/.github/workflows/mysql5712.yml b/.github/workflows/mysql5712.yml index fc7201ee..0336ea04 100644 --- a/.github/workflows/mysql5712.yml +++ b/.github/workflows/mysql5712.yml @@ -13,7 +13,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.20 + go-version: 1.19 - name: Deploy MySQL run: scripts/dbdeployer_install_5712.sh diff --git a/.github/workflows/mysql8.0.23.yml b/.github/workflows/mysql8.0.23.yml index 3ea98d7b..e3fd96ec 100644 --- a/.github/workflows/mysql8.0.23.yml +++ b/.github/workflows/mysql8.0.23.yml @@ -13,7 +13,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.20 + go-version: 1.19 - name: Deploy MySQL run: scripts/dbdeployer_install_8023.sh diff --git a/.github/workflows/mysql8.yml b/.github/workflows/mysql8.yml index 9ea866a9..de2c29f7 100644 --- a/.github/workflows/mysql8.yml +++ b/.github/workflows/mysql8.yml @@ -13,7 +13,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.20 + go-version: 1.19 - name: Deploy MySQL run: scripts/dbdeployer_install_8.sh