Skip to content

Commit 70450b4

Browse files
committed
Initial shot at Windows builds
1 parent 6ca70f8 commit 70450b4

File tree

2 files changed

+98
-2
lines changed

2 files changed

+98
-2
lines changed

Diff for: .github/workflows/ccpp.yml

+97-2
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,20 @@ on:
66
pull_request:
77
branches: [ master ]
88

9+
env:
10+
LC_ALL: C
11+
COMMON_CONFIGURE_FLAGS: >-
12+
--disable-silent-rules
13+
--with-camlibs=everything
14+
915
jobs:
10-
build:
16+
build-ix:
1117

1218
runs-on: ubuntu-latest
1319

20+
strategy:
21+
fail-fast: true
22+
1423
steps:
1524
- uses: actions/checkout@v2
1625
- name: apt-get update
@@ -22,7 +31,7 @@ jobs:
2231
- name: autoreconf
2332
run: autoreconf -i -f
2433
- name: configure
25-
run: ./configure --prefix=$PWD/__prefix
34+
run: ./configure ${COMMON_CONFIGURE_FLAGS} --prefix=$PWD/__prefix
2635
- name: make
2736
run: NPROC=$(nproc); set -x; make -j$NPROC -l$NPROC
2837
- name: make check
@@ -49,3 +58,89 @@ jobs:
4958
make install
5059
ldd __pref/bin/ambs-lgp2-frontend
5160
__pref/bin/ambs-lgp2-frontend
61+
62+
build-msys2:
63+
# only try expensive windows buildserver if linux build works
64+
# needs: build-ix
65+
66+
runs-on: windows-latest
67+
68+
# See https://github.com/msys2/setup-msys2
69+
70+
strategy:
71+
fail-fast: false
72+
matrix:
73+
include:
74+
- { sys: mingw32, env: i686 }
75+
- { sys: mingw64, env: x86_64 }
76+
- { sys: ucrt64, env: ucrt-x86_64 }
77+
- { sys: clang64, env: clang-x86_64 }
78+
79+
name: 'MSYS2 ${{ matrix.sys }} build'
80+
81+
env:
82+
MINGW_ARCH: ${{ matrix.sys }}
83+
84+
defaults:
85+
run:
86+
shell: msys2 {0}
87+
88+
steps:
89+
- name: 'git config'
90+
run: git config --global core.autocrlf input
91+
shell: bash
92+
93+
- uses: actions/checkout@v2
94+
with:
95+
fetch-depth: 10
96+
97+
- name: 'Set up MSYS2 and Install Software'
98+
uses: msys2/setup-msys2@v2
99+
with:
100+
msystem: ${{ matrix.sys }}
101+
update: true
102+
install: >-
103+
git
104+
autoconf
105+
automake
106+
gettext-devel
107+
libtool
108+
make
109+
pkgconf
110+
msys2-w32api-runtime
111+
mingw-w64-${{ matrix.env }}-gcc
112+
mingw-w64-${{ matrix.env }}-curl
113+
mingw-w64-${{ matrix.env }}-libexif
114+
mingw-w64-${{ matrix.env }}-libgd
115+
mingw-w64-${{ matrix.env }}-libltdl
116+
mingw-w64-${{ matrix.env }}-libusb
117+
mingw-w64-${{ matrix.env }}-libxml2
118+
119+
- name: 'test nproc'
120+
run: nproc ||:
121+
122+
- name: 'autoreconf'
123+
run: autoreconf -vis .
124+
125+
- name: 'configure'
126+
env:
127+
CXX: no
128+
run: ./configure ${COMMON_CONFIGURE_FLAGS} --prefix=$PWD/__prefix
129+
130+
- name: 'make'
131+
run: make
132+
133+
- name: 'make check'
134+
run: make check
135+
136+
- name: 'make install'
137+
run: make install
138+
139+
- name: 'make installcheck'
140+
run: make installcheck
141+
142+
- name: 'make distcheck'
143+
run: make distcheck
144+
145+
- name: 'dist tarball content'
146+
run: for tarball in *.tar.*; do tar tf "$tarball" | sort; break; done

Diff for: configure.ac

+1
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,7 @@ GP_CAMLIB([largan],[outdated])dnl
535535
GP_CAMLIB([lg_gsm],[outdated])dnl
536536
AM_COND_IF([HAVE_LIBCURL], [dnl
537537
AM_COND_IF([HAVE_LIBXML2], [dnl
538+
dnl TODO: Make this conditional on availability of (Winsock ws2_32 or Unix sockets)
538539
GP_CAMLIB([lumix])dnl
539540
])
540541
])

0 commit comments

Comments
 (0)