build: add ci workflow for cygwin build and test#123
Conversation
637859a to
e614ac6
Compare
There was a problem hiding this comment.
Pull Request Overview
Adds a new GitHub Actions workflow to ensure argtable3 builds and runs tests under Cygwin on Windows in both Debug and Release modes.
- Introduces
.github/workflows/cygwin.ymlto install Cygwin dependencies, configure via CMake, build, and execute tests. - Uses a matrix strategy for Release and Debug builds.
- Validates Cygwin compatibility on every push, pull request, or manual dispatch.
Comments suppressed due to low confidence (1)
.github/workflows/cygwin.yml:6
- Verify that
masteris the correct default branch name—many repos now usemain. If the default ismain, update this to avoid missing workflow runs.
branches: [ master ]
| id: cygpath | ||
| shell: C:\cygwin64\bin\bash.exe --login -eo pipefail {0} | ||
| run: | | ||
| echo "cygwin_path=$(cygpath -u "$GITHUB_WORKSPACE")" >> $GITHUB_ENV |
There was a problem hiding this comment.
Environment variables set via $GITHUB_ENV are typically uppercased on Windows runners. Consider using CYGWIN_PATH (uppercase) and reference it as ${{ env.CYGWIN_PATH }} to ensure the variable is recognized consistently.
| echo "cygwin_path=$(cygpath -u "$GITHUB_WORKSPACE")" >> $GITHUB_ENV | |
| echo "CYGWIN_PATH=$(cygpath -u "$GITHUB_WORKSPACE")" >> $GITHUB_ENV |
| shell: C:\cygwin64\bin\bash.exe --login -eo pipefail {0} | ||
| run: | | ||
| echo "cygwin_path=$(cygpath -u "$GITHUB_WORKSPACE")" >> $GITHUB_ENV | ||
|
|
||
| - name: Configure with CMake (Cygwin) | ||
| shell: C:\cygwin64\bin\bash.exe --login -eo pipefail {0} |
There was a problem hiding this comment.
[nitpick] The full shell path is repeated across multiple steps. Extract this into a workflow-level variable or default shell setting to simplify updates and reduce duplication.
| shell: C:\cygwin64\bin\bash.exe --login -eo pipefail {0} | |
| run: | | |
| echo "cygwin_path=$(cygpath -u "$GITHUB_WORKSPACE")" >> $GITHUB_ENV | |
| - name: Configure with CMake (Cygwin) | |
| shell: C:\cygwin64\bin\bash.exe --login -eo pipefail {0} | |
| run: | | |
| echo "cygwin_path=$(cygpath -u "$GITHUB_WORKSPACE")" >> $GITHUB_ENV | |
| - name: Configure with CMake (Cygwin) |
| matrix: | ||
| configuration: [Release, Debug] | ||
|
|
||
| steps: |
There was a problem hiding this comment.
[nitpick] Consider adding caching for Cygwin packages between runs to speed up subsequent CI executions, for example by leveraging action cache for the /usr or package directory.
| steps: | |
| steps: | |
| - name: Cache Cygwin packages | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| C:/cygwin64/var/cache/setup | |
| C:/cygwin64/usr | |
| key: cygwin-${{ runner.os }}-${{ hashFiles('**/.github/workflows/cygwin.yml') }} | |
| restore-keys: | | |
| cygwin-${{ runner.os }}- |
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.
e614ac6 to
3395462
Compare
|
It may take too long if we add this Cygwin workflow in CI. Close this pull request. |
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.