default:
  image: gcc:latest

stages:
  - build
  - test
  - final

compile-job:
  stage: build
  script:
    - echo "Compiling the project..."
    - gcc -c c-check/interval.c
  artifacts :
    paths:
      - interval.o

final-job:
  stage: final  # Define the new final job in the final stage
  script:
    - echo "All done"  # Simple job script to indicate completion

test-job:
  stage: test
  script:
    - echo "Testing..."
    - gcc -c c-check/test_interval.c
    - gcc -o test_interval interval.o test_interval.o -lcheck -lm -lsubunit
    - ./test_interval
  dependencies:
    - compile-job