Skip to content

Commit f5eccea

Browse files
authored
Merge pull request #2066 from ritesh006/ci/cygwin-build
ci: add Cygwin build workflow
2 parents fce4da4 + f21ce24 commit f5eccea

File tree

1 file changed

+91
-0
lines changed

1 file changed

+91
-0
lines changed

.github/workflows/cygwin-build.yml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: Cygwin
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
9+
jobs:
10+
cygwin-build:
11+
runs-on: windows-latest
12+
env:
13+
CYGWIN: winsymlinks:nativestrict
14+
15+
# Wrapper:
16+
# - convert temp script + workspace to POSIX paths
17+
# - strip CRLF
18+
# - enable igncr and run under Cygwin bash
19+
defaults:
20+
run:
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\""
29+
30+
steps:
31+
- name: Checkout repository
32+
uses: actions/checkout@v4
33+
with:
34+
fetch-depth: 0
35+
36+
- name: Set up Cygwin with build dependencies
37+
uses: egor-tensin/setup-cygwin@v4
38+
with:
39+
packages: >-
40+
autoconf
41+
automake
42+
libtool
43+
make
44+
pkg-config
45+
autoconf-archive
46+
gcc-core
47+
gettext-devel
48+
git
49+
libncursesw-devel
50+
libglib2.0-devel
51+
libcurl-devel
52+
libreadline-devel
53+
libsqlite3-devel
54+
libexpat-devel
55+
libcmocka-devel
56+
57+
- name: Build and install libstrophe from source
58+
run: |
59+
cd "$GITHUB_WORKSPACE"
60+
mkdir -p deps && cd deps
61+
git clone --depth 1 https://github.com/strophe/libstrophe.git
62+
cd libstrophe
63+
autoreconf -i
64+
./configure --prefix=$PWD/install
65+
make -j2 install
66+
67+
- name: Autotools bootstrap
68+
run: |
69+
cd "$GITHUB_WORKSPACE"
70+
71+
# On Windows checkouts the executable bit may be lost and CRLF line endings
72+
# can break shell scripts, so normalize bootstrap.sh if it exists.
73+
if [ -f ./bootstrap.sh ]; then
74+
sed -i 's/\r$//' ./bootstrap.sh
75+
chmod +x ./bootstrap.sh
76+
./bootstrap.sh
77+
else
78+
autoreconf -fi
79+
fi
80+
81+
- name: Configure
82+
env:
83+
PKG_CONFIG_PATH: ${{ github.workspace }}/deps/libstrophe/install/lib/pkgconfig:$PKG_CONFIG_PATH
84+
run: |
85+
cd "$GITHUB_WORKSPACE"
86+
./configure
87+
88+
- name: Build
89+
run: |
90+
cd "$GITHUB_WORKSPACE"
91+
make -j2

0 commit comments

Comments
 (0)