Commit c60dcadd73b8884cf72288cb24431b3f3794b653
1 parent
82929b69
Exists in
master
and in
1 other branch
Fixing mingw workflow.
Showing
2 changed files
with
88 additions
and
0 deletions
Show diff stats
@@ -0,0 +1,23 @@ | @@ -0,0 +1,23 @@ | ||
1 | +name: MSYS2 | ||
2 | +on: | ||
3 | + pull_request: | ||
4 | + branches: | ||
5 | + - master | ||
6 | + | ||
7 | +jobs: | ||
8 | + msys2-mingw: | ||
9 | + runs-on: windows-latest | ||
10 | + defaults: | ||
11 | + run: | ||
12 | + shell: msys2 {0} | ||
13 | + steps: | ||
14 | + - uses: actions/checkout@v3 | ||
15 | + - uses: msys2/setup-msys2@v2 | ||
16 | + with: | ||
17 | + msystem: mingw64 | ||
18 | + update: true | ||
19 | + install: xz mingw-w64-x86_64-gcc automake autoconf make git pkgconf mingw-w64-x86_64-gettext gettext-devel mingw-w64-x86_64-openssl libtool mingw-w64-x86_64-gtk3 mingw-w64-x86_64-imagemagick mingw-w64-x86_64-optipng mingw-w64-x86_64-inkscape | ||
20 | + - name: CI-Build | ||
21 | + run: | | ||
22 | + ./win/ci-build.sh | ||
23 | + |
@@ -0,0 +1,65 @@ | @@ -0,0 +1,65 @@ | ||
1 | +#!/bin/bash | ||
2 | +# | ||
3 | +# References: | ||
4 | +# | ||
5 | +# * https://www.msys2.org/docs/ci/ | ||
6 | +# | ||
7 | +# | ||
8 | +echo "Running ${0}" | ||
9 | + | ||
10 | +LOGFILE=build.log | ||
11 | +rm -f ${LOGFILE} | ||
12 | + | ||
13 | +die ( ) { | ||
14 | + [ -s $LOGFILE ] && tail $LOGFILE | ||
15 | + [ "$1" ] && echo "$*" | ||
16 | + exit -1 | ||
17 | +} | ||
18 | + | ||
19 | +cd $(dirname $(dirname $(readlink -f ${0}))) | ||
20 | + | ||
21 | +rm -fr .build | ||
22 | + | ||
23 | +# | ||
24 | +# Build LIB3270 | ||
25 | +# | ||
26 | +echo "Building lib3270" | ||
27 | +mkdir -p .build/lib3270 | ||
28 | +git clone https://github.com/PerryWerneck/lib3270.git ./.build/lib3270 > $LOGFILE 2>&1 || die "clone lib3270 failure" | ||
29 | +pushd ./.build/lib3270 | ||
30 | +./autogen.sh > $LOGFILE 2>&1 || die "Autogen failure" | ||
31 | +./configure > $LOGFILE 2>&1 || die "Configure failure" | ||
32 | +make clean > $LOGFILE 2>&1 || die "Make clean failure" | ||
33 | +make all > $LOGFILE 2>&1 || die "Make failure" | ||
34 | +popd | ||
35 | + | ||
36 | +export LIB3270_CFLAGS="-I./.build/lib3270/src/include" | ||
37 | +export LIB3270_LIBS="-L./.build/lib3270/.bin/Release -l3270.delayed" | ||
38 | + | ||
39 | +# | ||
40 | +# Build LIBV3270 | ||
41 | +# | ||
42 | +echo "Building libv3270" | ||
43 | +mkdir -p .build/libv3270 | ||
44 | +git clone https://github.com/PerryWerneck/libv3270.git ./.build/libv3270 > $LOGFILE 2>&1 || die "clone libv3270 failure" | ||
45 | +pushd ./.build/libv3270 | ||
46 | +./autogen.sh > $LOGFILE 2>&1 || die "Autogen failure" | ||
47 | +./configure > $LOGFILE 2>&1 || die "Configure failure" | ||
48 | +make clean > $LOGFILE 2>&1 || die "Make clean failure" | ||
49 | +make all > $LOGFILE 2>&1 || die "Make failure" | ||
50 | +popd | ||
51 | + | ||
52 | +export LIBV3270_CFLAGS="-I./.build/libv3270/src/include ${LIB3270_CFLAGS}" | ||
53 | +export LIBV3270_LIBS="-L./.build/libv3270/.bin/Release -lv3270 ${LIB3270_LIBS}" | ||
54 | + | ||
55 | +# | ||
56 | +# Build PW3270 | ||
57 | +# | ||
58 | +echo "Building PW3270" | ||
59 | +./autogen.sh > $LOGFILE 2>&1 || die "Autogen failure" | ||
60 | +./configure > $LOGFILE 2>&1 || die "Configure failure" | ||
61 | +make clean > $LOGFILE 2>&1 || die "Make clean failure" | ||
62 | +make all > $LOGFILE 2>&1 || die "Make failure" | ||
63 | + | ||
64 | +echo "Build complete" | ||
65 | + |