Commit e2826a70 authored by Ari Trachtenberg's avatar Ari Trachtenberg
Browse files

test

parent 2923a619
Loading
Loading
Loading
Loading
+25 −15
Original line number Diff line number Diff line
@@ -10,6 +10,10 @@ prebuild_0:
  rules:
    - exists:
        - lab0.cpp
  artifacts:
    paths:
      - base
      - lab0.cpp
  tags: [c++-17]

compile_0:
@@ -17,29 +21,35 @@ compile_0:
  script:
    - echo "Compiling lab0.cpp"
    - g++ -c lab0.cpp
  needs:
    - prebuild_0
  artifacts:
    paths:
      - base
      - lab0.*
  tags: [c++-17]

lint_m1:
  stage: LabMinusOne
lint_0:
  stage: LabZero
  script:
    - echo "Static code check of lab-1.cpp"
    - cppcheck --enable=all --inconclusive --error-exitcode=1 lab-1.cpp
    - echo "Static code check of lab0.cpp"
    - cppcheck --enable=all --inconclusive --error-exitcode=1 lab0.cpp
  allow_failure: false
  needs:
    - compile_m1
    - compile_0
  artifacts:
    paths:
      - base
      - lab0.*
  tags: [cppcheck]

test_m1:
  stage: LabMinusOne
  stage: LabZero
  script:
    - echo "Testing Lab -1";
    - |
      if ! grep -q "$GITLAB_USER_LOGIN" lab-1.cpp; then
        echo "Could not find your WikiName $GITLAB_USER_LOGIN in file lab-1.cpp";
        exit 1;
      fi
    - echo "Testing Lab 0";
    - cp lab0.o base
    - cd base
    - g++ -c LabZero.cpp
    - g++ lab0.o LabZero.o
    - ./a.out
  needs:
    - lint_m1
    - lint_0
  tags: [shell]
 No newline at end of file