From 5a3b71283f00e376f9502474939156c3dd6fac95 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 27 Jun 2022 17:31:05 +0800 Subject: [PATCH] =?UTF-8?q?mysql=20=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/python-app-mysql8.yml | 39 +++++++++++++++++++++++++++++++++ plugins/mysql/versions/5.5/install.sh | 7 +++++- plugins/mysql/versions/5.6/install.sh | 7 +++++- plugins/mysql/versions/5.7/install.sh | 6 ++++- plugins/mysql/versions/8.0/install.sh | 6 ++++- 5 files changed, 61 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/python-app-mysql8.yml diff --git a/.github/workflows/python-app-mysql8.yml b/.github/workflows/python-app-mysql8.yml new file mode 100644 index 000000000..0206c4b35 --- /dev/null +++ b/.github/workflows/python-app-mysql8.yml @@ -0,0 +1,39 @@ +# This workflow will install Python dependencies, run tests and lint with a single version of Python +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions + +name: MW APP MySQL80 + +on: + push: + branches: [ "master","dev" ] + pull_request: + branches: [ "master","dev" ] + +permissions: + contents: read + +jobs: + build: + strategy: + matrix: + os: [ubuntu-latest] + runs-on: ${{ matrix.os }} + #runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.10 + uses: actions/setup-python@v3 + with: + python-version: "3.10" + - name: Install MW + run: | + sudo bash scripts/install_dev.sh + - name: Install MySQL80 + run: | + SYS_MAKEJN="-j12" + cd /www/server/mdserver-web/plugins/mysql && sudo bash install.sh install 8.0 + - name: Start DEBUG + run: | + gunicorn -c setting.py app:app + python3 task.py & diff --git a/plugins/mysql/versions/5.5/install.sh b/plugins/mysql/versions/5.5/install.sh index 6dd37f166..5fd0f9463 100755 --- a/plugins/mysql/versions/5.5/install.sh +++ b/plugins/mysql/versions/5.5/install.sh @@ -14,6 +14,11 @@ sysName=`uname` install_tmp=${rootPath}/tmp/mw_install.pl mysqlDir=${serverPath}/source/mysql + +# 加快测试速度 For Github Action +MAKEJN='${SYS_MAKEJN:+"-j2"}' +echo "SYS_MAKEJN:$MAKEJN" + Install_mysql() { mkdir -p ${mysqlDir} @@ -57,7 +62,7 @@ Install_mysql() -DDEFAULT_COLLATION=utf8mb4_general_ci \ -DCMAKE_C_COMPILER=/usr/bin/gcc \ -DCMAKE_CXX_COMPILER=/usr/bin/g++ \ - && make && make install && make clean + && make $MAKEJN && make install && make clean if [ -d $serverPath/mysql ];then echo '5.5' > $serverPath/mysql/version.pl diff --git a/plugins/mysql/versions/5.6/install.sh b/plugins/mysql/versions/5.6/install.sh index fe0e391ce..45478edb9 100755 --- a/plugins/mysql/versions/5.6/install.sh +++ b/plugins/mysql/versions/5.6/install.sh @@ -17,6 +17,11 @@ sysName=`uname` install_tmp=${rootPath}/tmp/mw_install.pl mysqlDir=${serverPath}/source/mysql + +# 加快测试速度 For Github Action +MAKEJN='${SYS_MAKEJN:+"-j2"}' +echo "SYS_MAKEJN:$MAKEJN" + Install_mysql() { mkdir -p ${mysqlDir} @@ -61,7 +66,7 @@ Install_mysql() -DCMAKE_C_COMPILER=/usr/bin/gcc \ -DCMAKE_CXX_COMPILER=/usr/bin/g++ \ -DDEFAULT_COLLATION=utf8mb4_general_ci \ - && make && make install && make clean + && make $MAKEJN && make install && make clean if [ -d $serverPath/mysql ];then diff --git a/plugins/mysql/versions/5.7/install.sh b/plugins/mysql/versions/5.7/install.sh index bda6db4c2..6c0e2227b 100755 --- a/plugins/mysql/versions/5.7/install.sh +++ b/plugins/mysql/versions/5.7/install.sh @@ -19,6 +19,10 @@ mysqlDir=${serverPath}/source/mysql VERSION="5.7.37" +# 加快测试速度 For Github Action +MAKEJN='${SYS_MAKEJN:+"-j2"}' +echo "SYS_MAKEJN:$MAKEJN" + Install_mysql() { mkdir -p ${mysqlDir} @@ -77,7 +81,7 @@ Install_mysql() -DCMAKE_C_COMPILER=/usr/bin/gcc \ -DCMAKE_CXX_COMPILER=/usr/bin/g++ \ -DWITH_BOOST=${mysqlDir}/mysql-${VERSION}/boost/ - make && make install && make clean + make $MAKEJN && make install && make clean echo '5.7' > $serverPath/mysql/version.pl echo '安装完成' > $install_tmp fi diff --git a/plugins/mysql/versions/8.0/install.sh b/plugins/mysql/versions/8.0/install.sh index a3f3535f6..15a7b157f 100755 --- a/plugins/mysql/versions/8.0/install.sh +++ b/plugins/mysql/versions/8.0/install.sh @@ -17,6 +17,10 @@ sysName=`uname` install_tmp=${rootPath}/tmp/mw_install.pl mysqlDir=${serverPath}/source/mysql +# 加快测试速度 For Github Action +MAKEJN='${SYS_MAKEJN:+"-j2"}' +echo "SYS_MAKEJN:$MAKEJN" + Install_mysql() { mkdir -p ${mysqlDir} @@ -79,7 +83,7 @@ Install_mysql() -DCMAKE_C_COMPILER=/usr/bin/gcc \ -DCMAKE_CXX_COMPILER=/usr/bin/g++ \ -DWITH_BOOST=${mysqlDir}/mysql-8.0.25/boost/ - make && make install && make clean + make $MAKEJN && make install && make clean if [ -d $serverPath/mysql ];then echo '8.0' > $serverPath/mysql/version.pl