Commit ff5d5aaa authored by Ari Trachtenberg's avatar Ari Trachtenberg
Browse files

Adding ci_cd

parent 68bdaaa6
Loading
Loading
Loading
Loading

ci_cd/.gitlab-ci.yml

0 → 100644
+10 −0
Original line number Diff line number Diff line
stages:
  - problem0
  - problem1

include:
  - local: 'ci_cd/problem0.yml'   # IntegerP
  - local: 'ci_cd/problem1.yml'   # RationalP

default:
  timeout: 5m

ci_cd/problem0.yml

0 → 100644
+82 −0
Original line number Diff line number Diff line
prebuild_problem0:
  stage: problem0
  script:
    - |
      # Check if source files exist
      if [ ! -f "IntegerP.cpp" ]; then
        echo "IntegerP.cpp does not exist";
        exit 1;
      fi
    - git clone https://agile.bu.edu/gitlab/configs/ec327/hw-configs/hw4.git base_4
  artifacts:
    paths:
      - base_4/
  rules:
    - when: always
  tags: [c++-17]


test_problem_1a:
  stage: problem1a
  dependencies:
    - prebuild_problem1
  script:
    - cp GaussianInteger.cpp GaussianInteger.h base_4/tests
    - cd base_4/tests
    - make problem1a
    - ./problem1a
  rules:
    - if: '$CI_COMMIT_REF_NAME == "1a"'
  tags: [c++-17]

test_problem_1b:
  stage: problem1b
  dependencies:
    - prebuild_problem1
  script:
    - cp GaussianInteger.cpp GaussianInteger.h base_4/tests
    - cd base_4/tests
    - make problem1b
    - ./problem1b
  rules:
    - if: '$CI_COMMIT_REF_NAME == "1b"'
  tags: [c++-17]

test_problem_1c:
  stage: problem1c
  dependencies:
    - prebuild_problem1
  script:
    - cp GaussianInteger.cpp GaussianInteger.h base_4/tests
    - cd base_4/tests
    - make problem1c
    - ./problem1c
  rules:
    - if: '$CI_COMMIT_REF_NAME == "1c"'
  tags: [c++-17]

test_problem_1d:
  stage: problem1d
  dependencies:
    - prebuild_problem1
  script:
    - cp GaussianInteger.cpp GaussianInteger.h base_4/tests
    - cd base_4/tests
    - make problem1d
    - ./problem1d
  rules:
    - if: '$CI_COMMIT_REF_NAME == "1d"'
  tags: [c++-17]

test_problem_1e:
  stage: problem1e
  dependencies:
    - prebuild_problem1
  script:
    - cp GaussianInteger.cpp GaussianInteger.h base_4/tests
    - cd base_4/tests
    - make problem1e
    - ./problem1e
  rules:
    - if: '$CI_COMMIT_REF_NAME == "1e"'
  tags: [c++-17]