From 30a9b33d76860249819d4382fdfd028183a4277b Mon Sep 17 00:00:00 2001 From: Arif Herusetyo Wicaksono Date: Thu, 26 Jul 2018 13:07:42 +0900 Subject: [PATCH] Add example helloworld and configuration --- .drone.yml | 8 ++++++++ .gitignore | 2 +- Makefile | 14 ++++++++++++++ helloworld.cpp | 8 ++++++++ 4 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 .drone.yml create mode 100644 Makefile create mode 100644 helloworld.cpp diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..2c2bf72 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,8 @@ +pipeline: + build: + image: gcc + commands: + - make clean + - make + - make install + diff --git a/.gitignore b/.gitignore index e257658..3edafa3 100644 --- a/.gitignore +++ b/.gitignore @@ -31,4 +31,4 @@ *.exe *.out *.app - +bin/ diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..d407405 --- /dev/null +++ b/Makefile @@ -0,0 +1,14 @@ +.PHONY: all +all: helloworld + +helloworld: helloworld.cpp + g++ helloworld.cpp -o helloworld + +.PHONY: install +install: + mkdir -p bin + mv helloworld bin + +.PHONY: clean +clean: + rm -f hello diff --git a/helloworld.cpp b/helloworld.cpp new file mode 100644 index 0000000..2a9ace7 --- /dev/null +++ b/helloworld.cpp @@ -0,0 +1,8 @@ +#include +using namespace std; + +int main() +{ + cout << "Hello, World!"; + return 0; +}