Skip to content

Commit e614ac6

Browse files
committed
build: add ci workflow for cygwin build and test
This patch introduces a workflow that verifies argtable3 can be built and tested using Cygwin on Windows. Both Debug and Release configurations are built and tested. The workflow ensures Cygwin compatibility and test coverage on every change.
1 parent 359d484 commit e614ac6

1 file changed

Lines changed: 57 additions & 0 deletions

File tree

.github/workflows/cygwin.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Cygwin Build
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [ master ]
7+
pull_request:
8+
9+
jobs:
10+
build:
11+
name: Build with Cygwin (${{ matrix.configuration }})
12+
runs-on: windows-latest
13+
strategy:
14+
matrix:
15+
configuration: [Release, Debug]
16+
17+
steps:
18+
- name: Install Cygwin and dependencies
19+
uses: cygwin/cygwin-install-action@v4
20+
with:
21+
packages: >-
22+
gcc-core
23+
gcc-g++
24+
make
25+
cmake
26+
27+
- name: Add Cygwin to PATH
28+
run: echo "C:\\cygwin64\\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
29+
shell: pwsh
30+
31+
- name: Checkout code
32+
uses: actions/checkout@v4
33+
34+
- name: Get Cygwin path for workspace
35+
id: cygpath
36+
shell: C:\cygwin64\bin\bash.exe --login -eo pipefail {0}
37+
run: |
38+
echo "cygwin_path=$(cygpath -u "$GITHUB_WORKSPACE")" >> $GITHUB_ENV
39+
40+
- name: Configure with CMake (Cygwin)
41+
shell: C:\cygwin64\bin\bash.exe --login -eo pipefail {0}
42+
run: |
43+
cd "$cygwin_path"
44+
cmake -B build/${{ matrix.configuration }} \
45+
-G "Unix Makefiles" \
46+
-DCMAKE_BUILD_TYPE=${{ matrix.configuration }}
47+
48+
- name: Build with CMake (Cygwin)
49+
shell: C:\cygwin64\bin\bash.exe --login -eo pipefail {0}
50+
run: |
51+
cd "$cygwin_path"
52+
cmake --build build/${{ matrix.configuration }} -- -j
53+
54+
- name: Run tests (fail if any test fails)
55+
shell: C:\cygwin64\bin\bash.exe --login -eo pipefail {0}
56+
working-directory: ${{ env.cygwin_path }}/build/${{ matrix.configuration }}
57+
run: ctest --output-on-failure

0 commit comments

Comments
 (0)