CI: take advantage of the new “needs” keyword

In particular, this allows us to split the “test” and “pkg” stages, without
increasing the execution time.
time-shift
Sébastien Villemot 2020-11-03 11:11:11 +01:00
parent 78462b1bbd
commit ac59b22015
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
1 changed files with 18 additions and 18 deletions

View File

@ -20,7 +20,8 @@ before_script:
stages: stages:
- build - build
- test_and_pkg - test
- pkg
- deploy - deploy
build_binaries: build_binaries:
@ -64,7 +65,7 @@ build_doc:
expire_in: 1 week expire_in: 1 week
pkg_source: pkg_source:
stage: test_and_pkg stage: pkg
script: script:
- rm doc/manual/source/_static/mathjax && sed -i "/^mathjax_path *=/d" doc/manual/source/conf.py - rm doc/manual/source/_static/mathjax && sed -i "/^mathjax_path *=/d" doc/manual/source/conf.py
- 'for f in configure.ac preprocessor/configure.ac mex/build/matlab/configure.ac mex/build/octave/configure.ac; do sed -i "s/^AC_INIT(\[\(.*\)\],\s*\[\(.*\)\])/AC_INIT([\1], [$VERSION])/" $f; done' - 'for f in configure.ac preprocessor/configure.ac mex/build/matlab/configure.ac mex/build/octave/configure.ac; do sed -i "s/^AC_INIT(\[\(.*\)\],\s*\[\(.*\)\])/AC_INIT([\1], [$VERSION])/" $f; done'
@ -75,10 +76,10 @@ pkg_source:
paths: paths:
- dynare-*.tar.xz - dynare-*.tar.xz
expire_in: 1 week expire_in: 1 week
dependencies: [] needs: []
pkg_windows: pkg_windows:
stage: test_and_pkg stage: pkg
script: script:
- ln -s ~/tarballs windows/deps/ - ln -s ~/tarballs windows/deps/
- make -C windows - make -C windows
@ -96,11 +97,10 @@ pkg_windows:
- windows/7z/* - windows/7z/*
- windows/zip/* - windows/zip/*
expire_in: 1 week expire_in: 1 week
dependencies: needs: [ "build_doc" ]
- build_doc
pkg_macOS: pkg_macOS:
stage: test_and_pkg stage: pkg
script: script:
- ln -s ~/tarballs macOS/deps/ - ln -s ~/tarballs macOS/deps/
- make -C macOS - make -C macOS
@ -115,11 +115,10 @@ pkg_macOS:
paths: paths:
- macOS/pkg/* - macOS/pkg/*
expire_in: 1 week expire_in: 1 week
dependencies: needs: [ "build_doc" ]
- build_doc
.test_matlab_template: .test_matlab_template:
stage: test_and_pkg stage: test
artifacts: artifacts:
paths: paths:
- tests/*.m.log - tests/*.m.log
@ -132,8 +131,7 @@ pkg_macOS:
- tests/*/*/*.jnl - tests/*/*/*.jnl
- tests/run_test_matlab_output.txt - tests/run_test_matlab_output.txt
when: always when: always
dependencies: needs: [ "build_binaries" ]
- build_binaries
test_matlab: test_matlab:
extends: .test_matlab_template extends: .test_matlab_template
@ -153,7 +151,7 @@ test_old_matlab:
when: manual when: manual
test_octave: test_octave:
stage: test_and_pkg stage: test
variables: variables:
OPENBLAS_NUM_THREADS: 1 OPENBLAS_NUM_THREADS: 1
script: script:
@ -172,12 +170,11 @@ test_octave:
- tests/*/*/*.jnl - tests/*/*/*.jnl
- tests/run_test_octave_output.txt - tests/run_test_octave_output.txt
when: always when: always
dependencies: needs: [ "build_binaries" ]
- build_binaries
when: manual when: manual
test_dynare++: test_dynare++:
stage: test_and_pkg stage: test
script: script:
- autoreconf -si - autoreconf -si
- ./configure --disable-matlab --disable-octave - ./configure --disable-matlab --disable-octave
@ -186,8 +183,7 @@ test_dynare++:
- touch dynare++/*/*.a dynare++/*/*/*.a - touch dynare++/*/*.a dynare++/*/*/*.a
- touch dynare++/integ/src/quadrature-points dynare++/src/dynare++ - touch dynare++/integ/src/quadrature-points dynare++/src/dynare++
- make -C dynare++ check - make -C dynare++ check
dependencies: needs: [ "build_binaries" ]
- build_binaries
artifacts: artifacts:
paths: paths:
- dynare++/kord/out.txt - dynare++/kord/out.txt
@ -196,6 +192,10 @@ test_dynare++:
- dynare++/tests/*.mat - dynare++/tests/*.mat
- dynare++/tests/*.dump - dynare++/tests/*.dump
# For the deploy jobs, we dont use the “needs” keyword, since we dont want
# those jobs to start before the “test” and “pkg” stages have succeeded. Hence
# we stick to the “dependencies” keyword.
deploy_manual_unstable: deploy_manual_unstable:
stage: deploy stage: deploy
rules: rules: