Commit 9937a6c6 authored by Ari Trachtenberg's avatar Ari Trachtenberg
Browse files

Update .gitlab-ci.yml

parent ce36805d
Loading
Loading
Loading
Loading
Loading
+75 −2
Original line number Diff line number Diff line
stages:
  - build
  - test
  - compete

build-job:
compile_data_structures:
  stage: build
  script:
    - echo "This is where code compilation would go ..."
    - echo "Compiling data structure code for $GITLAB_USER_LOGIN"
    - curl https://agile.bu.edu/gitlab/configs/ec504-configs/hw2/problem-1-testing/-/archive/master/problem-1-testing-master.tar -o test.tar
    - tar -xvf test.tar
    # copy student source code
    - cp -rf src/edu/bu/ec504/hw2/p1/edges/* problem-1-testing-master/src/src/edu/bu/ec504/hw2/p1/edges
    - cp -rf src/edu/bu/ec504/hw2/p1/graphs/* problem-1-testing-master/src/src/edu/bu/ec504/hw2/p1/graphs
    - cp -rf src/edu/bu/ec504/hw2/p1/support/* problem-1-testing-master/src/src/edu/bu/ec504/hw2/p1/support
    - cp -rf src/edu/bu/ec504/hw2/p1/vertices/* problem-1-testing-master/src/src/edu/bu/ec504/hw2/p1/vertices
    - cd problem-1-testing-master/src
    - javac edu/bu/ec504/hw2/p1/Main.java
  artifacts:
    paths:
      - problem-1-testing-master/src/
  tags: [java]

test_data_structures:
  stage: test
  script:
    - echo "Running data structure tests for $GITLAB_USER_LOGIN"
    - cd problem-1-testing-master/src
    - java edu/bu/ec504/hw2/p1/Main
  dependencies:
    - compile_data_structures
  artifacts:
    paths:
      - problem-1-testing-master/src/
  tags: [java]

compile_colorer:
  stage: build
  script:
    - echo "Compiling data structure code for $GITLAB_USER_LOGIN"
    - curl https://agile.bu.edu/gitlab/configs/ec504-configs/hw2/problem-1-testing/-/archive/master/problem-1-testing-master.tar -o test.tar
    - tar -xvf test.tar
    # copy student source code
    - cp -rf src/edu/bu/ec504/hw2/p1/GraphColorer.java problem-1-testing-master/src/src/edu/bu/ec504/hw2/p1/
    - cd problem-1-testing-master/src
    - javac edu/bu/ec504/hw2/p1/GraphColorerTester.java
  dependencies:
    - compile_data_structures
  artifacts:
    paths:
      - problem-1-testing-master/src/
  tags: [java]

test_graph_colorer:
  stage: test
  script:
    - echo "Running graph_colorer tests for $GITLAB_USER_LOGIN"
    - cd problem-1-testing-master/src
    - java edu/bu/ec504/hw2/p1/GraphColorerTester
  dependencies:
    - compile_colorer
  artifacts:
    paths:
      - problem-1-testing-master/src/
  timeout: 5 minutes
  tags: [java]

competition:
  stage: compete
  script:
    - curl -o "temp.tar" "https://agile.bu.edu/local/ec504/hw2/p2/problem-1-staff.tar";
    - tar -xvf temp.tar
    - cp -rf problem-1-staff/src/src/edu/bu/ec504/hw2/p1/GraphColorCompetition.java problem-1-testing-master/src/edu/bu/ec504/hw2/p1/
    - cd problem-1-testing-master/src
    - javac edu/bu/ec504/hw2/p1/GraphColorCompetition.java
    - java edu/bu/ec504/hw2p2/GraphColorCompetition $GITLAB_USER_LOGIN
  dependencies:
    - test_data_structures
    - test_graph_colorer
  timeout: 5 minutes
  tags: [java]