Skip to content

Commit

Permalink
switch appveyor to use cygwin instead of msys2
Browse files Browse the repository at this point in the history
this will match what the buildbots use to make binaries
(gcc 5 pthreads, c++11 abi instead of gcc 4 win32 threads, old abi)

use cygpath_w around llvm-size call for make build-stats
  • Loading branch information
tkelman committed Jul 15, 2017
1 parent 0b2774e commit 2bcfa6e
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 10 deletions.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,9 @@ LLVM_SIZE := $(build_depsbindir)/llvm-size$(EXE)
endif
build-stats:
@echo $(JULCOLOR)' ==> ./julia binary sizes'$(ENDCOLOR)
$(call spawn,$(LLVM_SIZE) -A $(build_private_libdir)/sys.$(SHLIB_EXT) $(build_shlibdir)/libjulia.$(SHLIB_EXT) $(build_bindir)/julia$(EXE))
$(call spawn,$(LLVM_SIZE) -A $(call cygpath_w,$(build_private_libdir)/sys.$(SHLIB_EXT)) \
$(call cygpath_w,$(build_shlibdir)/libjulia.$(SHLIB_EXT)) \
$(call cygpath_w,$(build_bindir)/julia$(EXE)))
@echo $(JULCOLOR)' ==> ./julia launch speedtest'$(ENDCOLOR)
@time $(call spawn,$(build_bindir)/julia$(EXE) -e '')
@time $(call spawn,$(build_bindir)/julia$(EXE) -e '')
Expand Down
11 changes: 5 additions & 6 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ init:

cache:
# Cache large downloads to avoid network unreliability
- i686-4.9.2-release-win32-sjlj-rt_v4-rev3.7z
- x86_64-4.9.2-release-win32-seh-rt_v4-rev3.7z
- C:\cygdownloads
- llvm-3.9.1-i686-w64-mingw32-juliadeps-r06.7z
- llvm-3.9.1-x86_64-w64-mingw32-juliadeps-r06.7z
- usr/bin/busybox.exe
Expand All @@ -46,11 +45,11 @@ build_script:
# Remove C:\MinGW\bin from the path, the version of MinGW installed on
# AppVeyor is not compatible with the cross-compiled Julia Windows binaries
- set PATH=%PATH:C:\MinGW\bin;=%
# Remove C:\Perl\bin from the path, otherwise it breaks shasum with an error
# Unable to find Digest::SHA or Digest::SHA::PurePerl
- set PATH=%PATH:C:\Perl\bin;=%
# Remove git's msys2 from path, since it conflicts with cygwin1.dll
- set PATH=%PATH:C:\Program Files\Git\usr\bin;=%
- ps: contrib/windows/install-cygwin.ps1
# - '"%VS120COMNTOOLS%\..\..\VC\vcvarsall.bat" x86_amd64'
- C:\msys64\usr\bin\sh.exe --login /c/projects/julia/contrib/windows/msys_build.sh
- C:\cygwin-%ARCH%\bin\sh.exe --login /cygdrive/c/projects/julia/contrib/windows/appveyor_build.sh

test_script:
- usr\bin\julia -e "versioninfo()"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ case $(uname) in
if [ -z "`which gcc 2>/dev/null`" ]; then
echo 'override HOSTCC = $(CROSS_COMPILE)gcc' >> Make.user
fi
make win-extras >> get-deps.log
SEVENZIP="dist-extras/7z"
SEVENZIP="7z"
;;
Linux)
if [ -z "$XC_HOST" ]; then
Expand All @@ -93,6 +92,7 @@ if ! [ -e julia-installer.exe ]; then
echo "Extracting $f"
$SEVENZIP x -y $f >> get-deps.log
fi
mkdir -p usr
for i in bin/*.dll; do
$SEVENZIP e -y julia-installer.exe "$i" \
-ousr\\`dirname $i | sed -e 's|/julia||' -e 's|/|\\\\|g'` >> get-deps.log
Expand All @@ -111,7 +111,7 @@ rm -f usr/bin/libssp-0.dll
rm -f usr/bin/libstdc++-6.dll

if [ -z "$USEMSVC" ]; then
if [ -z "`which ${CROSS_COMPILE}gcc 2>/dev/null`" -o -n "$APPVEYOR" ]; then
if [ -z "`which ${CROSS_COMPILE}gcc 2>/dev/null`" ]; then
f=$ARCH-4.9.2-release-win32-$exc-rt_v4-rev3.7z
checksum_download \
"$f" "https://bintray.com/artifact/download/tkelman/generic/$f"
Expand Down Expand Up @@ -164,6 +164,7 @@ if ! [ -e usr/bin/busybox.exe ]; then
echo "Downloading $f"
$curlflags -o usr/bin/busybox.exe https://frippery.org/files/busybox/$f
fi
chmod +x usr/bin/* usr/tools/*

for lib in SUITESPARSE ARPACK BLAS LAPACK \
GMP MPFR PCRE LIBUNWIND OPENSPECFUN; do
Expand Down
9 changes: 9 additions & 0 deletions contrib/windows/install-cygwin.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
$setup = "setup-$env:ARCH.exe".Replace("i686", "x86")

mkdir -Force C:\cygdownloads | Out-Null
(new-object net.webclient).DownloadFile(
"https://cygwin.com/$setup", "C:\cygdownloads\$setup")
& "C:\cygdownloads\$setup" -q -n -R C:\cygwin-$env:ARCH `
-l C:\cygdownloads -s http://mirrors.mit.edu/cygwin -g -I `
-P "make,curl,time,p7zip,mingw64-$env:ARCH-gcc-g++,mingw64-$env:ARCH-gcc-fortran" | Where-Object `
-FilterScript {$_ -notlike "Installing file *"} | Write-Output

0 comments on commit 2bcfa6e

Please sign in to comment.