From 4920859e9f302be1e9898c9cc653cc3d2c2df69f Mon Sep 17 00:00:00 2001 From: Ruixiang Du Date: Mon, 7 Sep 2020 12:07:57 +0800 Subject: [PATCH] updated ci config, test using different images --- .gitlab-ci.yml | 41 +++++++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a82f907..39d998d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,25 +1,30 @@ -image: rduweston/ubuntu-ci:18.04 +## Build and test as standard C++ package +cpp-build: + stage: cpp-build + image: rduweston/ubuntu-ci:18.04 + before_script: + - apt update && apt -y install libasio-dev + script: + - mkdir build && cd build + - cmake .. + - cmake --build . && cpack + # artifacts: + # paths: + # - build/bin + # depending on your build setup it's most likely a good idea to cache outputs to reduce the build time + # cache: + # paths: + # - "*.o" -build: - stage: build +cpp-test: + stage: cpp-test + image: rduweston/ubuntu-ci:18.04 before_script: - apt update && apt -y install libasio-dev script: - mkdir build && cd build - cmake -DBUILD_TESTS=ON .. - - cmake --build . && cpack - artifacts: - paths: - - build/bin - # depending on your build setup it's most likely a good idea to cache outputs to reduce the build time - # cache: - # paths: - # - "*.o" - -# run tests using the binary built before -test: - stage: test - script: + - cmake --build . - ./build/bin/gtest_all - dependencies: - - build + # dependencies: + # - cpp-build