diff options
author | David Tellenbach <david.tellenbach@me.com> | 2020-07-24 15:58:44 +0000 |
---|---|---|
committer | David Tellenbach <david.tellenbach@me.com> | 2020-07-24 15:58:44 +0000 |
commit | b8ca93842c02f37ed398613b03f064c707d02fdc (patch) | |
tree | 885bd350360ad3d120f6a61683272372d41fa67c /.gitlab-ci.yml | |
parent | fb0c6868ad8d43e052c9e027b41b3dfe660bb57d (diff) |
Improve CI configuration
- Fix docker Fedora image to Fedora:31
- Fix gcc version to gcc-9.2.1
- Use GitLab CI dag
- Fix usage of build cache
- Introduce build artificats
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 49 |
1 files changed, 29 insertions, 20 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 753a91dec..0b860dd63 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -14,34 +14,40 @@ stages: variables: CMAKE_GENERATOR: "Ninja" + BUILDDIR: builddir .build-tests: allow_failure: true stage: build - image: fedora + image: fedora:31 before_script: - - dnf -y install gcc-c++ cmake make ninja-build + - dnf -y install gcc-c++-9.2.1 cmake make ninja-build script: - - cmake -B builddir -DEIGEN_TEST_CXX11=${EIGEN_TEST_CXX11} - - cmake --build builddir --target buildtests + - cmake -B ${BUILDDIR} -DEIGEN_TEST_CXX11=${EIGEN_TEST_CXX11} + - cmake --build ${BUILDDIR} --target buildtests cache: - key: "$CI_JOB_NAME" + key: "build-cache-cxx11-${EIGEN_TEST_CXX11}" paths: - - builddir/ + - ${BUILDDIR}/ policy: push + artifacts: + name: "$CI_JOB_NAME-$CI_COMMIT_REF_NAME" + paths: + - ${BUILDDIR}/ + expire_in: 5 days .run_tests: allow_failure: true stage: test - image: fedora + image: fedora:31 before_script: - - dnf -y install cmake + - dnf -y install gcc-c++-9.2.1 cmake make ninja-build script: - - cd builddir && ctest --output-on-failure + - cd ${BUILDDIR} && ctest --output-on-failure cache: - key: "$CI_JOB_NAME" + key: "build-cache-cxx11-${EIGEN_TEST_CXX11}" paths: - - builddir/ + - ${BUILDDIR}/ policy: pull build-test-cxx11-on: @@ -56,26 +62,29 @@ build-test-cxx11-off: run-tests-cxx11-on: extends: .run_tests - dependencies: - - build-test-cxx11-on + variables: + EIGEN_TEST_CXX11: "ON" + needs: ["build-test-cxx11-on"] run-tests-cxx11-off: extends: .run_tests - dependencies: - - build-test-cxx11-off + variables: + EIGEN_TEST_CXX11: "OFF" + needs: ["build-test-cxx11-off"] build-doc: + image: fedora:31 only: - schedules - image: fedora stage: doc before_script: - - dnf -y install g++ cmake make doxygen doxygen-latex + - dnf -y install gcc-c++-9.2.1 cmake make doxygen doxygen-latex script: - - cmake -G "Unix Makefiles" -B builddir -DCMAKE_BUILD_TYPE=Release - - cmake --build builddir --target doc + - cmake -G "Unix Makefiles" -B ${BUILDDIR} -DCMAKE_BUILD_TYPE=Release + - cmake --build ${BUILDDIR} --target doc artifacts: name: "$CI_JOB_NAME-$CI_JOB_ID" paths: - - builddir/doc/html + - ${BUILDDIR}/doc/html expire_in: 2 days + needs: [] |