Skip to content

Commit

Permalink
update install cygwin build environment (#889)
Browse files Browse the repository at this point in the history
* update install cygwin build environment

* update windows-cygwin.yml

* add runner-images.md

* runner-images.md
  • Loading branch information
jingjingxyk authored Dec 25, 2024
1 parent 59f778a commit d2c7a36
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/runner-images.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[runner-images](https://github.com/actions/runner-images/tree/main/images)

[available-images](https://github.com/actions/runner-images?tab=readme-ov-file#available-images)

[choosing-github-hosted-runners](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#choosing-github-hosted-runners)
14 changes: 13 additions & 1 deletion .github/workflows/windows-cygwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,22 @@ on: [ push, pull_request ]
jobs:
windows-cygwin:
if: "!contains(github.event.head_commit.message, '--filter=') || contains(github.event.head_commit.message, '[windows-cygwin]')"
runs-on: windows-latest
runs-on: windows-2022
steps:
- name: Show Environment Info
shell: cmd
run: |
ver
wmic cpu get name, caption, maxclockspeed, status
systeminfo
systeminfo | findstr /B /C:"OS Name" /C:"OS Version"
systeminfo | findstr /B /C:"Manufacturer" /C:"Product" /C:"Version"
- name: Prepare git
run: |
git config --global core.autocrlf false
git config --global core.eol lf
git config --global core.ignorecase false
ipconfig
- uses: actions/checkout@v4
Expand All @@ -36,6 +46,8 @@ jobs:

- name: Install Cygwin
uses: cygwin/cygwin-install-action@v2
with:
site: https://mirrors.kernel.org/sourceware/cygwin/
# with:
# platform: x64
# 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
Expand Down
4 changes: 2 additions & 2 deletions docs/Cygwin.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
## 安装cygwin 和 cygwin 依赖项

> 打开 windows 控制台,并找到 setup-x86_64.exe 所在目录, 将 setup-x86_64.exe 复制到 `sapi\quickstart\windows\` 目录
> 执行如下命令
```bash

# 自动安装 cygwin 和 cygwin 依赖项
sapi\quickstart\windows\install-cygwin.bat
.\sapi\quickstart\windows\download-cygwin.bat
.\sapi\quickstart\windows\install-cygwin.bat

```

Expand Down
22 changes: 21 additions & 1 deletion sapi/quickstart/windows/download-cygwin.bat
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
@echo off
:: cygwin site: https://cygwin.com/
start https://cygwin.com/setup-x86_64.exe
:: start https://cygwin.com/setup-x86_64.exe

setlocal


echo %~dp0
cd /d %~dp0
cd /d ..\..\..\

set "__PROJECT__=%cd%"
echo %cd%

md %__PROJECT__%\var\windows-cygwin-build-deps\

cd /d %__PROJECT__%\var\windows-cygwin-build-deps\

curl.exe -fSLo setup-x86_64.exe https://cygwin.com/setup-x86_64.exe

copy .\setup-x86_64.exe %__PROJECT__%\

endlocal
15 changes: 14 additions & 1 deletion sapi/quickstart/windows/install-cygwin.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
@echo off
:: cygwin安装多个包,包之间,用逗号分隔
:: cygwin site: https://cygwin.com/
:: start https://cygwin.com/setup-x86_64.exe

setlocal


echo %~dp0
cd /d %~dp0
cd /d ..\..\..\

set "__PROJECT__=%cd%"
echo %cd%
:: package separate with commas

setup-x86_64.exe --no-desktop --no-shortcuts --no-startmenu --quiet-mode --disable-buggy-antivirus --site https://mirrors.ustc.edu.cn/cygwin/ --packages make,git,curl,wget,tar,libtool,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

Expand All @@ -9,3 +21,4 @@ setup-x86_64.exe --quiet-mode --disable-buggy-antivirus --site https://mirr

setup-x86_64.exe --quiet-mode --disable-buggy-antivirus --site https://mirrors.ustc.edu.cn/cygwin/ --packages libzstd-devel

endlocal

0 comments on commit d2c7a36

Please sign in to comment.