Skip to content

Commit 63e1460

Browse files
committed
Unicode torture for AppVeyor builds
All three builds on AppVeyor updated so that the build takes place and has PREFIX set to a directory which includes 2+ bytes UTF-8 sequences and UTF-16 surrogate characters.
1 parent 69914f0 commit 63e1460

File tree

4 files changed

+36
-24
lines changed

4 files changed

+36
-24
lines changed

.gitattributes

+5-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
# Default behaviour, for if core.autocrlf isn't set
1717
* text=auto
1818

19+
# Don't believe there's a way to wrap lines in .gitattributes
20+
.gitattributes ocaml-typo=long-line
21+
1922
# Binary files
2023
/boot/ocamlc binary
2124
/boot/ocamllex binary
@@ -46,7 +49,8 @@ README* ocaml-typo=missing-header
4649
/LICENSE ocaml-typo=long-line,very-long-line,missing-header
4750
# appveyor_build.cmd only has missing-header because dra27 too lazy to update
4851
# check-typo to interpret Cmd-style comments!
49-
/appveyor_build.cmd ocaml-typo=long-line,very-long-line,missing-header
52+
/appveyor_build.cmd ocaml-typo=long-line,very-long-line,missing-header text eol=crlf
53+
/appveyor_build.sh ocaml-typo=non-ascii
5054

5155

