mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Test MySQL centrally in fancy
This commit is contained in:
parent
f5d59e8719
commit
04594397ca
14
.github/workflows/build.yaml
vendored
14
.github/workflows/build.yaml
vendored
|
@ -63,7 +63,17 @@ jobs:
|
||||||
- name: Prepare Linux (fancy)
|
- name: Prepare Linux (fancy)
|
||||||
if: contains(matrix.os, 'ubuntu') && matrix.fancy
|
if: contains(matrix.os, 'ubuntu') && matrix.fancy
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get install libmariadbclient-dev libwebsockets-dev -y
|
sudo apt-get install libmariadbclient-dev libwebsockets-dev mariadb-server -y
|
||||||
|
sudo rm -rf /var/lib/mysql/
|
||||||
|
sudo mysql_install_db --user=mysql --datadir=/var/lib/mysql/
|
||||||
|
cd /usr; sudo /usr/bin/mysqld_safe --datadir='/var/lib/mysql/' --no-watch
|
||||||
|
sleep 10
|
||||||
|
sudo mariadb <<EOF
|
||||||
|
CREATE DATABASE ddnet;
|
||||||
|
CREATE USER 'ddnet'@'localhost' IDENTIFIED BY 'thebestpassword';
|
||||||
|
GRANT ALL PRIVILEGES ON ddnet.* TO 'ddnet'@'localhost';
|
||||||
|
FLUSH PRIVILEGES;
|
||||||
|
EOF
|
||||||
|
|
||||||
- name: Prepare macOS
|
- name: Prepare macOS
|
||||||
if: contains(matrix.os, 'macOS')
|
if: contains(matrix.os, 'macOS')
|
||||||
|
@ -120,7 +130,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
mkdir fancy
|
mkdir fancy
|
||||||
cd fancy
|
cd fancy
|
||||||
${{ matrix.cmake-path }}cmake ${{ matrix.cmake-args }} -DCMAKE_BUILD_TYPE=RelWithDebInfo -DANTIBOT=ON -DMYSQL=ON -DWEBSOCKETS=ON ..
|
${{ matrix.cmake-path }}cmake ${{ matrix.cmake-args }} -DCMAKE_BUILD_TYPE=RelWithDebInfo -DANTIBOT=ON -DMYSQL=ON -DWEBSOCKETS=ON -DMYSQL=ON ..
|
||||||
${{ matrix.cmake-path }}cmake --build . --config RelWithDebInfo --target everything ${{ matrix.build-args }}
|
${{ matrix.cmake-path }}cmake --build . --config RelWithDebInfo --target everything ${{ matrix.build-args }}
|
||||||
- name: Test fancy
|
- name: Test fancy
|
||||||
if: matrix.fancy
|
if: matrix.fancy
|
||||||
|
|
|
@ -8,6 +8,12 @@
|
||||||
#include <sqlite3.h>
|
#include <sqlite3.h>
|
||||||
|
|
||||||
#if defined(CONF_MYSQL)
|
#if defined(CONF_MYSQL)
|
||||||
|
|
||||||
|
// For MySQL this setup is required on localhost:
|
||||||
|
// CREATE DATABASE ddnet;
|
||||||
|
// CREATE USER 'ddnet'@'localhost' IDENTIFIED BY 'thebestpassword';
|
||||||
|
// GRANT ALL PRIVILEGES ON ddnet.* TO 'ddnet'@'localhost';
|
||||||
|
// FLUSH PRIVILEGES;
|
||||||
int DummyMysqlInit = (MysqlInit(), 1);
|
int DummyMysqlInit = (MysqlInit(), 1);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue