Commit 65b0ac3c authored by Ari Trachtenberg's avatar Ari Trachtenberg
Browse files

Update .gitlab-ci.yml

parent 4d59ca45
Loading
Loading
Loading
Loading
+2 −46
Original line number Diff line number Diff line
stages:
  - LabMinusOne
  - LabZero

### Lab -1
prebuild_m1:
  stage: LabMinusOne
  script:
    - |
      if [ ! -f 'lab-1.cpp' ]; then
        echo "ERROR - could not find file lab-1.cpp";
        exit 1;
      fi
  tags: [shell]

compile_m1:
  stage: LabMinusOne
  script:
    - echo "Compiling lab-1.cpp"
    - g++ -c lab-1.cpp
  needs:
    - prebuild_m1
  tags: [c++-17]

lint_m1:
  stage: LabMinusOne
  script:
      - echo "Static code check of lab-1.cpp"
      - cppcheck --enable=all --inconclusive --error-exitcode=1 lab-1.cpp
  allow_failure: false
  needs:
    - compile_m1
  tags: [cppcheck]

test_m1:
  stage: LabMinusOne
  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
  needs:
    - lint_m1
  tags: [shell]
include:
  - local: 'labm1.yml'   # Lab -1
 No newline at end of file