From e05bb97a8ac0c6ef00b357ffc3b634cfd3c2ece8 Mon Sep 17 00:00:00 2001 From: Matthieu Boileau <matthieu.boileau@math.unistra.fr> Date: Mon, 20 Nov 2017 23:10:40 +0100 Subject: [PATCH] Update makefile and .gitlab-ci.yml --- .gitlab-ci.yml | 37 ++++--------------------------------- makefile | 7 ++++--- 2 files changed, 8 insertions(+), 36 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 81ff6e9..35105b0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,47 +1,18 @@ stages: - build - test - - release -variables: - CONTAINER_TEST_IMAGE: boileaum/rosen:$CI_COMMIT_REF_NAME - CONTAINER_RELEASE_IMAGE: boileaum/rosen:latest - -before_script: - - echo $DOCKERHUB_PASSWD | docker login -u boileaum --password-stdin - -b:docker: +build_hello: stage: build tags: - shell, docker script: - - docker build --pull -t $CONTAINER_TEST_IMAGE -f ./docker/Dockerfile-rosen . - - docker push $CONTAINER_TEST_IMAGE + - make -t:helloworld: +test_hello: stage: test tags: - shell, docker script: - - docker pull $CONTAINER_TEST_IMAGE - - docker run $CONTAINER_TEST_IMAGE /bin/bash -c 'python test_helloworld.py' - -t:rosen: - stage: test - tags: - - shell, docker - script: - - docker pull $CONTAINER_TEST_IMAGE - - docker run $CONTAINER_TEST_IMAGE /bin/bash -c 'pytest -v' - -r:docker: - stage: release - tags: - - shell, docker - script: - - docker pull $CONTAINER_TEST_IMAGE - - docker tag $CONTAINER_TEST_IMAGE $CONTAINER_RELEASE_IMAGE - - docker push $CONTAINER_RELEASE_IMAGE - only: - - master + - make test diff --git a/makefile b/makefile index 046d6ae..4c8d33d 100644 --- a/makefile +++ b/makefile @@ -1,9 +1,10 @@ -.PHONY: clean - all: helloworld helloworld: - gcc helloworld.c -o helloworld.e + cc helloworld.c -o helloworld.e + +test: helloworld + python test_helloworld.py clean: rm -rf *.o *.e *.so *.pyf *.pyc __pycache__ -- GitLab