Commit 0bc1b996 authored by Ari Trachtenberg's avatar Ari Trachtenberg
Browse files

add IntegerP.h and IntegerPP.h

parent a139bac0
Loading
Loading
Loading
Loading
+96 −47
Original line number Diff line number Diff line

  Homepage

    Configs
    EC330
    Homeworks
    HomeworkOne
    Repository

    homeworkone
    ci_cd
    problem2a.yml
    
    problem2a.yml
    Ari Trachtenberg's avatar
    changed timeout to trap in the gitlab job
    Ari Trachtenberg authored 4 days ago
    2347b15f
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    problem2a.yml
    1.81 KiB

  prebuild_problem_2a:
    stage: prebuild
    script:
@@ -14,7 +37,6 @@ prebuild_problem_2a:
    rules:
      - if: '$CI_COMMIT_REF_NAME == "problem2a"'
    tags: [c++-17]

  compile_problem_2a:
    stage: compile
    needs:
@@ -30,7 +52,6 @@ compile_problem_2a:
    rules:
      - if: '$CI_COMMIT_REF_NAME == "problem2a"'
    tags: [c++-17]

  exec_problem_2a:
    stage: test
    needs:
@@ -38,8 +59,8 @@ exec_problem_2a:
        artifacts: true
    script:
      - cd hw1/tests
    - ls-lh
    - cat IntegerPP.h
      - ls -l
      - cat IntegerPP.cpp
      - ./problem2a
    artifacts:
      paths:
@@ -47,5 +68,33 @@ exec_problem_2a:
    rules:
      - if: '$CI_COMMIT_REF_NAME == "problem2a"'
    tags: [c++-17]
  extra_credit:
    stage: extra
    needs:
      - job: compile_problem_2a
        artifacts: true
    script:
      - git clone https://trachten-gitlab:${HW_INTERNAL}@agile.bu.edu/gitlab/ec330/ec330_staff/homeworks_internal/hw1_ec.git hw1_ec
      - cp IntegerP.cpp IntegerPP.cpp hw1_ec
      - cd hw1_ec
      - make extra
      - set -o pipefail
      - |
        set +e
        timeout 60s stdbuf -oL ./extra | tee extra.out
        STATUS=${PIPESTATUS[0]}
        set -e
        if [ "$STATUS" -eq 255 ]; then
          echo "computed result incorrect - job failed"
          exit 1
        fi
        
        score="$(tail -n 1 extra.out | tr -d '[:space:]')"
      - echo "Your score is $score"
      - curl "https://agile.bu.edu/ec330_scripts/saveScores.pl?key=${MAGIC_KEY}&file=hw1extra&name=${GITLAB_USER_LOGIN}&score=${score}"
    rules:
      - if: '$CI_COMMIT_REF_NAME == "problem2a"'
    timeout: 2m
    # tags: [c++-17-light]
    tags: [c++-17]