Loading .gitlab-ci.yml +30 −20 Original line number Diff line number Diff line stages: - prebuild - build - test - LabMinusOne - LabZero labMinusOne: stage: prebuild ### Lab -1 prebuild_m1: stage: LabMinusOne script: - echo "Checking Lab -1 for $GITLAB_USER_LOGIN" - if ! grep -q "^$GITLAB_USER_LOGIN$" README.md; then echo "Could not find your WikiName on its own line in README.md"; - | if [ ! -f lab-1.cpp ]; then echo "ERROR - could not find file lab-1.cpp."; exit 1; fi tags: [shell] compile: stage: build compile_m1: stage: LabMinusOne script: - echo "Compiling code" - echo "Compiling lab-1.cpp" - g++ -c lab-1.cpp dependencies: - prebuild_m1 tags: [c++-17] lint: stage: build lint_m1: stage: LabMinusOne script: - echo "Static code check" - cppcheck --enable=all --inconclusive --error-exitcode=1 . - echo "Static code check of lab-1.cpp" - cppcheck --enable=all --inconclusive --error-exitcode=1 lab-1.cpp allow_failure: false dependencies: - compile_m1 tags: [cppcheck] test: stage: test test_m1: stage: LabMinusOne script: - echo "Static code check" tags: [c++-17] - echo "Testing Lab -1"; - | if ! grep -q "^$GITLAB_USER_LOGIN$" lap-1.cpp; then echo "Could not find your WikiName on its own line in file lab-1.cpp"; exit 1; fi dependencies: - lint No newline at end of file - lint_m1 tags: [shell] No newline at end of file Loading
.gitlab-ci.yml +30 −20 Original line number Diff line number Diff line stages: - prebuild - build - test - LabMinusOne - LabZero labMinusOne: stage: prebuild ### Lab -1 prebuild_m1: stage: LabMinusOne script: - echo "Checking Lab -1 for $GITLAB_USER_LOGIN" - if ! grep -q "^$GITLAB_USER_LOGIN$" README.md; then echo "Could not find your WikiName on its own line in README.md"; - | if [ ! -f lab-1.cpp ]; then echo "ERROR - could not find file lab-1.cpp."; exit 1; fi tags: [shell] compile: stage: build compile_m1: stage: LabMinusOne script: - echo "Compiling code" - echo "Compiling lab-1.cpp" - g++ -c lab-1.cpp dependencies: - prebuild_m1 tags: [c++-17] lint: stage: build lint_m1: stage: LabMinusOne script: - echo "Static code check" - cppcheck --enable=all --inconclusive --error-exitcode=1 . - echo "Static code check of lab-1.cpp" - cppcheck --enable=all --inconclusive --error-exitcode=1 lab-1.cpp allow_failure: false dependencies: - compile_m1 tags: [cppcheck] test: stage: test test_m1: stage: LabMinusOne script: - echo "Static code check" tags: [c++-17] - echo "Testing Lab -1"; - | if ! grep -q "^$GITLAB_USER_LOGIN$" lap-1.cpp; then echo "Could not find your WikiName on its own line in file lab-1.cpp"; exit 1; fi dependencies: - lint No newline at end of file - lint_m1 tags: [shell] No newline at end of file