Commit 5e9fe993 authored by Ari Trachtenberg's avatar Ari Trachtenberg
Browse files

added extra credit

parent c2abd765
Loading
Loading
Loading
Loading
+32 −1
Original line number Diff line number Diff line
@@ -51,3 +51,34 @@ exec_problem_3c:
  rules:
    - if: '$CI_COMMIT_REF_NAME == "problem3c"'
  tags: [c++-17]

  extra_credit:
    stage: extra
    needs:
      - job: compile_problem_3c
        artifacts: true
    script:
      - git clone https://trachten-gitlab:${HW_INTERNAL}@agile.bu.edu/gitlab/ec330/ec330_staff/homeworks_internal/hw2_ec.git hw2_ec
      - cp impl/Rubk.cpp hw2_ec/impl/
      - cp main.cpp hw2_ec/
      - cd hw2_ec
      - make solver
      - make tester
      - |
        cleanup() {
          echo "=== cleanup ==="
          tail -n 3 tester.out || true
        }
        trap cleanup EXIT
      - $(./tester > tester.out)
      - score="$(tail -n 1 tester.out | tr -d '[:space:]')"
      - $(tail -n 3 tester.out)
      - echo "Your score is $score"
      - curl "https://agile.bu.edu/ec330_scripts/saveScores.pl?key=${MAGIC_KEY}&file=hw2extra&name=${GITLAB_USER_LOGIN}&score=${score}"
    rules:
      - if: '$INTERNAL_TESTS == "1"'
        when: never
      - if: '$CI_COMMIT_REF_NAME == "problem2a"'
    timeout: 2m
    # tags: [c++-17-light]
    tags: [ c++-17 ]