mirror of https://github.com/midoks/mdserver-web
commit
74034b246a
@ -1 +1,38 @@ |
||||
# 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 OpenResty |
||||
|
||||
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 OpenResty |
||||
run: | |
||||
cd /www/server/mdserver-web/plugins/openresty && sudo bash install.sh install 1.21.4.1 |
||||
- name: Start DEBUG |
||||
run: | |
||||
gunicorn -c setting.py app:app |
||||
python3 task.py & |
||||
|
@ -0,0 +1,68 @@ |
||||
# 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 PHP |
||||
|
||||
on: |
||||
push: |
||||
branches: [ "master" ] |
||||
pull_request: |
||||
branches: [ "master" ] |
||||
|
||||
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 PHP53 |
||||
run: | |
||||
cd /www/server/mdserver-web/plugins/php && sudo bash install.sh install 53 |
||||
- name: Install PHP54 |
||||
run: | |
||||
cd /www/server/mdserver-web/plugins/php && sudo bash install.sh install 54 |
||||
- name: Install PHP55 |
||||
run: | |
||||
cd /www/server/mdserver-web/plugins/php && sudo bash install.sh install 55 |
||||
- name: Install PHP56 |
||||
run: | |
||||
cd /www/server/mdserver-web/plugins/php && sudo bash install.sh install 56 |
||||
- name: Install PHP70 |
||||
run: | |
||||
cd /www/server/mdserver-web/plugins/php && sudo bash install.sh install 70 |
||||
- name: Install PHP71 |
||||
run: | |
||||
cd /www/server/mdserver-web/plugins/php && sudo bash install.sh install 71 |
||||
- name: Install PHP72 |
||||
run: | |
||||
cd /www/server/mdserver-web/plugins/php && sudo bash install.sh install 72 |
||||
- name: Install PHP73 |
||||
run: | |
||||
cd /www/server/mdserver-web/plugins/php && sudo bash install.sh install 73 |
||||
- name: Install PHP74 |
||||
run: | |
||||
cd /www/server/mdserver-web/plugins/php && sudo bash install.sh install 74 |
||||
- name: Install PHP80 |
||||
run: | |
||||
cd /www/server/mdserver-web/plugins/php && sudo bash install.sh install 80 |
||||
- name: Install PHP81 |
||||
run: | |
||||
cd /www/server/mdserver-web/plugins/php && sudo bash install.sh install 81 |
||||
- name: Start DEBUG |
||||
run: | |
||||
gunicorn -c setting.py app:app |
||||
python3 task.py & |
@ -1 +0,0 @@ |
||||
t.vvv |
@ -0,0 +1,107 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=gd |
||||
LIBV=0 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
ln -s /usr/lib64/libjpeg.so /usr/lib/libjpeg.so |
||||
ln -s /usr/lib64/libpng.so /usr/lib/ |
||||
cp -frp /usr/lib64/libldap* /usr/lib/ |
||||
|
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
if [ ! -d $sourcePath/php${version}/ext ];then |
||||
cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} |
||||
fi |
||||
|
||||
cd $sourcePath/php${version}/ext/${LIBNAME} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config \ |
||||
--with-gd \ |
||||
--with-jpeg-dir=/usr/lib \ |
||||
--with-freetype-dir=${serverPath}/lib/freetype_old \ |
||||
--enable-gd-native-ttf \ |
||||
--enable-gd-jis-conv |
||||
|
||||
make clean && make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
$serverPath/php/init.d/php${version} restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
$serverPath/php/init.d/php$version reload |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -0,0 +1,103 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=gd |
||||
LIBV=0 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
if [ ! -d $sourcePath/php${version}/ext ];then |
||||
cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} |
||||
fi |
||||
|
||||
cd $sourcePath/php${version}/ext/${LIBNAME} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config \ |
||||
--enable-gd \ |
||||
--with-webp \ |
||||
--with-xpm \ |
||||
--with-jpeg \ |
||||
--with-freetype \ |
||||
--enable-gd-jis-conv |
||||
|
||||
make clean && make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
$serverPath/php/init.d/php${version} restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
$serverPath/php/init.d/php$version reload |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -0,0 +1,103 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=gd |
||||
LIBV=0 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
if [ ! -d $sourcePath/php${version}/ext ];then |
||||
cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} |
||||
fi |
||||
|
||||
cd $sourcePath/php${version}/ext/${LIBNAME} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config \ |
||||
--enable-gd \ |
||||
--with-webp \ |
||||
--with-xpm \ |
||||
--with-jpeg \ |
||||
--with-freetype \ |
||||
--enable-gd-jis-conv |
||||
|
||||
make clean && make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
$serverPath/php/init.d/php${version} restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
$serverPath/php/init.d/php$version reload |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
@ -0,0 +1,103 @@ |
||||
#!/bin/bash |
||||
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin |
||||
export PATH |
||||
|
||||
curPath=`pwd` |
||||
|
||||
rootPath=$(dirname "$curPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
rootPath=$(dirname "$rootPath") |
||||
serverPath=$(dirname "$rootPath") |
||||
sourcePath=${serverPath}/source/php |
||||
|
||||
actionType=$1 |
||||
version=$2 |
||||
|
||||
LIBNAME=gd |
||||
LIBV=0 |
||||
|
||||
NON_ZTS_FILENAME=`ls $serverPath/php/${version}/lib/php/extensions | grep no-debug-non-zts` |
||||
extFile=$serverPath/php/${version}/lib/php/extensions/${NON_ZTS_FILENAME}/${LIBNAME}.so |
||||
|
||||
sysName=`uname` |
||||
if [ "$sysName" == "Darwin" ];then |
||||
BAK='_bak' |
||||
else |
||||
BAK='' |
||||
fi |
||||
|
||||
Install_lib() |
||||
{ |
||||
|
||||
isInstall=`cat $serverPath/php/$version/etc/php.ini|grep "${LIBNAME}.so"` |
||||
if [ "${isInstall}" != "" ];then |
||||
echo "php-$version 已安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
|
||||
if [ ! -d $sourcePath/php${version}/ext ];then |
||||
cd $serverPath/mdserver-web/plugins/php && /bin/bash install.sh install ${version} |
||||
fi |
||||
|
||||
cd $sourcePath/php${version}/ext/${LIBNAME} |
||||
|
||||
$serverPath/php/$version/bin/phpize |
||||
./configure --with-php-config=$serverPath/php/$version/bin/php-config \ |
||||
--enable-gd \ |
||||
--with-webp \ |
||||
--with-xpm \ |
||||
--with-jpeg \ |
||||
--with-freetype \ |
||||
--enable-gd-jis-conv |
||||
|
||||
make clean && make && make install && make clean |
||||
|
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "ERROR!" |
||||
return |
||||
fi |
||||
|
||||
echo "" >> $serverPath/php/$version/etc/php.ini |
||||
echo "[${LIBNAME}]" >> $serverPath/php/$version/etc/php.ini |
||||
echo "extension=${LIBNAME}.so" >> $serverPath/php/$version/etc/php.ini |
||||
|
||||
$serverPath/php/init.d/php${version} restart |
||||
echo '===========================================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
Uninstall_lib() |
||||
{ |
||||
if [ ! -f "$serverPath/php/$version/bin/php-config" ];then |
||||
echo "php-$version 未安装,请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
if [ ! -f "$extFile" ];then |
||||
echo "php-$version 未安装${LIBNAME},请选择其它版本!" |
||||
return |
||||
fi |
||||
|
||||
echo $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}.so/d" $serverPath/php/$version/etc/php.ini |
||||
sed -i $BAK "/${LIBNAME}/d" $serverPath/php/$version/etc/php.ini |
||||
|
||||
rm -f $extFile |
||||
$serverPath/php/init.d/php$version reload |
||||
echo '===============================================' |
||||
echo 'successful!' |
||||
} |
||||
|
||||
|
||||
|
||||
if [ "$actionType" == 'install' ];then |
||||
Install_lib |
||||
elif [ "$actionType" == 'uninstall' ];then |
||||
Uninstall_lib |
||||
fi |
Loading…
Reference in new issue