Loading ci_cd/.gitlab-ci.yml +4 −2 Original line number Diff line number Diff line stages: - LabMinusOne - LabZero - prebuild - compile - lint - test include: - local: 'ci_cd/labm1.yml' # Lab -1 Loading ci_cd/lab0.yml +24 −22 Original line number Diff line number Diff line stages: - LabZero - prebuild - compile - lint - test .only_run_if_lab0_available: &common_rules .only_run_if_lab0_available: &common_rules_0 rules: - changes: - lab0.cpp ### Lab 0 prebuild_0: stage: LabZero <<: *common_rules prebuild_lab_0: stage: prebuild <<: *common_rules_0 script: - git clone https://agile.bu.edu/gitlab/configs/ec327/lab-configs/current.git base - git clone https://agile.bu.edu/gitlab/configs/ec327/lab-configs/current.git base_0 when: on_success # only runs if the previous stage succeeds artifacts: paths: - base - base_0 - lab0.cpp tags: [c++-17] compile_0: stage: LabZero <<: *common_rules compile_lab_0: stage: compile <<: *common_rules_0 script: - echo "Compiling lab0.cpp" - g++ -c lab0.cpp artifacts: paths: - base - base_0 - lab0.* needs: [prebuild_0] tags: [c++-17] lint_0: stage: LabZero <<: *common_rules lint_lab_0: stage: lint <<: *common_rules_0 script: - echo "Static code check of lab0.cpp" - cppcheck --check-config --enable=all --inconclusive --error-exitcode=1 lab0.cpp tests/LabZero.cpp allow_failure: false needs: - compile_0 needs: [compile_0] artifacts: paths: - base - base_0 - lab0.* tags: [cppcheck] test_0: stage: LabZero <<: *common_rules test_lab_0: stage: build <<: *common_rules_0 script: - echo "Testing Lab 0"; - find . -type f Loading @@ -57,6 +60,5 @@ test_0: - g++ -c LabZero.cpp - g++ lab0.o LabZero.o - ./a.out needs: - lint_0 needs: [lint_0] tags: [shell] No newline at end of file ci_cd/labm1.yml +20 −13 Original line number Diff line number Diff line stages: - LabMinusOne - prebuild - compile - lint - test .only_run_if_lab0_available: &common_rules .only_run_if_lab-1_available: &common_rules_m1 rules: - changes: - lab-1.cpp ### Lab -1 prebuild_m1: stage: LabMinusOne <<: *common_rules prebuild_lab_m1: stage: prebuild <<: *common_rules_m1 script: - | if [ ! -f 'lab-1.cpp' ]; then Loading @@ -18,25 +21,28 @@ prebuild_m1: fi tags: [shell] compile_m1: stage: LabMinusOne compile_lab_m1: stage: compile <<: *common_rules_m1 script: - echo "Compiling lab-1.cpp" - g++ -c lab-1.cpp needs: [prebuild_lab_m1] tags: [c++-17] lint_m1: stage: LabMinusOne <<: *common_rules lint_lab_m1: stage: lint <<: *common_rules_m1 script: - echo "Static code check of lab-1.cpp" - cppcheck --enable=all --inconclusive --error-exitcode=1 lab-1.cpp allow_failure: false needs: [compile_lab_m1] tags: [cppcheck] test_m1: stage: LabMinusOne <<: *common_rules test_lab_m1: stage: test <<: *common_rules_m1 script: - echo "Testing Lab -1"; - | Loading @@ -44,4 +50,5 @@ test_m1: echo "Could not find your WikiName $GITLAB_USER_LOGIN in file lab-1.cpp"; exit 1; fi needs: [lint_lab_m1] tags: [shell] No newline at end of file Loading
ci_cd/.gitlab-ci.yml +4 −2 Original line number Diff line number Diff line stages: - LabMinusOne - LabZero - prebuild - compile - lint - test include: - local: 'ci_cd/labm1.yml' # Lab -1 Loading
ci_cd/lab0.yml +24 −22 Original line number Diff line number Diff line stages: - LabZero - prebuild - compile - lint - test .only_run_if_lab0_available: &common_rules .only_run_if_lab0_available: &common_rules_0 rules: - changes: - lab0.cpp ### Lab 0 prebuild_0: stage: LabZero <<: *common_rules prebuild_lab_0: stage: prebuild <<: *common_rules_0 script: - git clone https://agile.bu.edu/gitlab/configs/ec327/lab-configs/current.git base - git clone https://agile.bu.edu/gitlab/configs/ec327/lab-configs/current.git base_0 when: on_success # only runs if the previous stage succeeds artifacts: paths: - base - base_0 - lab0.cpp tags: [c++-17] compile_0: stage: LabZero <<: *common_rules compile_lab_0: stage: compile <<: *common_rules_0 script: - echo "Compiling lab0.cpp" - g++ -c lab0.cpp artifacts: paths: - base - base_0 - lab0.* needs: [prebuild_0] tags: [c++-17] lint_0: stage: LabZero <<: *common_rules lint_lab_0: stage: lint <<: *common_rules_0 script: - echo "Static code check of lab0.cpp" - cppcheck --check-config --enable=all --inconclusive --error-exitcode=1 lab0.cpp tests/LabZero.cpp allow_failure: false needs: - compile_0 needs: [compile_0] artifacts: paths: - base - base_0 - lab0.* tags: [cppcheck] test_0: stage: LabZero <<: *common_rules test_lab_0: stage: build <<: *common_rules_0 script: - echo "Testing Lab 0"; - find . -type f Loading @@ -57,6 +60,5 @@ test_0: - g++ -c LabZero.cpp - g++ lab0.o LabZero.o - ./a.out needs: - lint_0 needs: [lint_0] tags: [shell] No newline at end of file
ci_cd/labm1.yml +20 −13 Original line number Diff line number Diff line stages: - LabMinusOne - prebuild - compile - lint - test .only_run_if_lab0_available: &common_rules .only_run_if_lab-1_available: &common_rules_m1 rules: - changes: - lab-1.cpp ### Lab -1 prebuild_m1: stage: LabMinusOne <<: *common_rules prebuild_lab_m1: stage: prebuild <<: *common_rules_m1 script: - | if [ ! -f 'lab-1.cpp' ]; then Loading @@ -18,25 +21,28 @@ prebuild_m1: fi tags: [shell] compile_m1: stage: LabMinusOne compile_lab_m1: stage: compile <<: *common_rules_m1 script: - echo "Compiling lab-1.cpp" - g++ -c lab-1.cpp needs: [prebuild_lab_m1] tags: [c++-17] lint_m1: stage: LabMinusOne <<: *common_rules lint_lab_m1: stage: lint <<: *common_rules_m1 script: - echo "Static code check of lab-1.cpp" - cppcheck --enable=all --inconclusive --error-exitcode=1 lab-1.cpp allow_failure: false needs: [compile_lab_m1] tags: [cppcheck] test_m1: stage: LabMinusOne <<: *common_rules test_lab_m1: stage: test <<: *common_rules_m1 script: - echo "Testing Lab -1"; - | Loading @@ -44,4 +50,5 @@ test_m1: echo "Could not find your WikiName $GITLAB_USER_LOGIN in file lab-1.cpp"; exit 1; fi needs: [lint_lab_m1] tags: [shell] No newline at end of file