stages:
- build
- clean
- test
- cleanup_build

build_job:
  stage: build
  script:
  - ./builders/buildlocal /opt/COMPSs

cleanup_failure:
  stage: clean
  script:
  - sudo rm -rf /opt/COMPSs
  - sudo rm -rf /home/gitlab-runner/tests*
  - sudo rm -rf /home/gitlab-runner/.COMPSs
  when: on_failure

test_job:
  stage: test
  script:
  - echo "Disabled tests" #./tests/scripts/main local local.cfg


cleanup_build_job:
  stage: cleanup_build
  script:
  - sudo rm -rf /opt/COMPSs
  - sudo rm -rf /home/gitlab-runner/tests*
  - sudo rm -rf /home/gitlab-runner/.COMPSs


stages:
- build
- clean
- test
- cleanup_build

build_job:
  stage: build
  script:
  - ./builders/buildlocal /opt/COMPSs
  only: 
  - triggers

cleanup_failure:
  stage: clean
  script:
  - sudo rm -rf /opt/COMPSs
  - sudo rm -rf /home/gitlab-runner/tests*
  - sudo rm -rf /home/gitlab-runner/.COMPSs
  when: on_failure
  only:
  - triggers

test_job:
  stage: test
  script:
  - echo "Disabled tests" #./tests/scripts/main local local.cfg
  only:
  - triggers


cleanup_build_job:
  stage: cleanup_build
  script:
  - sudo rm -rf /opt/COMPSs
  - sudo rm -rf /home/gitlab-runner/tests*
  - sudo rm -rf /home/gitlab-runner/.COMPSs
  only:
  - triggers

Build triggered by webhook on MR
Build triggered by webhook on MR
