mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Try adding mysql to github workflow in ubuntu 20.04
Remove my_bool, has been removed in MySQL 8.0
This commit is contained in:
parent
a8b842277a
commit
ae1c63f33d
24
.github/workflows/build.yaml
vendored
24
.github/workflows/build.yaml
vendored
|
@ -25,7 +25,7 @@ jobs:
|
||||||
CXXFLAGS: -Werror
|
CXXFLAGS: -Werror
|
||||||
- os: ubuntu-20.04
|
- os: ubuntu-20.04
|
||||||
cmake-path: /usr/bin/
|
cmake-path: /usr/bin/
|
||||||
cmake-args: -G Ninja
|
cmake-args: -G Ninja -DTEST_MYSQL=ON
|
||||||
package-file: "*-linux_x86_64.tar.xz"
|
package-file: "*-linux_x86_64.tar.xz"
|
||||||
fancy: false
|
fancy: false
|
||||||
env:
|
env:
|
||||||
|
@ -60,15 +60,31 @@ jobs:
|
||||||
sudo apt-get upgrade -y
|
sudo apt-get upgrade -y
|
||||||
sudo apt-get install pkg-config cmake ninja-build libfreetype6-dev libnotify-dev libsdl2-dev libsqlite3-dev libvulkan-dev glslang-tools spirv-tools libavcodec-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev libx264-dev -y
|
sudo apt-get install pkg-config cmake ninja-build libfreetype6-dev libnotify-dev libsdl2-dev libsqlite3-dev libvulkan-dev glslang-tools spirv-tools libavcodec-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev libx264-dev -y
|
||||||
|
|
||||||
|
- name: Prepare Linux (non-fancy)
|
||||||
|
if: ${{ contains(matrix.os, 'ubuntu') && !matrix.fancy }}
|
||||||
|
run: |
|
||||||
|
sudo rm -rf /var/lib/mysql/ /var/run/mysqld
|
||||||
|
sudo mkdir /var/lib/mysql/ /var/run/mysqld/
|
||||||
|
sudo chown mysql:mysql /var/lib/mysql/ /var/run/mysqld/
|
||||||
|
sudo mysqld --initialize-insecure --user=mysql --basedir=/usr --datadir=/var/lib/mysql/
|
||||||
|
sudo /usr/bin/mysqld_safe --basedir=/usr --datadir='/var/lib/mysql/' &
|
||||||
|
sleep 10
|
||||||
|
sudo mysql <<EOF
|
||||||
|
CREATE DATABASE ddnet;
|
||||||
|
CREATE USER 'ddnet'@'localhost' IDENTIFIED BY 'thebestpassword';
|
||||||
|
GRANT ALL PRIVILEGES ON ddnet.* TO 'ddnet'@'localhost';
|
||||||
|
FLUSH PRIVILEGES;
|
||||||
|
EOF
|
||||||
|
|
||||||
- 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 mariadb-server-10.3 -y
|
sudo apt-get install libmariadbclient-dev libwebsockets-dev mariadb-server-10.3 -y
|
||||||
sudo rm -rf /var/lib/mysql/
|
sudo rm -rf /var/lib/mysql/
|
||||||
sudo mysql_install_db --user=mysql --datadir=/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
|
cd /usr; sudo mysqld_safe --datadir='/var/lib/mysql/' --no-watch
|
||||||
sleep 10
|
sleep 10
|
||||||
sudo mariadb <<EOF
|
sudo mysql <<EOF
|
||||||
CREATE DATABASE ddnet;
|
CREATE DATABASE ddnet;
|
||||||
CREATE USER 'ddnet'@'localhost' IDENTIFIED BY 'thebestpassword';
|
CREATE USER 'ddnet'@'localhost' IDENTIFIED BY 'thebestpassword';
|
||||||
GRANT ALL PRIVILEGES ON ddnet.* TO 'ddnet'@'localhost';
|
GRANT ALL PRIVILEGES ON ddnet.* TO 'ddnet'@'localhost';
|
||||||
|
@ -141,7 +157,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
mkdir fancy
|
mkdir fancy
|
||||||
cd fancy
|
cd fancy
|
||||||
${{ matrix.cmake-path }}cmake ${{ matrix.cmake-args }} -DCMAKE_BUILD_TYPE=RelWithDebInfo -DDOWNLOAD_GTEST=ON -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE=. -DANTIBOT=ON -DTEST_MYSQL=ON -DWEBSOCKETS=ON ..
|
${{ matrix.cmake-path }}cmake ${{ matrix.cmake-args }} -DCMAKE_BUILD_TYPE=RelWithDebInfo -DDOWNLOAD_GTEST=ON -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE=. -DANTIBOT=ON -DWEBSOCKETS=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
|
||||||
|
|
|
@ -10,6 +10,10 @@
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#ifndef LIBMARIADB
|
||||||
|
typedef bool my_bool;
|
||||||
|
#endif
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
MYSQLSTATE_UNINITIALIZED,
|
MYSQLSTATE_UNINITIALIZED,
|
||||||
|
|
Loading…
Reference in a new issue