Commit 3a56a739 authored by Ari Trachtenberg's avatar Ari Trachtenberg
Browse files

Update .gitlab-ci.yml

parent 6a1497e0
Loading
Loading
Loading
Loading
Loading
+44 −2
Original line number Diff line number Diff line
stages:
  - build
  - test
  - compete

build-job:
compile:
  stage: build
  script:
    - echo "This is where code compilation would go ..."
    - echo "Compiling code for $GITLAB_USER_LOGIN"
    - curl https://agile.bu.edu/gitlab/configs/ec504-configs/hw2/problem-3-testing/-/archive/master/problem-3-testing-master.tar -o test.tar
    - tar -xvf test.tar
    - cp src/edu/bu/ec504/hw2p3/MyFindSImilar.java problem-3-testing-master/src/edu/bu/ec504/hw2p3/
    - cd problem-3-testing-master/src
    - javac edu/bu/ec504/hw2p3/Main.java
  artifacts:
    paths:
      - problem-3-testing-master/src/
  tags: [java]

simple_tests:
  stage: test
  script:
    - echo "Running simple tests for $GITLAB_USER_LOGIN"
    - cd problem-3-testing-master/src
    - java edu/bu/ec504/hw2p3/Main
  dependencies:
    - compile
  artifacts:
    paths:
      - problem-3-testing-master/src/
  tags: [java]



competition:
  stage: compete
  script:
    - echo "Running competition for $GITLAB_USER_LOGIN"
    - echo "TIMEOUT set to 3 minutes"
    - curl -o "temp.tar" "https://agile.bu.edu/local/ec504/hw2/p3/problem-3-staff.tar";
    - tar -xvf temp.tar
    - cp src/edu/bu/ec504/hw2p2/hashing/MyFindSimilar.java problem-3-staff/src/edu/bu/ec504/hw2p3/
    - cd problem-3-staff/src
    - javac edu/bu/ec504/hw2p3/Main.java
    - java edu/bu/ec504/hw2p3/Main $GITLAB_USER_LOGIN
  dependencies:
    - simple_tests
  tags: [java]
  timeout: 3 minutes