ci: add Cygwin build workflow #13
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Cygwin build | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| cygwin-build: | |
| runs-on: windows-latest | |
| env: | |
| CYGWIN: winsymlinks:nativestrict | |
| PKG_CONFIG_PATH: /usr/lib/pkgconfig:/usr/local/lib/pkgconfig | |
| defaults: | |
| run: | |
| shell: C:\tools\cygwin\bin\bash.exe --login -eo pipefail -o igncr '{0}' | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Cygwin with build dependencies | |
| uses: egor-tensin/setup-cygwin@v4 | |
| with: | |
| packages: >- | |
| autoconf | |
| automake | |
| libtool | |
| make | |
| pkg-config | |
| autoconf-archive | |
| gcc-core | |
| gettext-devel | |
| git | |
| libstrophe-devel | |
| libncursesw-devel | |
| libglib2.0-devel | |
| libcurl-devel | |
| libreadline-devel | |
| libsqlite3-devel | |
| - name: Debug pkg-config for libstrophe | |
| run: | | |
| cd "$GITHUB_WORKSPACE" | |
| echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH" | |
| pkg-config --cflags --libs libstrophe | |
| pkg-config --variable pc_path pkg-config | |
| ls /usr/lib/pkgconfig /usr/local/lib/pkgconfig || true | |
| - name: Check repo state | |
| run: | | |
| cd "$GITHUB_WORKSPACE" | |
| pwd | |
| ls -la | |
| test -f configure.ac && echo "configure.ac present" || (echo "configure.ac missing"; exit 1) | |
| - name: Autotools bootstrap | |
| run: | | |
| cd "$GITHUB_WORKSPACE" | |
| git config --global core.autocrlf false || true | |
| [ -f ./bootstrap.sh ] && sed -i 's/\r$//' ./bootstrap.sh || true | |
| if [ -x ./bootstrap.sh ]; then | |
| ./bootstrap.sh | |
| else | |
| autoreconf -fi | |
| fi | |
| - name: Configure | |
| run: | | |
| cd "$GITHUB_WORKSPACE" | |
| ./configure | |
| - name: Build | |
| run: | | |
| cd "$GITHUB_WORKSPACE" | |
| make -j2 | |
| # Uncomment when tests are reliable on Cygwin | |
| # - name: Test | |
| # run: | | |
| # cd "$GITHUB_WORKSPACE" | |
| # make check -j2 |