2019-10-10 07:26:34 +02:00
|
|
|
variables:
|
|
|
|
TERM: linux
|
2020-05-27 18:38:13 +02:00
|
|
|
MINGW32_BOOST_VERSION: 1.73.0-3
|
|
|
|
MINGW64_BOOST_VERSION: 1.73.0-3
|
2019-10-17 16:03:22 +02:00
|
|
|
WGET_OPTIONS: '--no-verbose --no-use-server-timestamps --retry-connrefused --retry-on-host-error'
|
2019-10-10 07:26:34 +02:00
|
|
|
|
|
|
|
before_script:
|
|
|
|
- 'export REMOTE_PATH=https://www.dynare.org/preprocessor/$CI_COMMIT_SHORT_SHA'
|
|
|
|
|
|
|
|
stages:
|
|
|
|
- build
|
|
|
|
- prepare
|
|
|
|
|
|
|
|
build_linux_32:
|
2018-09-11 21:00:54 +02:00
|
|
|
stage: build
|
2018-09-11 15:54:59 +02:00
|
|
|
script:
|
|
|
|
- autoreconf -si
|
2019-10-17 15:45:53 +02:00
|
|
|
- './configure LDFLAGS="-m32 -static -static-libgcc -static-libstdc++" CXXFLAGS=-m32'
|
2018-09-11 19:09:45 +02:00
|
|
|
- make -j$(nproc)
|
2019-10-10 07:26:34 +02:00
|
|
|
- strip src/dynare_m
|
|
|
|
- mkdir -p bin
|
|
|
|
- mv src/dynare_m bin
|
|
|
|
- mkdir -p $CI_COMMIT_SHORT_SHA/linux/32
|
2019-10-17 15:45:53 +02:00
|
|
|
- tar cfz $CI_COMMIT_SHORT_SHA/linux/32/preprocessor.tar.gz bin
|
|
|
|
- cd $CI_COMMIT_SHORT_SHA/linux/32 && sha256sum preprocessor.tar.gz > sha256sum
|
2019-10-10 07:26:34 +02:00
|
|
|
artifacts:
|
|
|
|
paths:
|
2019-10-17 15:45:53 +02:00
|
|
|
- $CI_COMMIT_SHORT_SHA/linux/32/*
|
2020-05-13 20:43:36 +02:00
|
|
|
expire_in: 1 day
|
2019-10-10 07:26:34 +02:00
|
|
|
|
|
|
|
build_linux_64:
|
|
|
|
stage: build
|
|
|
|
script:
|
|
|
|
- autoreconf -si
|
2019-10-17 15:45:53 +02:00
|
|
|
- './configure LDFLAGS="-static -static-libgcc -static-libstdc++"'
|
2019-10-10 07:26:34 +02:00
|
|
|
- make -j$(nproc)
|
|
|
|
- strip src/dynare_m
|
|
|
|
- mkdir -p bin
|
|
|
|
- mv src/dynare_m bin
|
|
|
|
- mkdir -p $CI_COMMIT_SHORT_SHA/linux/64
|
2019-10-17 15:45:53 +02:00
|
|
|
- tar cfz $CI_COMMIT_SHORT_SHA/linux/64/preprocessor.tar.gz bin
|
|
|
|
- cd $CI_COMMIT_SHORT_SHA/linux/64 && sha256sum preprocessor.tar.gz > sha256sum
|
2019-10-10 07:26:34 +02:00
|
|
|
artifacts:
|
|
|
|
paths:
|
2019-10-17 15:45:53 +02:00
|
|
|
- $CI_COMMIT_SHORT_SHA/linux/64/*
|
2020-05-13 20:43:36 +02:00
|
|
|
expire_in: 1 day
|
2019-10-10 07:26:34 +02:00
|
|
|
|
|
|
|
build_windows_32:
|
|
|
|
stage: build
|
|
|
|
script:
|
2019-10-17 16:03:22 +02:00
|
|
|
- mkdir -p ~/tarballs
|
2020-05-27 18:38:13 +02:00
|
|
|
- '[[ -f ~/tarballs/mingw-w64-i686-boost-$MINGW32_BOOST_VERSION-any.pkg.tar.zst ]] || wget $WGET_OPTIONS -P ~/tarballs http://repo.msys2.org/mingw/i686/mingw-w64-i686-boost-$MINGW32_BOOST_VERSION-any.pkg.tar.zst'
|
2019-10-10 07:26:34 +02:00
|
|
|
- mkdir -p deps
|
2020-05-27 18:38:13 +02:00
|
|
|
- tar xf ~/tarballs/mingw-w64-i686-boost-$MINGW32_BOOST_VERSION-any.pkg.tar.zst --directory deps
|
2019-10-10 07:26:34 +02:00
|
|
|
- autoreconf -si
|
|
|
|
- './configure --host=i686-w64-mingw32 --with-boost=$(pwd)/deps/mingw32/include LDFLAGS="-static -static-libgcc -static-libstdc++"'
|
|
|
|
- make -j$(nproc)
|
|
|
|
- i686-w64-mingw32-strip src/dynare_m.exe
|
|
|
|
- mkdir -p bin
|
|
|
|
- mv src/dynare_m.exe bin
|
|
|
|
- mkdir -p $CI_COMMIT_SHORT_SHA/windows/32
|
2019-10-17 15:45:53 +02:00
|
|
|
- tar cfz $CI_COMMIT_SHORT_SHA/windows/32/preprocessor.tar.gz bin
|
|
|
|
- cd $CI_COMMIT_SHORT_SHA/windows/32 && sha256sum preprocessor.tar.gz > sha256sum
|
2019-10-10 07:26:34 +02:00
|
|
|
artifacts:
|
|
|
|
paths:
|
2019-10-17 15:45:53 +02:00
|
|
|
- $CI_COMMIT_SHORT_SHA/windows/32/*
|
2020-05-13 20:43:36 +02:00
|
|
|
expire_in: 1 day
|
2019-10-10 07:26:34 +02:00
|
|
|
|
|
|
|
build_windows_64:
|
|
|
|
stage: build
|
|
|
|
script:
|
2019-10-17 16:03:22 +02:00
|
|
|
- mkdir -p ~/tarballs
|
2020-05-27 18:38:13 +02:00
|
|
|
- '[[ -f ~/tarballs/mingw-w64-x86_64-boost-$MINGW64_BOOST_VERSION-any.pkg.tar.zst ]] || wget $WGET_OPTIONS -P ~/tarballs http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-boost-$MINGW64_BOOST_VERSION-any.pkg.tar.zst'
|
2019-10-10 07:26:34 +02:00
|
|
|
- mkdir -p deps
|
2020-05-27 18:38:13 +02:00
|
|
|
- tar xf ~/tarballs/mingw-w64-x86_64-boost-$MINGW64_BOOST_VERSION-any.pkg.tar.zst --directory deps
|
2019-10-10 07:26:34 +02:00
|
|
|
- autoreconf -si
|
2019-10-17 15:45:53 +02:00
|
|
|
- './configure --host=x86_64-w64-mingw32 --with-boost=$(pwd)/deps/mingw64/include LDFLAGS="-static -static-libgcc -static-libstdc++"'
|
2019-10-10 07:26:34 +02:00
|
|
|
- make -j$(nproc)
|
|
|
|
- x86_64-w64-mingw32-strip src/dynare_m.exe
|
|
|
|
- mkdir -p bin
|
|
|
|
- mv src/dynare_m.exe bin
|
|
|
|
- mkdir -p $CI_COMMIT_SHORT_SHA/windows/64
|
2019-10-17 15:45:53 +02:00
|
|
|
- tar cfz $CI_COMMIT_SHORT_SHA/windows/64/preprocessor.tar.gz bin
|
|
|
|
- cd $CI_COMMIT_SHORT_SHA/windows/64 && sha256sum preprocessor.tar.gz > sha256sum
|
2019-10-10 07:26:34 +02:00
|
|
|
artifacts:
|
|
|
|
paths:
|
2019-10-17 15:45:53 +02:00
|
|
|
- $CI_COMMIT_SHORT_SHA/windows/64/*
|
2020-05-13 20:43:36 +02:00
|
|
|
expire_in: 1 day
|
2019-10-10 07:26:34 +02:00
|
|
|
|
|
|
|
build_macOS:
|
|
|
|
stage: build
|
|
|
|
tags:
|
|
|
|
- macOS
|
|
|
|
script:
|
|
|
|
- autoreconf -si
|
2019-10-17 15:45:53 +02:00
|
|
|
- './configure CXX=g++-9 CXXFLAGS=-static-libgcc'
|
2019-10-10 07:26:34 +02:00
|
|
|
- make -j$(nproc)
|
|
|
|
- strip src/dynare_m
|
|
|
|
- mkdir -p bin
|
|
|
|
- mv src/dynare_m bin
|
|
|
|
- mkdir -p $CI_COMMIT_SHORT_SHA/macOS/64
|
2019-10-17 15:45:53 +02:00
|
|
|
- tar cfz $CI_COMMIT_SHORT_SHA/macOS/64/preprocessor.tar.gz bin
|
|
|
|
- cd $CI_COMMIT_SHORT_SHA/macOS/64 && sha256sum preprocessor.tar.gz > sha256sum
|
2019-10-10 07:26:34 +02:00
|
|
|
artifacts:
|
|
|
|
paths:
|
2019-10-17 15:45:53 +02:00
|
|
|
- $CI_COMMIT_SHORT_SHA/macOS/64/*
|
2020-05-13 20:43:36 +02:00
|
|
|
expire_in: 1 day
|
2019-10-10 07:26:34 +02:00
|
|
|
|
|
|
|
aggregate_builds:
|
|
|
|
stage: prepare
|
|
|
|
dependencies:
|
|
|
|
- build_linux_32
|
|
|
|
- build_linux_64
|
|
|
|
- build_windows_32
|
|
|
|
- build_windows_64
|
|
|
|
- build_macOS
|
|
|
|
script:
|
2019-10-17 15:45:53 +02:00
|
|
|
- linux32sha=$(cut -f 1 -d ' ' < $CI_COMMIT_SHORT_SHA/linux/32/sha256sum)
|
|
|
|
- linux64sha=$(cut -f 1 -d ' ' < $CI_COMMIT_SHORT_SHA/linux/64/sha256sum)
|
|
|
|
- windows32sha=$(cut -f 1 -d ' ' < $CI_COMMIT_SHORT_SHA/windows/32/sha256sum)
|
|
|
|
- windows64sha=$(cut -f 1 -d ' ' < $CI_COMMIT_SHORT_SHA/windows/64/sha256sum)
|
|
|
|
- macOS64sha=$(cut -f 1 -d ' ' < $CI_COMMIT_SHORT_SHA/macOS/64/sha256sum)
|
|
|
|
- cd $CI_COMMIT_SHORT_SHA
|
2019-10-10 07:26:34 +02:00
|
|
|
- echo 'PREPROCESSOR_VERSION = "'$CI_COMMIT_SHORT_SHA'"' > julia.conf
|
|
|
|
- echo 'REMOTE_PATH = "https://www.dynare.org/preprocessor/'$CI_COMMIT_SHORT_SHA'"' >> julia.conf
|
|
|
|
- echo -e "\n" >> julia.conf
|
|
|
|
- echo "download_info = Dict(" >> julia.conf
|
|
|
|
- echo " Linux(:i686, :glibc) => ("\"\$REMOTE_PATH/linux/32/preprocessor.tar.gz\"", "\"$linux32sha\"")," >> julia.conf
|
|
|
|
- echo " Linux(:x86_64, :glibc) => ("\"\$REMOTE_PATH/linux/64/preprocessor.tar.gz\"", "\"$linux64sha\"")," >> julia.conf
|
|
|
|
- echo " Windows(:i686) => ("\"\$REMOTE_PATH/windows/32/preprocessor.tar.gz\"", "\"$windows32sha\"")," >> julia.conf
|
|
|
|
- echo " Windows(:x86_64) => ("\"\$REMOTE_PATH/windows/64/preprocessor.tar.gz\"", "\"$windows64sha\"")," >> julia.conf
|
|
|
|
- echo " MacOS() => ("\"\$REMOTE_PATH/macOS/64/preprocessor.tar.gz\"", "\"$macOS64sha\"")," >> julia.conf
|
|
|
|
- echo " )" >> julia.conf
|
|
|
|
artifacts:
|
|
|
|
paths:
|
2019-10-17 15:45:53 +02:00
|
|
|
- $CI_COMMIT_SHORT_SHA/*/*/*
|
2019-10-10 07:26:34 +02:00
|
|
|
- $CI_COMMIT_SHORT_SHA/julia.conf
|
|
|
|
expire_in: 1 week
|