From 6ee60632f9ae78e62f04200e919d8b6d6dd60c87 Mon Sep 17 00:00:00 2001 From: Tobias Frust Date: Tue, 9 Jul 2019 10:12:12 +0200 Subject: [PATCH] Add C++ HelloWorld example and corresponding CI job --- .gitlab-ci.yml | 16 ++++++++++++++-- src/helloworld.cpp | 6 ++++++ 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 src/helloworld.cpp diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 42858ff..2c8302b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,3 +1,15 @@ -hello-world: +build:gcclatest: + image: gcc:latest + stage: build script: - - echo "Hello World" + - g++ src/helloworld.cpp -o helloWorld + artifacts: + paths: + - helloWorld + +test:gcclatest: + image: gcc:latest + script: + - ./helloWorld + dependencies: + - build:gcclatest diff --git a/src/helloworld.cpp b/src/helloworld.cpp new file mode 100644 index 0000000..86bb659 --- /dev/null +++ b/src/helloworld.cpp @@ -0,0 +1,6 @@ +#include + +int main(){ + std::cout << "Hello World!" << std::endl; + return 0; +}