Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
jingjingxyk committed Dec 3, 2024
1 parent 478dcc1 commit f585549
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 70 deletions.
37 changes: 11 additions & 26 deletions .github/workflows/windows-cygwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,8 @@ env:

jobs:
windows-cygwin:
if: 0
if: 1
runs-on: windows-latest
strategy:
matrix:
php-version:
- "8.2.25"
- "8.1.30"
- "8.3.13"
- "8.4.1"

steps:
- name: Prepare git
run: |
Expand Down Expand Up @@ -74,10 +66,6 @@ jobs:
bash ./sapi/scripts/cygwin/install-cygwin.sh
- name: Install re2c
run: |
bash ./sapi/scripts/cygwin/install-re2c.sh
- name: Prepare
run: |
# git config --global --add safe.directory /cygdrive/d/a/swoole-cli/swoole-cli
Expand All @@ -94,28 +82,25 @@ jobs:
- name: Show Build Result
run: |
./bin/php.exe -v
./bin/php.exe -m
./bin/php.exe --ri mongodb
./bin/php.exe --ri gd
./bin/php.exe --ri swoole
./bin/php.exe -r "echo PHP_VERSION;"
./socat/socat -h
./socat/socat -v
./socat/socat -V | grep 'socat version' | awk '{ print $3 }'
- name: get app version with bash
# 参考 https://github.com/marketplace/actions/install-cygwin
shell: C:\cygwin\bin\bash.EXE --noprofile --norc -e -o pipefail -o igncr {0}
# shell: C:\cygwin\bin\bash.EXE --login --noprofile --norc -e -o pipefail -o igncr {0}
run: |
./bin/php.exe -v | awk '{print $2}'
./socat/socat -V | grep 'socat version' | awk '{ print $3 }'
APP_VERSION=$(./bin/php.exe -v | head -n 1 | awk '{print $2}')
APP_VERSION=$(./socat/socat -V | grep 'socat version' | awk '{ print $3 }')
echo $APP_VERSION
echo "APP_VERSION=${APP_VERSION}" >> $GITHUB_ENV
- name: get app version with PowerShell
run: |
./bin/php.exe -v
$cmdOutput=./bin/php.exe -v
./socat/socat -v
$cmdOutput=./socat/socat -v
$cmdOutput=$cmdOutput | select -first 1
$cmdOutput -match "(\d{1,2}\.\d{1,2}\.\d{1,2})"
$CYGWIN_APP_VERSION=$Matches[1]
Expand All @@ -135,14 +120,14 @@ jobs:
- name: production artifacts
uses: actions/upload-artifact@v4
with:
name: php-cli-v${{ env.APP_VERSION }}-cygwin-x64
name: socat-v${{ env.APP_VERSION }}-cygwin-x64
retention-days: 90
path: php-cli-v${{ env.APP_VERSION }}-cygwin-x64.zip
path: socat-v${{ env.APP_VERSION }}-cygwin-x64.zip

- name: gh release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: php-cli-v${{ env.APP_VERSION }}-cygwin-x64.zip
files: socat-v${{ env.APP_VERSION }}-cygwin-x64.zip
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -360,4 +360,4 @@ swoole-cli-*
php-cli-*
php-fpm-*
!sapi/patches

socat
43 changes: 0 additions & 43 deletions sapi/scripts/cygwin/cygwin-pack.php

This file was deleted.

0 comments on commit f585549

Please sign in to comment.