Skip to content
Snippets Groups Projects
.gitlab-ci.yml 597 B
Newer Older
WALTER NOA's avatar
0
WALTER NOA committed
default:
  image: gcc:latest

stages:
  - build
  - test
  - final

compile-job:
  stage: build
  script:
    - echo "Compiling the project..."
WALTER NOA's avatar
0  
WALTER NOA committed
    - gcc -c c-check/interval.c
WALTER NOA's avatar
0  
WALTER NOA committed
  artifacts:
WALTER NOA's avatar
0
WALTER NOA committed
    paths:
WALTER NOA's avatar
0  
WALTER NOA committed
      - interval.o
WALTER NOA's avatar
0  
WALTER NOA committed

test-job:
  stage: test
WALTER NOA's avatar
0  
WALTER NOA committed
  before_script:
    - apt-get update
    - apt-get install -y check
WALTER NOA's avatar
0  
WALTER NOA committed
  script:
    - echo "Testing..."
WALTER NOA's avatar
0  
WALTER NOA committed
    - gcc -c c-check/test_interval.c -lcheck -lm -lsubunit
WALTER NOA's avatar
0  
WALTER NOA committed
    - gcc -o test_interval interval.o test_interval.o -lcheck -lm -lsubunit
WALTER NOA's avatar
0  
WALTER NOA committed
    - ./test_interval
  dependencies:
WALTER NOA's avatar
0  
WALTER NOA committed
    - compile-job

final-job:
  stage: final
  script:
    - echo "All done"