diff --git a/.ci/azure-pipelines/install-environment_linux.bash b/.ci/azure-pipelines/install-environment_linux.bash index 5cf71c0c093..987774112e6 100755 --- a/.ci/azure-pipelines/install-environment_linux.bash +++ b/.ci/azure-pipelines/install-environment_linux.bash @@ -15,3 +15,27 @@ sudo apt-get -y install build-essential g++-multilib ninja-build pkg-config \ libogg-dev libsndfile1-dev libopus-dev libspeechd-dev \ libavahi-compat-libdnssd-dev libzeroc-ice-dev \ zsync appstream libpoco-dev + + + +# Setup MySQL and PostgreSQL databases for the Mumble tests +echo "Configuring MySQL..." + +echo -e "[mysqld]\nlog-bin-trust-function-creators = 1" | sudo tee -a /etc/mysql/my.cnf + +sudo systemctl enable mysql.service +sudo systemctl start mysql.service + +echo "CREATE DATABASE mumble_test_db; "\ + "CREATE USER 'mumble_test_user'@'localhost' IDENTIFIED BY 'MumbleTestPassword'; "\ + "GRANT ALL PRIVILEGES ON mumble_test_db.* TO 'mumble_test_user'@'localhost';" | sudo mysql --user=root --password="root" + + +echo "Configuring PostgreSQL..." + +sudo systemctl enable postgresql.service +sudo systemctl start postgresql.service + +echo "CREATE DATABASE mumble_test_db; "\ + "CREATE USER mumble_test_user ENCRYPTED PASSWORD 'MumbleTestPassword'; "\ + "GRANT ALL PRIVILEGES ON DATABASE mumble_test_db TO mumble_test_user;" | sudo -u postgres psql diff --git a/.ci/azure-pipelines/install-environment_macos.bash b/.ci/azure-pipelines/install-environment_macos.bash index 8633858b9cf..071f828df85 100755 --- a/.ci/azure-pipelines/install-environment_macos.bash +++ b/.ci/azure-pipelines/install-environment_macos.bash @@ -48,4 +48,25 @@ mkdir -p $MUMBLE_ENVIRONMENT_STORE chmod +x "$MUMBLE_ENVIRONMENT_PATH/installed/$MUMBLE_ENVIRONMENT_TRIPLET/tools/Ice/slice2cpp" -ls -l $MUMBLE_ENVIRONMENT_STORE + +# Setup MySQL and PostgreSQL databases for the Mumble tests +echo "Configuring MySQL..." +brew install mysql + +mysql --help + +echo -e "[mysqld]\nlog-bin-trust-function-creators = 1" | sudo tee -a /etc/mysql/my.cnf + +echo "CREATE DATABASE mumble_test_db; "\ + "CREATE USER 'mumble_test_user'@'localhost' IDENTIFIED BY 'MumbleTestPassword'; "\ + "GRANT ALL PRIVILEGES ON mumble_test_db.* TO 'mumble_test_user'@'localhost';" | sudo mysql --user=root + + +echo "Configuring PostgreSQL..." + +sudo systemctl enable postgresql.service +sudo systemctl start postgresql.service + +echo "CREATE DATABASE mumble_test_db; "\ + "CREATE USER mumble_test_user ENCRYPTED PASSWORD 'MumbleTestPassword'; "\ + "GRANT ALL PRIVILEGES ON DATABASE mumble_test_db TO mumble_test_user;" | sudo -u postgres psql diff --git a/.ci/install-environment_windows.ps1 b/.ci/install-environment_windows.ps1 index 29b514fd463..641aa4d8449 100644 --- a/.ci/install-environment_windows.ps1 +++ b/.ci/install-environment_windows.ps1 @@ -128,3 +128,17 @@ Invoke-Command 7z x "WixSharp.7z" "-oC:/WixSharp" choco install vswhere Write-Host "Build environment successfully installed" + + +# Setup MySQL and PostgreSQL databases for the Mumble tests +Write-Host "Configuring MySQL..." +mysql --help +Write-Host "[mysqld]`nlog-bin-trust-function-creators = 1" #| sudo tee -a /etc/mysql/my.cnf + + +Write-Host "Configuring PostgreSQL..." +Start-Service -Name "postgresql-x64-14" + +Write-Output "CREATE DATABASE mumble_test_db; "\ + "CREATE USER mumble_test_user ENCRYPTED PASSWORD 'MumbleTestPassword'; "\ + "GRANT ALL PRIVILEGES ON DATABASE mumble_test_db TO mumble_test_user;" | psql --user "potsgres" --password "root"