Loading ci_cd/.gitlab-ci.yml +1 −0 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ stages: - prebuild - compile - test - benchmark include: - local: 'ci_cd/problem2.yml' # Planar Subgraph Loading ci_cd/problem2.yml +45 −0 Original line number Diff line number Diff line Loading @@ -46,3 +46,48 @@ exec_problem_2: rules: - if: '$CI_COMMIT_REF_NAME == "problem2"' tags: [c++-17] benchmark: stage: extra needs: - job: exec_problem_2 artifacts: true script: - git clone https://trachten-gitlab:${HW_INTERNAL}@agile.bu.edu/gitlab/ec330/ec330_staff/homeworks_internal/hw6_ec.git hw6_ec - cp impl/MaxPlanarSubgraph.cpp hw6_ec/impl/ - cd hw6_ec - make p2_extra - set -o pipefail - | set +e ulimit -v $((10 * 1024 * 1024)) # ~10GB timeout 450s stdbuf -oL ./p2_extra > extra2.out STATUS=$? set -e context="$(tail -n 30 extra2.out | tail -c 600)" if [ "$STATUS" -ne 0 ]; then echo "Context: $context" if [ "$STATUS" -eq 124 ]; then echo "Timeout!" elif [ "$STATUS" -eq 134 ] || [ "$STATUS" -eq 137 ]; then echo "Out of memory or killed (status $STATUS)" elif [ "$STATUS" -eq 255 ]; then echo "Execution failure" else echo "Program exited abnormally with status $STATUS" fi exit 1 fi score="$(tail -n 1 extra3c.out | tr -d '[:space:]')" - echo "$context" - curl "https://agile.bu.edu/ec330_scripts/saveScores.pl?key=${MAGIC_KEY}&file=hw6planar&name=${GITLAB_USER_LOGIN}&score=${score}" rules: - if: '$CI_COMMIT_REF_NAME == "problem2"' timeout: 15m # tags: [c++-17-light] tags: [ c++-17 ] No newline at end of file Loading
ci_cd/.gitlab-ci.yml +1 −0 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ stages: - prebuild - compile - test - benchmark include: - local: 'ci_cd/problem2.yml' # Planar Subgraph Loading
ci_cd/problem2.yml +45 −0 Original line number Diff line number Diff line Loading @@ -46,3 +46,48 @@ exec_problem_2: rules: - if: '$CI_COMMIT_REF_NAME == "problem2"' tags: [c++-17] benchmark: stage: extra needs: - job: exec_problem_2 artifacts: true script: - git clone https://trachten-gitlab:${HW_INTERNAL}@agile.bu.edu/gitlab/ec330/ec330_staff/homeworks_internal/hw6_ec.git hw6_ec - cp impl/MaxPlanarSubgraph.cpp hw6_ec/impl/ - cd hw6_ec - make p2_extra - set -o pipefail - | set +e ulimit -v $((10 * 1024 * 1024)) # ~10GB timeout 450s stdbuf -oL ./p2_extra > extra2.out STATUS=$? set -e context="$(tail -n 30 extra2.out | tail -c 600)" if [ "$STATUS" -ne 0 ]; then echo "Context: $context" if [ "$STATUS" -eq 124 ]; then echo "Timeout!" elif [ "$STATUS" -eq 134 ] || [ "$STATUS" -eq 137 ]; then echo "Out of memory or killed (status $STATUS)" elif [ "$STATUS" -eq 255 ]; then echo "Execution failure" else echo "Program exited abnormally with status $STATUS" fi exit 1 fi score="$(tail -n 1 extra3c.out | tr -d '[:space:]')" - echo "$context" - curl "https://agile.bu.edu/ec330_scripts/saveScores.pl?key=${MAGIC_KEY}&file=hw6planar&name=${GITLAB_USER_LOGIN}&score=${score}" rules: - if: '$CI_COMMIT_REF_NAME == "problem2"' timeout: 15m # tags: [c++-17-light] tags: [ c++-17 ] No newline at end of file