dynare/.gitlab-ci.yml

173 lines
5.1 KiB
YAML
Raw Normal View History

2018-09-12 18:53:44 +02:00
variables:
GIT_SUBMODULE_STRATEGY: normal
TERM: linux
2018-09-12 18:53:44 +02:00
# The next stanza creates the version number used for the source tarball and the
# binary packages. Here are the following possible cases:
# - if VERSION was already set (when manually running a pipeline), use it
# - if we are in the official Dynare repository:
# + if on a tag: use the tag
# + if on master: use 4.6-unstable-$TIMESTAMP-$COMMIT
# + on another branch: use $BRANCH-$TIMESTAMP-$COMMIT
# - if in a personal repository: use $USER-$TIMESTAMP-$COMMIT
before_script:
- '[ -z "$VERSION" ] && [ "$CI_PROJECT_NAMESPACE" = Dynare ] && [ -n "$CI_COMMIT_TAG" ] && export VERSION="$CI_COMMIT_TAG"'
- '[ -z "$VERSION" ] && [ "$CI_PROJECT_NAMESPACE" = Dynare ] && [ "$CI_COMMIT_REF_NAME" = master ] && export VERSION="4.6-unstable-$(date +%F-%H%M)-$CI_COMMIT_SHORT_SHA"'
- '[ -z "$VERSION" ] && [ "$CI_PROJECT_NAMESPACE" = Dynare ] && export VERSION="$CI_COMMIT_REF_NAME-$(date +%F-%H%M)-$CI_COMMIT_SHORT_SHA"'
- '[ -z "$VERSION" ] && export VERSION="$CI_PROJECT_NAMESPACE-$(date +%F-%H%M)-$CI_COMMIT_SHORT_SHA"'
stages:
- build
- test_and_pkg
- deploy
2018-09-12 18:49:48 +02:00
build_binaries:
stage: build
script:
- autoreconf -si
- './configure --with-matlab=$(dirname $(dirname $(readlink -f `which matlab`))) MATLAB_VERSION=$(echo version | matlab -nodesktop -nodisplay -nosplash 2>/dev/null | sed -En "/ans\ =/!d;n;n;s/^[^0-9]*([0-9]+\.[0-9]+).*$/\1/;p")'
- make -j $(nproc) LN_S="cp -p"
2018-09-12 18:49:48 +02:00
artifacts:
paths:
- matlab/preprocessor*/*
2018-09-12 18:49:48 +02:00
- mex/octave/
- mex/matlab/
2019-01-24 17:56:43 +01:00
- dynare++/parser/cc/*_tab.cc
2019-01-24 19:57:21 +01:00
- dynare++/parser/cc/*_tab.hh
2019-01-24 17:56:43 +01:00
- dynare++/parser/cc/*_ll.cc
- dynare++/src/*_tab.cc
2019-01-24 19:57:21 +01:00
- dynare++/src/*_tab.hh
2019-01-24 17:56:43 +01:00
- dynare++/src/*_ll.cc
- dynare++/*/*.o
- dynare++/*/*.a
- dynare++/*/*/*.o
- dynare++/*/*/*.a
- dynare++/integ/src/quadrature-points
2018-09-12 18:49:48 +02:00
- dynare++/src/dynare++
expire_in: 1 week
2018-09-12 18:49:48 +02:00
build_doc:
stage: build
script:
- autoreconf -si
- ./configure --disable-matlab --disable-octave
- make -j $(nproc) pdf html
2018-09-12 18:49:48 +02:00
artifacts:
paths:
- doc/manual/build/
- doc/*.pdf
- doc/*/*.pdf
- dynare++/doc/*.pdf
- preprocessor/doc/*/*.pdf
expire_in: 1 week
2018-09-13 16:18:23 +02:00
pkg_windows:
stage: test_and_pkg
script:
- ln -s ~/tarballs windows/deps/
- make -C windows
cache:
key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
paths:
- windows/deps/sources32/
- 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/*
- windows/zip/*
expire_in: 1 week
dependencies:
- build_doc
2019-03-25 17:39:55 +01:00
.test_matlab_template:
stage: test_and_pkg
artifacts:
paths:
- tests/*.m.log
- tests/*.m.trs
- tests/*/*.m.log
- tests/*/*.m.trs
2019-02-01 14:51:48 +01:00
- tests/*/*.jnl
- tests/*/*/*.m.log
- tests/*/*/*.m.trs
2019-02-01 14:51:48 +01:00
- tests/*/*/*.jnl
- tests/run_test_matlab_output.txt
when: always
2018-09-13 16:18:23 +02:00
dependencies:
- build_binaries
2019-03-25 17:39:55 +01:00
test_matlab:
extends: .test_matlab_template
script:
- autoreconf -si
- './configure --disable-octave --with-matlab=$(dirname $(dirname $(readlink -f `which matlab`))) MATLAB_VERSION=$(echo version | matlab -nodesktop -nodisplay -nosplash 2>/dev/null | sed -En "/ans\ =/!d;n;n;s/^[^0-9]*([0-9]+\.[0-9]+).*$/\1/;p")'
- make -j $(($(nproc) * 3 / 4)) -C tests check-matlab
test_old_matlab:
2019-03-25 17:39:55 +01:00
extends: .test_matlab_template
script:
- autoreconf -si
- './configure --disable-octave --with-matlab=/usr/local/MATLAB/R2009b MATLAB_VERSION=R2009b'
- make -C mex/build/matlab clean
- make -j $(nproc) -C mex/build/matlab
- make -j $(($(nproc) * 3 / 4)) -C tests check-matlab
when: manual
test_octave:
stage: test_and_pkg
2018-09-13 16:18:23 +02:00
variables:
OPENBLAS_NUM_THREADS: 1
script:
- autoreconf -si
- ./configure --disable-matlab
- make -j $(nproc) -C tests check-octave
artifacts:
paths:
- tests/*.o.log
- tests/*.o.trs
- tests/*/*.o.log
- tests/*/*.o.trs
2019-02-01 14:51:48 +01:00
- tests/*/*.jnl
- tests/*/*/*.o.log
- tests/*/*/*.o.trs
2019-02-01 14:51:48 +01:00
- tests/*/*/*.jnl
- tests/run_test_octave_output.txt
when: always
2018-09-13 16:18:23 +02:00
dependencies:
- build_binaries
when: manual
2019-01-24 17:56:43 +01:00
test_dynare++:
stage: test_and_pkg
2019-01-24 17:56:43 +01:00
script:
- autoreconf -si
- ./configure --disable-matlab --disable-octave
- make -C dynare++ check
dependencies:
- build_binaries
artifacts:
paths:
- dynare++/kord/out.txt
- dynare++/tests/*.jnl
- dynare++/tests/*.m
- dynare++/tests/*.mat
- dynare++/tests/*.dump
deploy_manual_unstable:
stage: deploy
only:
- master@Dynare/dynare
tags:
- restricted
dependencies:
- build_doc
script:
- rm -rf doc/manual/build/html/_static/mathjax
- ln -s /usr/share/javascript/mathjax doc/manual/build/html/_static/mathjax
- rsync --recursive --links --delete doc/manual/build/html/ /srv/www.dynare.org/manual-unstable/