Loading ci_cd/.gitlab-ci.yml +9 −4 Original line number Diff line number Diff line stages: - prebuild - compile - lint - test - labm1 - lab0 - lab1 #stages: # - prebuild # - compile # - lint # - test include: - local: 'ci_cd/labm1.yml' # Lab -1 Loading ci_cd/lab0.yml +7 −19 Original line number Diff line number Diff line stages: - prebuild - compile - lint - test .only_run_if_lab0_available: &common_rules_0 rules: - changes: - lab0.cpp ### Lab 0 prebuild_lab_0: stage: prebuild <<: *common_rules_0 stage: lab0 script: - 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 Loading @@ -20,11 +8,13 @@ prebuild_lab_0: paths: - base_0 - lab0.cpp rules: - changes: - lab0.cpp tags: [c++-17] compile_lab_0: stage: compile <<: *common_rules_0 stage: lab0 script: - echo "Compiling lab0.cpp" - g++ -c lab0.cpp Loading @@ -36,8 +26,7 @@ compile_lab_0: tags: [c++-17] lint_lab_0: stage: lint <<: *common_rules_0 stage: lab0 script: - echo "Static code check of lab0.cpp" - cppcheck --check-config --enable=all --inconclusive --error-exitcode=1 lab0.cpp tests/LabZero.cpp Loading @@ -50,8 +39,7 @@ lint_lab_0: tags: [cppcheck] test_lab_0: stage: test <<: *common_rules_0 stage: lab0 script: - echo "Testing Lab 0"; - cp lab0.o base_0/tests Loading ci_cd/lab1.yml +7 −19 Original line number Diff line number Diff line stages: - prebuild - compile - lint - test .only_run_if_lab1_available: &common_rules_1 rules: - changes: - lab1.cpp ### Lab 1 prebuild_lab_1: stage: prebuild <<: *common_rules_1 stage: lab1 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 Loading @@ -20,11 +8,13 @@ prebuild_lab_1: paths: - base_1 - lab1.cpp rules: - changes: - lab1.cpp tags: [c++-17] compile_lab_1: stage: compile <<: *common_rules_1 stage: lab1 script: - echo "Compiling lab1.cpp" - g++ -c lab1.cpp Loading @@ -36,8 +26,7 @@ compile_lab_1: tags: [c++-17] lint_lab_1: stage: lint <<: *common_rules_1 stage: lab1 script: - echo "Static code check of lab1.cpp" - cppcheck --check-config --enable=all --inconclusive --error-exitcode=1 lab1.cpp tests/LabOne.cpp Loading @@ -50,8 +39,7 @@ lint_lab_1: tags: [cppcheck] test_lab_1: stage: test <<: *common_rules_1 stage: lab1 script: - echo "Testing Lab 1"; - cp lab1.o base_1/tests Loading ci_cd/labm1.yml +7 −18 Original line number Diff line number Diff line stages: - prebuild - compile - lint - test .only_run_if_lab-1_available: &common_rules_m1 rules: - changes: - lab-1.cpp ### Lab -1 prebuild_lab_m1: stage: prebuild <<: *common_rules_m1 stage: labm1 script: - | if [ ! -f 'lab-1.cpp' ]; then echo "ERROR - could not find file lab-1.cpp"; exit 1; fi rules: - changes: - lab-1.cpp tags: [shell] compile_lab_m1: stage: compile <<: *common_rules_m1 stage: labm1 script: - echo "Compiling lab-1.cpp" - g++ -c lab-1.cpp Loading @@ -31,8 +21,7 @@ compile_lab_m1: tags: [c++-17] lint_lab_m1: stage: lint <<: *common_rules_m1 stage: labm1 script: - echo "Static code check of lab-1.cpp" - cppcheck --enable=all --inconclusive --error-exitcode=1 lab-1.cpp Loading @@ -42,7 +31,7 @@ lint_lab_m1: # don't run the test in the master branch test_lab_m1: stage: test stage: labm1 rules: - if: '$CI_COMMIT_BRANCH != "master" && $CI_COMMIT_TAG == null' script: Loading Loading
ci_cd/.gitlab-ci.yml +9 −4 Original line number Diff line number Diff line stages: - prebuild - compile - lint - test - labm1 - lab0 - lab1 #stages: # - prebuild # - compile # - lint # - test include: - local: 'ci_cd/labm1.yml' # Lab -1 Loading
ci_cd/lab0.yml +7 −19 Original line number Diff line number Diff line stages: - prebuild - compile - lint - test .only_run_if_lab0_available: &common_rules_0 rules: - changes: - lab0.cpp ### Lab 0 prebuild_lab_0: stage: prebuild <<: *common_rules_0 stage: lab0 script: - 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 Loading @@ -20,11 +8,13 @@ prebuild_lab_0: paths: - base_0 - lab0.cpp rules: - changes: - lab0.cpp tags: [c++-17] compile_lab_0: stage: compile <<: *common_rules_0 stage: lab0 script: - echo "Compiling lab0.cpp" - g++ -c lab0.cpp Loading @@ -36,8 +26,7 @@ compile_lab_0: tags: [c++-17] lint_lab_0: stage: lint <<: *common_rules_0 stage: lab0 script: - echo "Static code check of lab0.cpp" - cppcheck --check-config --enable=all --inconclusive --error-exitcode=1 lab0.cpp tests/LabZero.cpp Loading @@ -50,8 +39,7 @@ lint_lab_0: tags: [cppcheck] test_lab_0: stage: test <<: *common_rules_0 stage: lab0 script: - echo "Testing Lab 0"; - cp lab0.o base_0/tests Loading
ci_cd/lab1.yml +7 −19 Original line number Diff line number Diff line stages: - prebuild - compile - lint - test .only_run_if_lab1_available: &common_rules_1 rules: - changes: - lab1.cpp ### Lab 1 prebuild_lab_1: stage: prebuild <<: *common_rules_1 stage: lab1 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 Loading @@ -20,11 +8,13 @@ prebuild_lab_1: paths: - base_1 - lab1.cpp rules: - changes: - lab1.cpp tags: [c++-17] compile_lab_1: stage: compile <<: *common_rules_1 stage: lab1 script: - echo "Compiling lab1.cpp" - g++ -c lab1.cpp Loading @@ -36,8 +26,7 @@ compile_lab_1: tags: [c++-17] lint_lab_1: stage: lint <<: *common_rules_1 stage: lab1 script: - echo "Static code check of lab1.cpp" - cppcheck --check-config --enable=all --inconclusive --error-exitcode=1 lab1.cpp tests/LabOne.cpp Loading @@ -50,8 +39,7 @@ lint_lab_1: tags: [cppcheck] test_lab_1: stage: test <<: *common_rules_1 stage: lab1 script: - echo "Testing Lab 1"; - cp lab1.o base_1/tests Loading
ci_cd/labm1.yml +7 −18 Original line number Diff line number Diff line stages: - prebuild - compile - lint - test .only_run_if_lab-1_available: &common_rules_m1 rules: - changes: - lab-1.cpp ### Lab -1 prebuild_lab_m1: stage: prebuild <<: *common_rules_m1 stage: labm1 script: - | if [ ! -f 'lab-1.cpp' ]; then echo "ERROR - could not find file lab-1.cpp"; exit 1; fi rules: - changes: - lab-1.cpp tags: [shell] compile_lab_m1: stage: compile <<: *common_rules_m1 stage: labm1 script: - echo "Compiling lab-1.cpp" - g++ -c lab-1.cpp Loading @@ -31,8 +21,7 @@ compile_lab_m1: tags: [c++-17] lint_lab_m1: stage: lint <<: *common_rules_m1 stage: labm1 script: - echo "Static code check of lab-1.cpp" - cppcheck --enable=all --inconclusive --error-exitcode=1 lab-1.cpp Loading @@ -42,7 +31,7 @@ lint_lab_m1: # don't run the test in the master branch test_lab_m1: stage: test stage: labm1 rules: - if: '$CI_COMMIT_BRANCH != "master" && $CI_COMMIT_TAG == null' script: Loading