Skip to content

build: add ci workflow for cygwin build and test#123

Closed
tomghuang wants to merge 1 commit into
masterfrom
feature-add-cygwin-workflow
Closed

build: add ci workflow for cygwin build and test#123
tomghuang wants to merge 1 commit into
masterfrom
feature-add-cygwin-workflow

Conversation

@tomghuang

Copy link
Copy Markdown
Contributor

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.

@tomghuang tomghuang force-pushed the feature-add-cygwin-workflow branch from 637859a to e614ac6 Compare May 25, 2025 23:47
@tomghuang tomghuang requested a review from Copilot May 25, 2025 23:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.yml to 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 master is the correct default branch name—many repos now use main. If the default is main, update this to avoid missing workflow runs.
branches: [ master ]

Comment thread .github/workflows/cygwin.yml Outdated
id: cygpath
shell: C:\cygwin64\bin\bash.exe --login -eo pipefail {0}
run: |
echo "cygwin_path=$(cygpath -u "$GITHUB_WORKSPACE")" >> $GITHUB_ENV

Copilot AI May 25, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
echo "cygwin_path=$(cygpath -u "$GITHUB_WORKSPACE")" >> $GITHUB_ENV
echo "CYGWIN_PATH=$(cygpath -u "$GITHUB_WORKSPACE")" >> $GITHUB_ENV

Copilot uses AI. Check for mistakes.
Comment on lines +36 to +43
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}

Copilot AI May 25, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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.

Suggested change
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)

Copilot uses AI. Check for mistakes.
matrix:
configuration: [Release, Debug]

steps:

Copilot AI May 25, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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.

Suggested change
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 }}-

Copilot uses AI. Check for mistakes.
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.
@tomghuang tomghuang force-pushed the feature-add-cygwin-workflow branch from e614ac6 to 3395462 Compare May 26, 2025 00:01
@tomghuang

Copy link
Copy Markdown
Contributor Author

It may take too long if we add this Cygwin workflow in CI. Close this pull request.

@tomghuang tomghuang closed this May 26, 2025
@tomghuang tomghuang deleted the feature-add-cygwin-workflow branch May 26, 2025 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants