22.1.2 #36
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: cygwin | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
build: | |
if: github.repository_owner == 'openswoole' | |
runs-on: windows-latest | |
outputs: | |
version: ${{ steps.swoole_info.outputs.version }} | |
body: ${{ steps.swoole_info.outputs.upload_url }} | |
steps: | |
- name: Set up Cygwin | |
uses: egor-tensin/setup-cygwin@v3 | |
with: | |
platform: x64 | |
packages: cmake php php-devel gcc-g++ openssl libssl-devel libcurl-devel libpcre2-devel wget tar php-curl php-json php-sockets php-mysqli php-bcmath php-bz2 php-calendar php-ctype php-phar php-posix php-pspell php-exif php-recode php-fileinfo php-simplexml php-gd php-soap php-gettext php-sockets php-gmp php-gv php-iconv php-intl php-json php-tokenizer php-mbstring php-ming php-xmlreader php-xmlwriter php-opcache php-xsl php-zip php-pdo_mysql php-zlib php-redis | |
- name: Get Swoole Info | |
id: swoole_info | |
run: | | |
wget https://api.github.com/repos/openswoole/swoole-src/releases -O releases | |
$g=cat .\releases | ConvertFrom-Json | |
$version=$g[0].tag_name | |
$upload_url=$g.upload_url | |
echo $version | |
echo $upload_url | |
echo "::set-output name=version::$version" | |
echo "::set-output name=upload_url::$upload_url" | |
- name: Build Swoole | |
run: | | |
wget https://github.com/openswoole/swoole-src/archive/${{ steps.swoole_info.outputs.version }}.tar.gz -O openswoole.tar.gz | |
mkdir -p openswoole | |
tar -xf openswoole.tar.gz -C openswoole --strip-components=1 | |
rm openswoole.tar.gz | |
cd openswoole | |
/bin/phpize | |
./configure --enable-openssl --with-openssl_dir=/usr --enable-http2 --enable-mysqlnd | |
make -j6 | |
cp modules/openswoole.dll /usr/lib/php/20180731 | |
echo 'extension=openswoole.dll' > /etc/php.d/zz_openswoole.ini | |
php -v | |
php -m | |
php --ri openswoole | |
php --ini | |
cd .. | |
shell: C:\tools\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}' | |
- name: Run build | |
env: | |
VERSION: ${{ steps.swoole_info.outputs.version }} | |
run: | | |
C:\tools\php\php.exe -v | |
C:\tools\php\php.exe -m | |
wget https://github.com/openswoole/cygwin-build/archive/refs/heads/main.tar.gz -O cygwin.tar.gz | |
mkdir -p openswoole-cygwin | |
tar -xf cygwin.tar.gz -C openswoole-cygwin --strip-components=1 | |
rm cygwin.tar.gz | |
cd openswoole-cygwin | |
C:\tools\php\php.exe build.php | |
cd .. | |
- name: Upload Release Asset | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.swoole_info.outputs.upload_url }} | |
asset_path: .\openswoole-cygwin\openswoole-cygwin-${{ steps.swoole_info.outputs.version }}.zip | |
asset_name: openswoole-cygwin-${{ steps.swoole_info.outputs.version }}.zip | |
asset_content_type: application/zip |