Skip to content

Commit 158c677

Browse files
HertzDevilgithub-actions[bot]
authored andcommitted
Only set up Cygwin on Windows CI if truly required (#15661)
Reduces CI noise as the majority of the affected PRs never touch the workflow definitions. (cherry picked from commit 72255ab)
1 parent d2369ac commit 158c677

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

.github/workflows/win.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,6 @@ jobs:
2323
- name: Enable Developer Command Prompt
2424
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
2525

26-
- name: Set up Cygwin
27-
uses: cygwin/cygwin-install-action@f61179d72284ceddc397ed07ddb444d82bf9e559 # v5
28-
with:
29-
packages: make
30-
install-dir: C:\cygwin64
31-
add-to-path: false
32-
3326
- name: Download Crystal source
3427
uses: actions/checkout@v4
3528

@@ -48,6 +41,13 @@ jobs:
4841
libs/yaml.lib
4942
libs/xml2.lib
5043
key: win-libs-${{ hashFiles('.github/workflows/win.yml', 'etc/win-ci/*.ps1') }}-msvc
44+
- name: Set up Cygwin
45+
if: steps.cache-libs.outputs.cache-hit != 'true'
46+
uses: cygwin/cygwin-install-action@f61179d72284ceddc397ed07ddb444d82bf9e559 # v5
47+
with:
48+
packages: make
49+
install-dir: C:\cygwin64
50+
add-to-path: false
5151
- name: Build libgc
5252
if: steps.cache-libs.outputs.cache-hit != 'true'
5353
run: .\etc\win-ci\build-gc.ps1 -BuildTree deps\gc -Version 8.2.8 -AtomicOpsVersion 7.8.2
@@ -102,13 +102,6 @@ jobs:
102102
- name: Enable Developer Command Prompt
103103
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
104104

105-
- name: Set up Cygwin
106-
uses: cygwin/cygwin-install-action@f61179d72284ceddc397ed07ddb444d82bf9e559 # v5
107-
with:
108-
packages: make
109-
install-dir: C:\cygwin64
110-
add-to-path: false
111-
112105
- name: Download Crystal source
113106
uses: actions/checkout@v4
114107

@@ -136,6 +129,13 @@ jobs:
136129
dlls/yaml.dll
137130
dlls/libxml2.dll
138131
key: win-dlls-${{ hashFiles('.github/workflows/win.yml', 'etc/win-ci/*.ps1') }}-msvc
132+
- name: Set up Cygwin
133+
if: steps.cache-dlls.outputs.cache-hit != 'true'
134+
uses: cygwin/cygwin-install-action@f61179d72284ceddc397ed07ddb444d82bf9e559 # v5
135+
with:
136+
packages: make
137+
install-dir: C:\cygwin64
138+
add-to-path: false
139139
- name: Build libgc
140140
if: steps.cache-dlls.outputs.cache-hit != 'true'
141141
run: .\etc\win-ci\build-gc.ps1 -BuildTree deps\gc -Version 8.2.8 -AtomicOpsVersion 7.8.2 -Dynamic

etc/win-ci/build-iconv.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ rm libiconv.tar.gz
1414

1515
Run-InDirectory $BuildTree {
1616
$env:CHERE_INVOKING = 1
17+
[System.IO.File]::WriteAllText("src\Makefile.in", [System.IO.File]::ReadAllText("src\Makefile.in").Replace("chmod 777 .", "true"))
18+
1719
& 'C:\cygwin64\bin\bash.exe' --login "$PSScriptRoot\cygwin-build-iconv.sh" "$Version" "$(if ($Dynamic) { 1 })"
1820
if (-not $?) {
1921
Write-Host "Error: Failed to build libiconv" -ForegroundColor Red

0 commit comments

Comments
 (0)