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

Added extra credit testing

parent 34686e7a
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -5,8 +5,9 @@ stages:

include:
  - local: 'ci_cd/problem2.yml'   # hw3, problem 1
  - local: 'ci_cd/problem3.yml'   # hw3, problem 2
  - local: 'ci_cd/problem4.yml'   # hw3, problem 2
  - local: 'ci_cd/problem3.yml'   # hw3, problem 3
  - local: 'ci_cd/problem4.yml'   # hw3, problem 4
  - local: 'ci_cd/wzre.yml'       # hw3, extra credit

default:
  timeout: 5m

ci_cd/extra.yml

0 → 100644
+56 −0
Original line number Diff line number Diff line
prebuild_extra:
  stage: extra
  script:
    - |
      # Check if extra.cpp exists
      if [ ! -f "extra.cpp" ]; then
        echo "extra.cpp does not exist";
        exit 1;
      fi
  rules:
    - if: '$CI_COMMIT_REF_NAME == "extra"'
  tags: [shell]

prebuild_extra_SKIP:
  stage: extra
  script:
    - echo "SKIPPING extra credit checks because the branch name is not 'extra'"
  rules:
    - if: '$CI_COMMIT_REF_NAME != "extra"'
  tags: [shell]

compile_extra:
  stage: extra
  script:
    - echo "Compiling extra.cpp"
    - git clone https://agile.bu.edu/gitlab/configs/ec327/hw-configs/hw3.git base_extra
    - cp extra.cpp base_extra/tests
    - cd base_extra/tests
    - make extra
  rules:
    - if: '$CI_COMMIT_REF_NAME == "extra"'
  tags: [c++-17]

lint_extra:
  stage: extra
  script:
    - echo "Static code check of extra.cpp"
    - cppcheck --check-config --enable=all --inconclusive --error-exitcode=1 extra.cpp
  allow_failure: false
  rules:
    - if: '$CI_COMMIT_REF_NAME == "extra"'
  tags: [cppcheck]

test_extra:
  stage: extra
  script:
    - echo "Testing Extra Credit";
    - git clone https://trachten-gitlab:${INTERNAL_HW_TESTS}@agile.bu.edu/gitlab/ec327/ec327-staff/hws/hw3-staff.git
    - cp extra.cpp base_extra/tests
    - cd base_extra/tests
    - make extra
    - ./extra
  rules:
    - if: '$CI_COMMIT_REF_NAME == "extra"'
  tags: [c++-17]
  timeout: 15m
+6 −6
Original line number Diff line number Diff line
@@ -23,9 +23,9 @@ compile_problem_4:
  stage: problem4
  script:
    - echo "Compiling problem4.cpp"
    - git clone https://agile.bu.edu/gitlab/configs/ec327/hw-configs/hw3.git base_3
    - cp problem4.cpp base_3/tests
    - cd base_3/tests
    - git clone https://agile.bu.edu/gitlab/configs/ec327/hw-configs/hw3.git base_4
    - cp problem4.cpp base_4/tests
    - cd base_4/tests
    - make problem4
  rules:
    - if: '$CI_COMMIT_REF_NAME == "problem4"'
@@ -45,9 +45,9 @@ test_problem_4:
  stage: problem4
  script:
    - echo "Testing problem 4";
    - git clone https://agile.bu.edu/gitlab/configs/ec327/hw-configs/hw3.git base_3
    - cp problem4.cpp base_3/tests
    - cd base_3/tests
    - git clone https://agile.bu.edu/gitlab/configs/ec327/hw-configs/hw3.git base_4
    - cp problem4.cpp base_4/tests
    - cd base_4/tests
    - make problem4
    - ./problem4
  rules: