Commit 9318c737 authored by Ari Trachtenberg's avatar Ari Trachtenberg
Browse files

"make" entries for each lab

added lab1.yml
parent 2b2f25a3
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -56,7 +56,6 @@ test_lab_0:
    - echo "Testing Lab 0";
    - cp lab0.o base_0/tests
    - cd base_0/tests
    - make test
    - ./test
    - make lab0
  needs: [lint_lab_0]
  tags: [c++-17]
 No newline at end of file

ci_cd/lab1.yml

0 → 100644
+61 −0
Original line number Diff line number Diff line
stages:
  - prebuild
  - compile
  - lint
  - test

.only_run_if_lab0_available: &common_rules_1
  rules:
    - changes:
        - lab1.cpp

### Lab 0
prebuild_lab_1:
  stage: prebuild
  <<: *common_rules_1
  script:
    - git clone https://agile.bu.edu/gitlab/configs/ec327/lab-configs/current.git base_1
  when: on_success # only runs if the previous stage succeeds
  artifacts:
    paths:
      - base_1
      - lab1.cpp
  tags: [c++-17]

compile_lab_1:
  stage: compile
  <<: *common_rules_1
  script:
    - echo "Compiling lab1.cpp"
    - g++ -c lab1.cpp
  artifacts:
    paths:
      - base_1
      - lab1.*
  needs: [prebuild_lab_1]
  tags: [c++-17]

lint_lab_1:
  stage: lint
  <<: *common_rules_1
  script:
    - echo "Static code check of lab1.cpp"
    - cppcheck --check-config --enable=all --inconclusive --error-exitcode=1 lab1.cpp tests/LabOne.cpp
  allow_failure: false
  needs: [compile_lab_0]
  artifacts:
    paths:
      - base_1
      - lab0.*
  tags: [cppcheck]

test_lab_1:
  stage: test
  <<: *common_rules_1
  script:
    - echo "Testing Lab 1";
    - cp lab1.o base_1/tests
    - cd base_1/tests
    - make lab1
  needs: [lint_lab_0]
  tags: [c++-17]
 No newline at end of file