5256
asmcomp/*/emit.mlp ocaml-typo=tab,long-line,unused-prop

appveyor.yml

-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ environment:
2828
CYG_CACHE: C:/cygwin64/var/cache/setup
2929
FLEXDLL_VERSION: 0.37
3030
OCAMLRUNPARAM: v=0,b
31-
OCAMLROOT: "%PROGRAMFILES%/OCaml"
32-
OCAMLROOT2: "%PROGRAMFILES%/OCaml-mingw32"
3331

3432
cache:
3533
- C:\cygwin64\var\cache\setup

appveyor_build.cmd

+7-3
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,14 @@ if %CYGWIN_UPGRADE_REQUIRED% equ 1 (
5656
goto :EOF
5757

5858
:install
59-
git worktree add ..\build-mingw32 -b appveyor-build-mingw32
60-
cd ..\build-mingw32
59+
chcp 65001 > nul
60+
rem This must be kept in sync with appveyor_build.sh
61+
set BUILD_PREFIX=🐫реализация
62+
git worktree add "..\%BUILD_PREFIX%-msvc64" -b appveyor-build-msvc64
63+
git worktree add "..\%BUILD_PREFIX%-mingw32" -b appveyor-build-mingw32
64+
git worktree add "..\%BUILD_PREFIX%-msvc32" -b appveyor-build-msvc32
65+
cd "..\%BUILD_PREFIX%-mingw32"
6166
git submodule update --init flexdll
62-
git worktree add ..\build-msvc32 -b appveyor-build-msvc32
6367

6468
cd "%APPVEYOR_BUILD_FOLDER%"
6569
appveyor DownloadFile "https://github.com/alainfrisch/flexdll/archive/0.37.tar.gz" -FileName "flexdll.tar.gz" || exit /b 1

appveyor_build.sh

+24-18
Original file line numberDiff line numberDiff line change
@@ -45,26 +45,31 @@ function set_configuration {
4545
# run "Content of $FILE" cat config/Makefile
4646
}
4747

48-
PREFIX=$(echo $OCAMLROOT| cygpath -f - -m)
4948
APPVEYOR_BUILD_FOLDER=$(echo $APPVEYOR_BUILD_FOLDER| cygpath -f -)
49+
# These directory names are specified here, because getting UTF-8 correctly
50+
# through appveyor.yml -> Command Script -> Bash is quite painful...
51+
OCAMLROOT=$(echo $PROGRAMFILES/Бактріан🐫| cygpath -f - -m)
52+
53+
# This must be kept in sync with appveyor_build.cmd
54+
BUILD_PREFIX=🐫реализация
5055

5156
export PATH=$(echo $OCAMLROOT| cygpath -f -)/bin/flexdll:$PATH
5257

5358
case "$1" in
5459
install)
55-
mkdir -p "$PREFIX/bin/flexdll"
60+
mkdir -p "$OCAMLROOT/bin/flexdll"
5661
cd $APPVEYOR_BUILD_FOLDER/../flexdll
5762
# msvc64 objects need to be compiled with VS2015, so are copied later from
5863
# a source build.
5964
for f in flexdll.h flexlink.exe flexdll*_msvc.obj default*.manifest ; do
60-
cp $f "$PREFIX/bin/flexdll/$f"
65+
cp $f "$OCAMLROOT/bin/flexdll/"
6166
done
6267
echo 'eval $($APPVEYOR_BUILD_FOLDER/tools/msvs-promote-path)' >> ~/.bash_profile
6368
;;
6469
msvc32-only)
65-
cd $APPVEYOR_BUILD_FOLDER/../build-msvc32
70+
cd $APPVEYOR_BUILD_FOLDER/../$BUILD_PREFIX-msvc32
6671

67-
set_configuration msvc "C:/Program Files/OCaml-msmvc32" -WX
72+
set_configuration msvc "$OCAMLROOT-msvc32" -WX
6873

6974
run "make world" make world
7075
run "make runtimeopt" make runtimeopt
@@ -74,31 +79,32 @@ case "$1" in
7479
exit 0
7580
;;
7681
test)
77-
run "ocamlc.opt -version" $APPVEYOR_BUILD_FOLDER/ocamlc.opt -version
78-
run "test msvc64" make -C $APPVEYOR_BUILD_FOLDER tests
79-
run "test mingw32" make -C $APPVEYOR_BUILD_FOLDER/../build-mingw32 tests
80-
run "install msvc64" make -C $APPVEYOR_BUILD_FOLDER install
81-
run "install mingw32" make -C $APPVEYOR_BUILD_FOLDER/../build-mingw32 install
82+
FULL_BUILD_PREFIX=$APPVEYOR_BUILD_FOLDER/../$BUILD_PREFIX
83+
run "ocamlc.opt -version" $FULL_BUILD_PREFIX-msvc64/ocamlc.opt -version
84+
run "test msvc64" make -C $FULL_BUILD_PREFIX-msvc64 tests
85+
run "test mingw32" make -C $FULL_BUILD_PREFIX-mingw32 tests
86+
run "install msvc64" make -C $FULL_BUILD_PREFIX-msvc64 install
87+
run "install mingw32" make -C $FULL_BUILD_PREFIX-mingw32 install
8288
;;
8389
*)
84-
cd $APPVEYOR_BUILD_FOLDER
90+
cd $APPVEYOR_BUILD_FOLDER/../$BUILD_PREFIX-msvc64
8591

8692
tar -xzf $APPVEYOR_BUILD_FOLDER/flexdll.tar.gz
8793
cd flexdll-$FLEXDLL_VERSION
8894
make MSVC_DETECT=0 CHAINS=msvc64 support
89-
cp flexdll*_msvc64.obj "$PREFIX/bin/flexdll"
95+
cp flexdll*_msvc64.obj "$OCAMLROOT/bin/flexdll/"
9096
cd ..
9197

92-
set_configuration msvc64 "$PREFIX" -WX
98+
set_configuration msvc64 "$OCAMLROOT" -WX
9399

94-
cd ../build-mingw32
100+
cd ../$BUILD_PREFIX-mingw32
95101

96-
set_configuration mingw "$(echo $OCAMLROOT2| cygpath -f - -m)" -Werror
102+
set_configuration mingw "$OCAMLROOT-mingw32" -Werror
97103

98-
cd $APPVEYOR_BUILD_FOLDER
104+
cd $APPVEYOR_BUILD_FOLDER/../$BUILD_PREFIX-msvc64
99105

100106
export TERM=ansi
101-
script --quiet --return --command "make -C ../build-mingw32 flexdll world.opt" ../build-mingw32/build.log >/dev/null 2>/dev/null &
107+
script --quiet --return --command "make -C ../$BUILD_PREFIX-mingw32 flexdll world.opt" ../$BUILD_PREFIX-mingw32/build.log >/dev/null 2>/dev/null &
102108
BUILD_PID=$!
103109

104110
run "make world" make world
@@ -109,7 +115,7 @@ case "$1" in
109115
set +e
110116

111117
# For an explanation of the sed command, see https://github.com/appveyor/ci/issues/1824
112-
tail --pid=$BUILD_PID -n +1 -f ../build-mingw32/build.log | sed -e 's/\d027\[K//g' -e 's/\d027\[m/\d027[0m/g' -e 's/\d027\[01\([m;]\)/\d027[1\1/g' &
118+
tail --pid=$BUILD_PID -n +1 -f ../$BUILD_PREFIX-mingw32/build.log | sed -e 's/\d027\[K//g' -e 's/\d027\[m/\d027[0m/g' -e 's/\d027\[01\([m;]\)/\d027[1\1/g' &
113119
TAIL_PID=$!
114120
wait $BUILD_PID
115121
STATUS=$?

0 commit comments

Comments
 (0)