Skip to content

Commit

Permalink
fixed win32 CI and nightly builds (refs #5)
Browse files Browse the repository at this point in the history
* The libtool wrapper binaries do not pass down UTF-8 strings correctly,
  so the Unicode tests failed under some circumstances.
* As we aren't actually linking against any locally-built shared libraries,
  we are passing --disable-shared to libtool which inhibts wrapper generation
  on win32 and fixes the test suite.
* Also use up to date autotools. This didn't fix anything, though.
* test suite: try writing an Unicode filename as well
  * There have been problems doing that on Win32 where UTF-8 was not
    correctly passed down from the command line and some Windows API
    calls were only working with ANSI filenames etc.
  • Loading branch information
rhaberkorn committed Sep 10, 2024
1 parent 62ccd35 commit 979ffbb
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,16 +112,19 @@ jobs:
- name: Install Build Dependencies
run: >
pacman -S --noconfirm --needed
base-devel autotools mingw-w64-i686-toolchain
base-devel mingw-w64-i686-autotools mingw-w64-i686-toolchain
mingw-w64-i686-glib2 mingw-w64-i686-pdcurses
groff mingw-w64-i686-doxygen
- name: Configure Build
env:
PDCURSES_CFLAGS: -I/mingw32/include/pdcurses/
# --disable-shared makes sure that libtool won't create wrapper binaries.
# They are not required and cause problems when running the test suite
# as they don't pass down UTF-8 parameters properly.
run: |
autoreconf -i
./configure --with-interface=pdcurses-gui --enable-debug --enable-html-manual
./configure --with-interface=pdcurses-gui --enable-debug --disable-shared --enable-html-manual
- run: make
- run: make install
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ jobs:
- name: Install Build Dependencies
run: >
pacman -S --noconfirm --needed
base-devel autotools mingw-w64-i686-toolchain
base-devel mingw-w64-i686-autotools mingw-w64-i686-toolchain
mingw-w64-i686-glib2 mingw-w64-i686-pdcurses
groff
Expand All @@ -188,14 +188,17 @@ jobs:
CFLAGS: -O3 -flto
CXXFLAGS: -O3 -flto
LDFLAGS: -flto
# --disable-shared makes sure that libtool won't create wrapper binaries.
# They are not required and cause problems when running the test suite
# as they don't pass down UTF-8 parameters properly.
run: |
autoreconf -i
mkdir build-wingui build-wincon
(cd build-wingui
../configure --with-interface=pdcurses-gui --enable-html-manual --program-prefix=g \
../configure --with-interface=pdcurses-gui --disable-shared --enable-html-manual --program-prefix=g \
PDCURSES_LIBS="-lpdcurses_wingui -lgdi32 -lcomdlg32 -lwinmm")
(cd build-wincon
../configure --with-interface=pdcurses --enable-html-manual \
../configure --with-interface=pdcurses --disable-shared --enable-html-manual \
PDCURSES_LIBS="-lpdcurses_wincon -lgdi32 -lwinmm")
- name: make
Expand Down Expand Up @@ -263,7 +266,7 @@ jobs:
- name: Install Build Dependencies
run: >
pacman -S --noconfirm --needed
base-devel autotools mingw-w64-i686-toolchain
base-devel mingw-w64-i686-autotools mingw-w64-i686-toolchain
mingw-w64-i686-glib2 mingw-w64-i686-gtk3
groff
Expand All @@ -273,9 +276,12 @@ jobs:
CFLAGS: -O3 -flto
CXXFLAGS: -O3 -flto
LDFLAGS: -flto
# --disable-shared makes sure that libtool won't create wrapper binaries.
# They are not required and cause problems when running the test suite
# as they don't pass down UTF-8 parameters properly.
run: |
autoreconf -i
./configure --with-interface=gtk --enable-html-manual
./configure --with-interface=gtk --disable-shared --enable-html-manual
- name: make
run: make -j 2
Expand Down
2 changes: 2 additions & 0 deletions tests/testsuite.at
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ AT_SETUP([Unicode])
AT_CHECK([$SCITECO -e "8594@I/Здравствуй, мир!/ Z-17\"N(0/0)' J0A-8594\"N(0/0)'"], 0, ignore, ignore)
AT_CHECK([$SCITECO -e "8594@^Ua/Здравствуй, мир!/ :Qa-17\"N(0/0)' 0Qa-8594\"N(0/0)'"], 0, ignore, ignore)
AT_CHECK([$SCITECO -e "@I/Здравствуй, мир!/ JW .-10\"N(0/0)' ^E-20\"N(0/0)' 204:EE .-10\"N(0/0)'"], 0, ignore, ignore)
AT_CHECK([$SCITECO -e "@I/TEST/ @EW/юникод.txt/"], 0, ignore, ignore)
AT_CHECK([test -f юникод.txt], 0, ignore, ignore)
AT_CLEANUP

AT_SETUP([Automatic EOL normalization])
Expand Down

0 comments on commit 979ffbb

Please sign in to comment.