version: 2
jobs:
  build:
    working_directory: ~/phobos
    docker:
      - image: cimg/base:current-20.04
    parallelism: 1
    steps:
      - checkout
      - run:
          command: ./.circleci/run.sh install-deps
          name: Install DMD
      - run:
          command: ./.circleci/run.sh setup-repos
          name: Clone DMD & DRuntime
      - run:
          command: ./.circleci/run.sh publictests
          name: Run all public unittests
      - run:
          command: ./.circleci/run.sh coverage
          name: Run Phobos testsuite with -cov=ctfe
      - run:
          command: ./.circleci/run.sh coverage
          name: Upload coverage files to CodeCov
