2019-10-10 07:26:34 +02:00
|
|
|
variables:
|
|
|
|
TERM: linux
|
2021-03-11 10:45:23 +01:00
|
|
|
MINGW32_BOOST_VERSION: 1.75.0-2
|
|
|
|
MINGW64_BOOST_VERSION: 1.75.0-2
|
2019-10-17 16:03:22 +02:00
|
|
|
WGET_OPTIONS: '--no-verbose --no-use-server-timestamps --retry-connrefused --retry-on-host-error'
|
2021-04-02 15:22:43 +02:00
|
|
|
JULIA_VERSION: 1.6.0
|
2019-10-10 07:26:34 +02:00
|
|
|
|
|
|
|
stages:
|
|
|
|
- build
|
2021-04-02 15:22:43 +02:00
|
|
|
- aggregate
|
|
|
|
- deploy
|
2019-10-10 07:26:34 +02:00
|
|
|
|
|
|
|
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)
|
2021-01-06 17:08:42 +01:00
|
|
|
- strip src/dynare-preprocessor
|
2021-04-02 15:22:43 +02:00
|
|
|
- mkdir -p $CI_COMMIT_SHA/linux-i686
|
|
|
|
- tar -caf $CI_COMMIT_SHA/linux-i686/dynare-preprocessor.tar.gz -C src dynare-preprocessor
|
2019-10-10 07:26:34 +02:00
|
|
|
artifacts:
|
|
|
|
paths:
|
2021-04-02 15:22:43 +02:00
|
|
|
- $CI_COMMIT_SHA/linux-i686/*
|
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)
|
2021-01-06 17:08:42 +01:00
|
|
|
- strip src/dynare-preprocessor
|
2021-04-02 15:22:43 +02:00
|
|
|
- mkdir -p $CI_COMMIT_SHA/linux-x86_64
|
|
|
|
- tar -caf $CI_COMMIT_SHA/linux-x86_64/dynare-preprocessor.tar.gz -C src dynare-preprocessor
|
2019-10-10 07:26:34 +02:00
|
|
|
artifacts:
|
|
|
|
paths:
|
2021-04-02 15:22:43 +02:00
|
|
|
- $CI_COMMIT_SHA/linux-x86_64/*
|
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)
|
2021-01-06 17:08:42 +01:00
|
|
|
- i686-w64-mingw32-strip src/dynare-preprocessor.exe
|
2021-04-02 15:22:43 +02:00
|
|
|
- mkdir -p $CI_COMMIT_SHA/windows-i686
|
|
|
|
- tar -caf $CI_COMMIT_SHA/windows-i686/dynare-preprocessor.tar.gz -C src dynare-preprocessor.exe
|
2019-10-10 07:26:34 +02:00
|
|
|
artifacts:
|
|
|
|
paths:
|
2021-04-02 15:22:43 +02:00
|
|
|
- $CI_COMMIT_SHA/windows-i686/*
|
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)
|
2021-01-06 17:08:42 +01:00
|
|
|
- x86_64-w64-mingw32-strip src/dynare-preprocessor.exe
|
2021-04-02 15:22:43 +02:00
|
|
|
- mkdir -p $CI_COMMIT_SHA/windows-x86_64
|
|
|
|
- tar -caf $CI_COMMIT_SHA/windows-x86_64/dynare-preprocessor.tar.gz -C src dynare-preprocessor.exe
|
2019-10-10 07:26:34 +02:00
|
|
|
artifacts:
|
|
|
|
paths:
|
2021-04-02 15:22:43 +02:00
|
|
|
- $CI_COMMIT_SHA/windows-x86_64/*
|
2019-10-10 07:26:34 +02:00
|
|
|
|
|
|
|
build_macOS:
|
|
|
|
stage: build
|
|
|
|
tags:
|
|
|
|
- macOS
|
|
|
|
script:
|
|
|
|
- autoreconf -si
|
2021-01-07 18:35:02 +01:00
|
|
|
- './configure CXX=g++-10 CXXFLAGS=-static-libgcc LEX=/usr/local/opt/flex/bin/flex YACC=/usr/local/opt/bison/bin/bison'
|
2019-10-10 07:26:34 +02:00
|
|
|
- make -j$(nproc)
|
2021-01-06 17:08:42 +01:00
|
|
|
- strip src/dynare-preprocessor
|
2021-04-02 15:22:43 +02:00
|
|
|
- mkdir -p $CI_COMMIT_SHA/macos-x86_64
|
|
|
|
- tar -caf $CI_COMMIT_SHA/macos-x86_64/dynare-preprocessor.tar.gz -C src dynare-preprocessor
|
2019-10-10 07:26:34 +02:00
|
|
|
artifacts:
|
|
|
|
paths:
|
2021-04-02 15:22:43 +02:00
|
|
|
- $CI_COMMIT_SHA/macos-x86_64/*
|
2019-10-10 07:26:34 +02:00
|
|
|
|
2021-04-02 15:22:43 +02:00
|
|
|
aggregate_julia:
|
|
|
|
stage: aggregate
|
2019-10-10 07:26:34 +02:00
|
|
|
dependencies:
|
|
|
|
- build_linux_32
|
|
|
|
- build_linux_64
|
|
|
|
- build_windows_32
|
|
|
|
- build_windows_64
|
|
|
|
- build_macOS
|
|
|
|
script:
|
2021-04-02 15:22:43 +02:00
|
|
|
- PATH=$PATH:/usr/local/julia/$JULIA_VERSION/bin scripts/create-julia-artifacts-toml $CI_COMMIT_SHA https://www.dynare.org/preprocessor
|
2019-10-10 07:26:34 +02:00
|
|
|
artifacts:
|
|
|
|
paths:
|
2021-04-02 15:22:43 +02:00
|
|
|
- $CI_COMMIT_SHA/Artifacts.toml
|
|
|
|
|
|
|
|
deploy_julia:
|
|
|
|
stage: deploy
|
|
|
|
dependencies:
|
|
|
|
- build_linux_32
|
|
|
|
- build_linux_64
|
|
|
|
- build_windows_32
|
|
|
|
- build_windows_64
|
|
|
|
- build_macOS
|
|
|
|
- aggregate_julia
|
|
|
|
tags:
|
|
|
|
- restricted
|
|
|
|
rules:
|
|
|
|
- if: '$CI_PROJECT_NAMESPACE == "Dynare" && $CI_COMMIT_REF_NAME == "master"'
|
|
|
|
when: manual
|
2021-04-02 17:50:19 +02:00
|
|
|
allow_failure: true
|
2021-04-02 15:22:43 +02:00
|
|
|
- when: never
|
|
|
|
script:
|
|
|
|
- cp -R $CI_COMMIT_SHA /srv/www.dynare.org/preprocessor/
|