Windows package: avoid Gitlab caching of MATLAB and Octave binaries

parent 8a3938eb
......@@ -59,6 +59,9 @@ pkg_windows:
- windows/deps/sources64/
- windows/deps/lib32/
- windows/deps/lib64/
# We do not cache mingw{32,64}, octave{32,64} and matlab{32,64}, because
# those are simply extracted from a tarball. It would be a waste of space
# and of (re-compression) time.
artifacts:
paths:
- windows/exe/*
......
......@@ -116,7 +116,7 @@ build_windows_matlab_mex_32 ()
--with-gsl="$LIB32"/Gsl \
--with-matio="$LIB32"/matIO \
--with-slicot="$LIB32"/Slicot/without-underscore \
--with-matlab="$LIB32"/matlab/R2009b \
--with-matlab="$ROOT_DIRECTORY"/deps/matlab32/R2009b \
MATLAB_VERSION=R2009b \
MEXEXT=mexw32 \
PACKAGE_VERSION="$VERSION" \
......@@ -137,7 +137,7 @@ build_windows_matlab_mex_64_a ()
--with-gsl="$LIB64"/Gsl \
--with-matio="$LIB64"/matIO \
--with-slicot="$LIB64"/Slicot/without-underscore \
--with-matlab="$LIB64"/matlab/R2009b \
--with-matlab="$ROOT_DIRECTORY"/deps/matlab64/R2009b \
MATLAB_VERSION=R2009b \
MEXEXT=mexw64 \
PACKAGE_VERSION="$VERSION" \
......@@ -158,7 +158,7 @@ build_windows_matlab_mex_64_b ()
--with-gsl="$LIB64"/Gsl \
--with-matio="$LIB64"/matIO \
--with-slicot="$LIB64"/Slicot/without-underscore \
--with-matlab="$LIB64"/matlab/R2018a \
--with-matlab="$ROOT_DIRECTORY"/deps/matlab64/R2018a \
MATLAB_VERSION=R2018a \
MEXEXT=mexw64 \
PACKAGE_VERSION="$VERSION" \
......
......@@ -385,29 +385,29 @@ tarballs/octave-${OCTAVE_VERSION}-w64${OCTAVE_W64_BUILD}.7z:
mkdir -p tarballs
wget $(WGET_OPTIONS) -O $@ https://ftp.gnu.org/gnu/octave/windows/$(notdir $@)
lib32/octave/mingw32/octave-cli.exe: tarballs/octave-${OCTAVE_VERSION}-w32${OCTAVE_W32_BUILD}.7z
rm -rf lib32/octave
7zr x -olib32 $< > /dev/null
mv lib32/octave-${OCTAVE_VERSION}-w32 lib32/octave
octave32: tarballs/octave-${OCTAVE_VERSION}-w32${OCTAVE_W32_BUILD}.7z
rm -rf $@
7zr x $< > /dev/null
mv octave-${OCTAVE_VERSION}-w32 $@
# Clean up MinGW stuff that interferes with our cross-compiler
cd lib32/octave/mingw32/lib && rm -f libadvapi32.a libkernel32.a libmingw32.a libmingwex.a libmoldname.a libmsvcrt.a libpthread.dll.a libshell32.a libuser32.a
cd lib32/octave/mingw32/include && rm -f $$(grep -l "This file is part of the mingw-w64 runtime package" *.h)
cd $@/mingw32/lib && rm -f libadvapi32.a libkernel32.a libmingw32.a libmingwex.a libmoldname.a libmsvcrt.a libpthread.dll.a libshell32.a libuser32.a
cd $@/mingw32/include && rm -f $$(grep -l "This file is part of the mingw-w64 runtime package" *.h)
touch $@
lib64/octave/mingw64/octave-cli.exe: tarballs/octave-${OCTAVE_VERSION}-w64${OCTAVE_W64_BUILD}.7z
rm -rf lib64/octave
7zr x -olib64 $< > /dev/null
mv lib64/octave-${OCTAVE_VERSION}-w64 lib64/octave
octave64: tarballs/octave-${OCTAVE_VERSION}-w64${OCTAVE_W64_BUILD}.7z
rm -rf $@
7zr x $< > /dev/null
mv octave-${OCTAVE_VERSION}-w64 $@
# Clean up MinGW stuff that interferes with our cross-compiler
cd lib64/octave/mingw64/lib && rm -f libadvapi32.a libkernel32.a libmingw32.a libmingwex.a libmoldname.a libmsvcrt.a libpthread.dll.a libshell32.a libuser32.a
cd lib64/octave/mingw64/include && rm -f $$(grep -l "This file is part of the mingw-w64 runtime package" *.h)
cd $@/mingw64/lib && rm -f libadvapi32.a libkernel32.a libmingw32.a libmingwex.a libmoldname.a libmsvcrt.a libpthread.dll.a libshell32.a libuser32.a
cd $@/mingw64/include && rm -f $$(grep -l "This file is part of the mingw-w64 runtime package" *.h)
touch $@
octave: lib32/octave/mingw32/octave-cli.exe lib64/octave/mingw64/octave-cli.exe
octave: octave32 octave64
clean-octave:
rm -rf lib32/octave
rm -rf lib64/octave
rm -rf octave32
rm -rf octave64
rm -f tarballs/octave-${OCTAVE_VERSION}-w64${OCTAVE_W64_BUILD}.7z
rm -f tarballs/octave-${OCTAVE_VERSION}-w32${OCTAVE_W32_BUILD}.7z
......@@ -421,25 +421,25 @@ tarballs/matlab%.tar.xz:
gpg --output $@ --decrypt $@.gpg
rm $@.gpg
lib32/matlab/R2009b/bin/win32/MATLAB.exe: tarballs/matlab32-$(MATLAB32_VERSION).tar.xz
rm -rf lib32/matlab
mkdir -p lib32/matlab
tar xf $< --directory lib32/matlab --strip-components=1
matlab32: tarballs/matlab32-$(MATLAB32_VERSION).tar.xz
rm -rf $@
mkdir -p $@
tar xf $< --directory $@ --strip-components=1
touch $@
lib64/matlab/R2009b/bin/win64/MATLAB.exe: tarballs/matlab64-$(MATLAB64_VERSION).tar.xz
rm -rf lib64/matlab
mkdir -p lib64/matlab
tar xf $< --directory lib64/matlab --strip-components=1
matlab64: tarballs/matlab64-$(MATLAB64_VERSION).tar.xz
rm -rf $@
mkdir -p $@
tar xf $< --directory $@ --strip-components=1
touch $@
matlab: lib32/matlab/R2009b/bin/win32/MATLAB.exe lib64/matlab/R2009b/bin/win64/MATLAB.exe
matlab: matlab32 matlab64
clean-matlab:
rm -f tarballs/matlab32.tar.xz
rm -f tarballs/matlab64.tar.xz
rm -rf lib32/matlab
rm -rf lib64/matlab
rm -rf matlab32
rm -rf matlab64
#
# Embedded MinGW (for use_dll)
......
......@@ -11,7 +11,7 @@ set -e
# Get path to the mkoctfile shell script
MKOCTFILE_PATH=$(dirname $(readlink -f "$0"))
OCTAVE_PREFIX="$MKOCTFILE_PATH/lib32/octave/mingw32"
OCTAVE_PREFIX="$MKOCTFILE_PATH/octave32/mingw32"
# Get Octave version
current_octave_version=$(grep "^OCTAVE_VERSION" "$MKOCTFILE_PATH/versions.mk")
......
......@@ -11,7 +11,7 @@ set -e
# Get path to the mkoctfile shell script
MKOCTFILE_PATH=$(dirname $(readlink -f "$0"))
OCTAVE_PREFIX="$MKOCTFILE_PATH/lib64/octave/mingw64"
OCTAVE_PREFIX="$MKOCTFILE_PATH/octave64/mingw64"
# Get Octave version
current_octave_version=$(grep "^OCTAVE_VERSION" "$MKOCTFILE_PATH/versions.mk")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment