From ad8fabffbe6306c48ef8fc1ad4b6451f8931c5c1 Mon Sep 17 00:00:00 2001 From: tobil4sk Date: Mon, 14 Feb 2022 12:57:23 +0000 Subject: [PATCH] Fix ci (attempt) (#982) * [ci] Update mac environment * [ci] Delete mysql directory before install * [ci] Validate mariadb setup script * [ci] Avoid upgrade --- azure-pipelines.yml | 2 +- tools/azure-pipelines/build.yml | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c766161d3..e1755ebd0 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -25,7 +25,7 @@ stages: - template: tools/azure-pipelines/build.yml parameters: name: Mac - vmImage: macOS-10.14 + vmImage: macOS-10.15 platform: mac arch: 64 - template: tools/azure-pipelines/build.yml diff --git a/tools/azure-pipelines/build.yml b/tools/azure-pipelines/build.yml index bb1ab2a3e..9a5beed5e 100644 --- a/tools/azure-pipelines/build.yml +++ b/tools/azure-pipelines/build.yml @@ -24,10 +24,13 @@ jobs: - ${{ if startsWith(parameters.vmImage, 'ubuntu-') }}: - script: | set -ex + sudo rm -R /var/lib/mysql/ # mariadb - curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash + curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup > mariadb_repo_setup + curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup.sha256 > mariadb_repo_setup.sha256 + sha256sum --check mariadb_repo_setup.sha256 + sudo bash mariadb_repo_setup sudo apt-get update -qqy - sudo apt-get upgrade -qqy sudo apt-get remove -qqy mysql-common sudo apt-get autoremove -qqy sudo apt-get install -qqy mariadb-server @@ -35,6 +38,7 @@ jobs: sudo apt-get install -qqy gcc-multilib g++-multilib displayName: Install dependencies - script: | + set -ex sudo systemctl start mysql sudo mysql -u root -e "create database hxcpp; grant all privileges on hxcpp.* to hxcpp@localhost identified by 'hxcpp'; flush privileges;" displayName: Configure MariaDB