1111 runs-on : windows-latest
1212 env :
1313 CYGWIN : winsymlinks:nativestrict
14+
15+ # Use a wrapper that:
16+ # - converts the temp step path ({0}) and the workspace to POSIX with cygpath
17+ # - strips CRLF from the temporary script
18+ # - sets igncr and runs the script under Cygwin bash
1419 defaults :
1520 run :
16- shell : C:\tools\cygwin\bin\bash.exe --login -eo pipefail -o igncr '{0}'
21+ shell : >
22+ C:\tools\cygwin\bin\bash.EXE --login -eo pipefail -c
23+ "p=$(/usr/bin/cygpath -au '{0}');
24+ w=$(/usr/bin/cygpath -au '${{ github.workspace }}');
25+ /usr/bin/sed -i 's/\r$//' \"$p\" || true;
26+ set -o igncr;
27+ cd \"$w\" || (/usr/bin/pwd; /usr/bin/ls -la; exit 2);
28+ /usr/bin/bash -leo pipefail \"$p\""
1729
1830 steps :
1931 - name : Checkout repository
4052 libreadline-devel
4153 libsqlite3-devel
4254 libexpat-devel
43- # or libxml2-devel (optional)
44-
4555
4656 - name : Build and install libstrophe from source
4757 run : |
5262 autoreconf -i
5363 ./configure --prefix=$PWD/install
5464 make -j2 install
55- shell : C:\tools\cygwin\bin\bash.exe --login -eo pipefail -o igncr '{0}'
65+ # explicit shell to be extra-safe for this step
66+ shell : >
67+ C:\tools\cygwin\bin\bash.EXE --login -eo pipefail -c
68+ "p=$(/usr/bin/cygpath -au '{0}');
69+ w=$(/usr/bin/cygpath -au '${{ github.workspace }}');
70+ /usr/bin/sed -i 's/\r$//' \"$p\" || true;
71+ set -o igncr;
72+ cd \"$w\" || (/usr/bin/pwd; /usr/bin/ls -la; exit 2);
73+ /usr/bin/bash -leo pipefail \"$p\""
5674
5775 - name : Check repo state
5876 run : |
6482 - name : Autotools bootstrap
6583 run : |
6684 cd "$GITHUB_WORKSPACE"
85+ # don't fail if git is not present inside Cygwin
6786 git config --global core.autocrlf false || true
6887 [ -f ./bootstrap.sh ] && sed -i 's/\r$//' ./bootstrap.sh || true
88+
6989 if [ -x ./bootstrap.sh ]; then
7090 ./bootstrap.sh
7191 else
7494
7595 - name : Configure
7696 env :
97+ # ensure pkg-config can find libstrophe we built above
7798 PKG_CONFIG_PATH : ${{ github.workspace }}/deps/libstrophe/install/lib/pkgconfig:$PKG_CONFIG_PATH
7899 run : |
79100 cd "$GITHUB_WORKSPACE"
@@ -84,8 +105,16 @@ jobs:
84105 cd "$GITHUB_WORKSPACE"
85106 make -j2
86107
87- # Uncomment when tests are reliable on Cygwin
88- # - name: Test
108+ # Optional: non-blocking tests + upload logs for inspection (recommended while tests are unstable)
109+ # - name: Run tests (collect logs)
110+ # continue-on-error: true
89111 # run: |
90112 # cd "$GITHUB_WORKSPACE"
91- # make check -j2
113+ # mkdir -p test-logs
114+ # make check > test-logs/make-check.log 2>&1 || true
115+ #
116+ # - name: Upload test logs
117+ # uses: actions/upload-artifact@v4
118+ # with:
119+ # name: cygwin-make-check-logs
120+ # path: test-logs/
0 commit comments