Commit 3a81ee4f authored by Bradon Ladd's avatar Bradon Ladd

Stuff n things

parent fbdf950a
Pipeline #21120 failed
##I've written my own comments for reference
---
image:
gitlab.cs.wallawalla.edu:5050/cptr245/student245
......@@ -7,76 +6,9 @@ default:
tags:
- docker
##Before anything is done, move to the area directory, and execute the build script
before_script:
- cd area
build program:
stage: build
script:
- g++ -o area areaFunction.cpp areaFunction.h areaMain.cpp
artifacts:
paths:
- area/area
build test:
stage: build
script:
- g++ -o test areaFunction.cpp areaFunction.h areaTest.cpp
artifacts:
paths:
- area/test
format:
stage: build
script:
- |
find . -type f \( -name "*.cpp" -or -name "*.h" \) -exec \
clang-format --dry-run --ferror-limit=1 {} + 2> errFile
err=$(<errFile)
if [[ ! -z "$err" ]]; then
echo "Detected formatting issues; please fix"
cat errFile
exit 1
fi
exit 0
allow_failure: true
cppcheck:
stage: build
script:
- |
find . \( -name \*.h -o -name \*.cpp \) -exec \
cppcheck --language=c++ --enable=all --inconclusive --error-exitcode=1 \
{} +
allow_failure: true
cpplint:
stage: build
script:
- |
find . \( -name \*.h -o -name \*.cpp \) -exec \
cpplint --filter=-legal/copyright \
{} +
allow_failure: true
test1:
stage: test
script:
./area 3
test2:
stage: test
script:
./area 5
test text diff:
stage: test
script:
- ./area 3 > stdout.txt && diff stdout.txt area3.txt
- ./area 5 > stdout.txt && diff stdout.txt area5.txt
include:
- local: "gitlab/lab-01/.gitlab-ci.yml"
test function result:
stage: test
script:
- ./test
\ No newline at end of file
include:
- local: "gitlab/lab-10/.gitlab-ci.yml"
...
---
##Before anything is done, move to the area directory, and execute the build script
lab-01 - build program:
stage: build
rules:
- changes: [ area/**/* ]
script:
- cd area
- g++ -o area areaFunction.cpp areaFunction.h areaMain.cpp
artifacts:
paths:
- area/area
lab-01 - build test:
stage: build
rules:
- changes: [ area/**/* ]
script:
- cd area
- g++ -o test areaFunction.cpp areaFunction.h areaTest.cpp
artifacts:
paths:
- area/test
lab-01 - format:
stage: build
rules:
- changes: [ area/**/* ]
script:
- cd area
- |
find . -type f \( -name "*.cpp" -or -name "*.h" \) -exec \
clang-format --dry-run --ferror-limit=1 {} + 2> errFile
err=$(<errFile)
if [[ ! -z "$err" ]]; then
echo "Detected formatting issues; please fix"
cat errFile
exit 1
fi
exit 0
allow_failure: true
lab-01 - cppcheck:
stage: build
rules:
- changes: [ area/**/* ]
script:
- cd area
- |
find . \( -name \*.h -o -name \*.cpp \) -exec \
cppcheck --language=c++ --enable=all --inconclusive --error-exitcode=1 \
{} +
allow_failure: true
lab-01 - cpplint:
stage: build
rules:
- changes: [ area/**/* ]
script:
- cd area
- |
find . \( -name \*.h -o -name \*.cpp \) -exec \
cpplint --filter=-legal/copyright \
{} +
allow_failure: true
lab-01 - test1:
stage: test
rules:
- changes: [ area/**/* ]
script:
- cd area
./area 3
lab-01 - test2:
stage: test
rules:
- changes: [ area/**/* ]
script:
- cd area
./area 5
lab-01 - test text diff:
stage: test
rules:
- changes: [ area/**/* ]
script:
- cd area
- ./area 3 > stdout.txt && diff stdout.txt area3.txt
- ./area 5 > stdout.txt && diff stdout.txt area5.txt
lab-01 - test function result:
stage: test
rules:
- changes: [ area/**/* ]
script:
- cd area
- ./test
***
---
deploy_prod:
stage: deploy
script:
- pwd; env;
...
<!doctype html>
<html lang="en">
<head><meta charset="UTF-8">
<title>Wow! A webpage!</title>
</head>
<body>
<h1>What an interesting webpage! Stay a while!</h1>
</body>
</html>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment