diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2cf3749fab658b65a549400cc5a0b714eeca87a2..9f990701adf4832d3276bf1973847ea0e73d5e0b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,17 +1,32 @@ -image: python:3.7.7-buster +image: python:3.8.6 + +stages: + - build-img + - test + +build-img: + stage: build-img + image: + name: gcr.io/kaniko-project/executor:debug + entrypoint: [""] + script: + - mkdir -p /kaniko/.docker + - echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json + - /kaniko/executor --cache=true --context $CI_PROJECT_DIR --dockerfile ./Dockerfile --destination $CI_REGISTRY_IMAGE:latest + tags: + - docker -variables: - GIT_STRATEGY: fetch - GIT_SUBMODULE_STRATEGY: normal ###### Test jobs ##### .test:meson: &conan_def + stage: test + image: $CI_REGISTRY_IMAGE:latest + needs: ['build-img'] script: - - python -m pip install conan - conan create . -s build_type=$BUILD_TYPE tags: - - mfix-exa + - docker test:meson:debug: variables: @@ -25,14 +40,16 @@ test:meson:release: <<: *conan_def .test:cmake: &cmake_def + stage: test + image: $CI_REGISTRY_IMAGE:latest + needs: ['build-img'] script: - - python -m pip install cmake ninja conan - cmake -S. -Bbuild -GNinja -DCMAKE_BUILD_TYPE=$BUILD_TYPE - cmake --build build --target unit_tests_csg - cd build - ctest tags: - - mfix-exa + - docker test:cmake:debug: variables: diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..d7b8b1314a8304d2f8473851eb2a26e08dff49b5 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +# Docker Image for running csg-eb tests + +FROM python:3.8.6 + +MAINTAINER Mark Meredith + +RUN wget https://bootstrap.pypa.io/get-pip.py +RUN python3 get-pip.py +RUN python3 -m pip install cmake conan ninja + +CMD [ "/bin/bash" ] diff --git a/conanfile.py b/conanfile.py index d0924b1d33bdcb48ddb37e22b0de3f3a5c3815fb..eb217069ba2c324b2bf91ec6a97f9e961093eb37 100644 --- a/conanfile.py +++ b/conanfile.py @@ -15,9 +15,9 @@ class CsgEbConan(ConanFile): options = {"shared": [True, False]} default_options = {"shared": False} generators = "pkg_config" - requires = ("catch2/2.13.0", "cgal/5.0.2", "taocpp-pegtl/2.8.3") + requires = ("catch2/2.13.2", "cgal/5.1", "taocpp-pegtl/2.8.3") build_requires = ( - "meson/0.55.0", + "meson/0.55.3", "pkg-config_installer/0.29.2@bincrafters/stable", ) exports_sources = "meson.build", "include/*", "src/*"