Skip to content
Snippets Groups Projects
Commit 3e89d665 authored by Matthieu Boileau's avatar Matthieu Boileau
Browse files

Add helloworld

parent de6798ab
Branches
Tags
No related merge requests found
...@@ -2,3 +2,4 @@ ...@@ -2,3 +2,4 @@
.cache .cache
__pycache__ __pycache__
*.so *.so
*.e
...@@ -18,7 +18,15 @@ b:docker: ...@@ -18,7 +18,15 @@ b:docker:
- docker build --pull -t $CONTAINER_TEST_IMAGE -f ./docker/Dockerfile-rosen . - docker build --pull -t $CONTAINER_TEST_IMAGE -f ./docker/Dockerfile-rosen .
- docker push $CONTAINER_TEST_IMAGE - docker push $CONTAINER_TEST_IMAGE
t:docker: t:helloworld:
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 stage: test
tags: tags:
- shell, docker - shell, docker
......
#include <stdio.h>
int main(void)
{
printf("hello, world\n");
return 0;
}
.PHONY: clean pythran .PHONY: clean pythran
all: pythran all: C pythran
C:
gcc helloworld.c -o helloworld.e
pythran: pythran:
pythran rosenbrock.py -o rosenbrock_pythran.so pythran rosenbrock.py -o rosenbrock_pythran.so
clean: clean:
rm -rf *.so *.pyf *.pyc __pycache__ rm -rf *.o *.e *.so *.pyf *.pyc __pycache__
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Test helloworld.c
"""
import os
assert os.popen('./helloworld.e', 'r').read() == "hello, world\n"
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment