@@ -5,12 +5,23 @@ on: [ push, pull_request ]
5
5
jobs :
6
6
windows-cygwin :
7
7
if : 1
8
- runs-on : windows-latest
8
+ runs-on : windows-2022
9
9
steps :
10
+ - name : Show Environment Info
11
+ shell : cmd
12
+ run : |
13
+ ver
14
+ wmic cpu get name, caption, maxclockspeed, status
15
+ systeminfo
16
+ systeminfo | findstr /B /C:"OS Name" /C:"OS Version"
17
+ systeminfo | findstr /B /C:"Manufacturer" /C:"Product" /C:"Version"
18
+ set
19
+
10
20
- name : Prepare git
11
21
run : |
12
22
git config --global core.autocrlf false
13
23
git config --global core.eol lf
24
+ git config --global core.ignorecase false
14
25
ipconfig
15
26
16
27
- uses : actions/checkout@v4
@@ -36,25 +47,34 @@ jobs:
36
47
37
48
- name : Install Cygwin
38
49
uses : cygwin/cygwin-install-action@v2
50
+ with :
51
+ site : https://mirrors.kernel.org/sourceware/cygwin/
39
52
# with:
40
53
# platform: x64
41
54
# packages: make wget tar libtool re2c bison gcc-g++ autoconf automake openssl libpcre2-devel libssl-devel libcurl-devel libxml2-devel libxslt-devel libgmp-devel ImageMagick libpng-devel libjpeg-devel libfreetype-devel libwebp-devel libsqlite3-devel zlib-devel libbz2-devel liblz4-devel liblzma-devel libzip-devel libicu-devel libonig-devel libcares-devel libsodium-devel libyaml-devel libMagick-devel libzstd-devel libbrotli-devel libreadline-devel libintl-devel libpq-devel libssh2-devel libidn2-devel gettext-devel coreutils openssl-devel zip unzip
42
55
43
- - name : Install Cygwin Packages
56
+ - name : Install Cygwin Packages with bash
57
+ if : 0
44
58
shell : C:\cygwin\bin\bash.EXE --noprofile --norc -e -o pipefail -o igncr {0}
45
59
run : |
46
60
ls -lah /cygdrive/c/
47
61
ls -lah /cygdrive/d/
48
-
49
62
cp -f /cygdrive/c/setup.exe /cygdrive/c/cygwin/bin/setup-x86_64.exe
50
-
51
63
bash ./sapi/scripts/cygwin/install-cygwin.sh
52
64
65
+ - name : Install Cygwin Packages
66
+ if : 1
67
+ run : |
68
+ Copy-Item -Path "C:\setup.exe" -Destination "${{ github.workspace }}\setup-x86_64.exe"
69
+ cmd /c .\sapi\quickstart\windows\cygwin-build\install-cygwin.bat
70
+
53
71
- name : Install re2c
72
+ shell : C:\cygwin\bin\bash.EXE --noprofile --norc -e -o pipefail -o igncr {0}
54
73
run : |
55
74
bash ./sapi/scripts/cygwin/install-re2c.sh
56
75
57
76
- name : Configure
77
+ shell : C:\cygwin\bin\bash.EXE --noprofile --norc -e -o pipefail -o igncr {0}
58
78
run : |
59
79
uname -a
60
80
# git config --global --add safe.directory /cygdrive/d/a/swoole-cli/swoole-cli
63
83
bash ./sapi/scripts/cygwin/cygwin-config.sh
64
84
65
85
- name : Build
86
+ shell : C:\cygwin\bin\bash.EXE --noprofile --norc -e -o pipefail -o igncr {0}
66
87
run : |
67
88
bash ./sapi/scripts/cygwin/cygwin-build.sh
68
89
@@ -112,8 +133,30 @@ jobs:
112
133
113
134
- name : gh release
114
135
uses : softprops/action-gh-release@v2
115
- if : startsWith(github.ref, 'refs/tags/')
136
+ if : ${{ startsWith(github.ref, 'refs/tags/') }}
116
137
env :
117
138
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
118
139
with :
119
140
files : swoole-cli-v${{ env.APP_VERSION }}-cygwin-x64.zip
141
+
142
+ upload-to-cloud-object-storage :
143
+ if : 1
144
+ runs-on : ubuntu-latest
145
+ needs : windows-cygwin
146
+ steps :
147
+ - name : Prepare Run Environment
148
+ run :
149
+ sudo apt install -y curl
150
+ - uses : actions/checkout@v4
151
+ - uses : actions/download-artifact@v4
152
+ - name : upload artifacts to cloud object storage
153
+ if : ${{ (github.repository == 'swoole/swoole-cli') && (startsWith(github.ref, 'refs/tags/')) }}
154
+ env :
155
+ OSS_SECRET_ID : ${{ secrets.QCLOUD_OSS_SECRET_ID }}
156
+ OSS_SECRET_KEY : ${{ secrets.QCLOUD_OSS_SECRET_KEY }}
157
+ OSS_BUCKET : ${{ vars.QCLOUD_OSS_BUCKET }}
158
+ OSS_REGION : ${{ vars.QCLOUD_OSS_REGION }}
159
+ run : |
160
+ FILE_NAME=$(ls -d swoole-cli-v*-cygwin-x64)
161
+ FILE="${{ github.workspace }}/${FILE_NAME}/${FILE_NAME}.zip"
162
+ bash sapi/scripts/tencent-cloud-object-storage.sh --upload-file ${FILE}
0 commit comments