Skip to content

Commit 05a1e92

Browse files
authored
speed up MinGW and Cygwin CI builds by avoiding repeated linking (#4274)
* speed up MinGW and Cygwin CI builds by avoiding repeated linking * updated some CI jobs to `windows-2022`
1 parent 6eab3cb commit 05a1e92

2 files changed

Lines changed: 6 additions & 20 deletions

File tree

.github/workflows/CI-cygwin.yml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
build_cygwin:
1515
strategy:
1616
matrix:
17-
os: [windows-2019]
17+
os: [windows-2022]
1818
arch: [x64, x86]
1919
include:
2020
- platform: 'x86_64'
@@ -33,15 +33,8 @@ jobs:
3333
platform: ${{ matrix.arch }}
3434
packages: ${{ matrix.packages }}
3535

36-
- name: Build cppcheck
37-
run: |
38-
C:\cygwin\bin\bash.exe -l -c cd %GITHUB_WORKSPACE% && make -j2
39-
40-
- name: Build test
41-
run: |
42-
C:\cygwin\bin\bash.exe -l -c cd %GITHUB_WORKSPACE% && make -j2 testrunner
43-
44-
- name: Run test
36+
# Cygwin will always link the binaries even if they already exist. The linking is also extremely slow. So just run the "check" target which includes all the binaries.
37+
- name: Build all and run test
4538
run: |
4639
C:\cygwin\bin\bash.exe -l -c cd %GITHUB_WORKSPACE% && make -j2 check
4740

.github/workflows/CI-mingw.yml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
build_mingw:
1515
strategy:
1616
matrix:
17-
os: [windows-2019]
17+
os: [windows-2019] # fails to download with "windows-2022"
1818
arch: [x64] # TODO: fix x86 build?
1919
fail-fast: false
2020

@@ -28,14 +28,7 @@ jobs:
2828
with:
2929
platform: ${{ matrix.arch }}
3030

31-
- name: Build cppcheck
32-
run: |
33-
mingw32-make -j2
34-
35-
- name: Build test
36-
run: |
37-
mingw32-make -j2 testrunner
38-
39-
- name: Run test
31+
# MinGW will always link the binaries even if they already exist. The linking is also extremely slow. So just run the "check" target which includes all the binaries.
32+
- name: Build all and run test
4033
run: |
4134
mingw32-make -j2 check

0 commit comments

Comments
 (0)