Skip to content

Commit 5292e77

Browse files
committed
Test cygwin in ci and fix build
1 parent 4bf063d commit 5292e77

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

.github/workflows/ci.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -950,6 +950,30 @@ jobs:
950950
-DCPPTRACE_STD_FORMAT=Off
951951
ninja
952952
953+
unittest-cygwin:
954+
runs-on: windows-2022
955+
needs: unittest-linux
956+
steps:
957+
- uses: actions/checkout@v4
958+
- name: Install Cygwin
959+
uses: cygwin/cygwin-install-action@v4
960+
with:
961+
packages: cmake gcc-g++ ninja git
962+
- name: build and test
963+
shell: C:\cygwin\bin\bash.exe --login -o igncr {0}
964+
run: |
965+
cd "$GITHUB_WORKSPACE"
966+
mkdir build
967+
cd build
968+
cmake .. \
969+
-GNinja \
970+
-DCMAKE_BUILD_TYPE=Debug \
971+
-DCPPTRACE_WERROR_BUILD=On \
972+
-DCPPTRACE_STD_FORMAT=Off \
973+
-DCPPTRACE_BUILD_TESTING=On
974+
ninja
975+
./unittest.exe
976+
953977
unittest-windows-32-bit:
954978
runs-on: windows-2022
955979
needs: unittest-windows

src/platform/platform.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#if defined(_WIN32)
99
#undef IS_WINDOWS
1010
#define IS_WINDOWS 1
11-
#elif defined(__linux) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
11+
#elif defined(__linux) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__CYGWIN__)
1212
#undef IS_LINUX
1313
#define IS_LINUX 1
1414
#elif defined(__APPLE__)

0 commit comments

Comments
 (0)