Help with config.yml

Sorry I do not have access to a local docker installation to run the validator offline and CI refuses to run borked configs after the third unsuccessful attempt. I would really appreciate some guidance with this.

Circle reported these mistakes, but both keys are in place.

2 schema violations found
required key [jobs] not found
required key [version] not found

defaults: &defaults
  working_directory: ~/markovmodel/PyEMMA
  docker:
    - image: continuumio/miniconda3

#inst_conda_bld: &inst_conda_bld
#  - run: conda config --add channels conda-forge
#  - run: conda config --set always_yes true
#  - run: conda config --set quiet true
#  - run: conda install conda-build

version: 2

jobs:
  build:
    <<: *defaults
    parallelism: 1
    steps:
      - checkout
      - run: git fetch --unshallow || true
      - run: conda config --add channels conda-forge
      - run: conda config --set always_yes true
      - run: conda config --set quiet true
      - run: conda install conda-build
      - run: conda build devtools/conda-recipe --python=3.6 --no-test
      #- store_artifacts:
      #    path: $(conda build devtools/conda-recipe --python=3.6 --output)
      #    destination: build.tar.bz2
      # Persist the specified paths (workspace/echo-output) into the workspace for use in downstream job.
      - persist_to_workspace:
          root: $( dirname $(conda build devtools/conda-recipe --python=3.6 --output) )
          paths:
            - $(conda build devtools/conda-recipe --python=3.6 --output)


  test:
    <<: *defaults
    parallelism: 4
    environment:
      CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
      CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
      PYTHONHASHSEED: 0
      OMP_NUM_THREADS: 1
      PYEMMA_NJOBS: 1

    steps:
      - checkout

      - run: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS
      - run: conda config --add channels conda-forge
      - run: conda config --set always_yes true
      - run: conda config --set quiet true
      - run: conda install conda-build
      - attach_workspace:
          # Must be absolute path or relative path from working_directory
          at:  $( dirname $(conda build devtools/conda-recipe --python=3.6 --output) )
      #- run: wget https://circleci.com/api/v1.1/project/:vcs-type/:org/:repo/:build_num/artifacts/0/build.tar.bz2 -o `conda build devtools/conda-recipe --python=3.6 --output`
      #- run: wget curl https://circleci.com/api/v1.1/project/:git/:CIRCLE_PROJECT_USERNAME/:$CIRCLE_PROJECT_REPONAME/:$CIRCLE_BUILD_NUM/artifacts?circle-token=$CIRCLE_TOKEN
      - run: conda build devtools/conda-recipe --python=3.6 --test
      # Teardown
      #   If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each
      # Save test results
      - store_test_results:
          path: /tmp/circleci-test-results
      # Save artifacts
      - store_artifacts:
          path: /tmp/circleci-artifacts
      - store_artifacts:
          path: /tmp/circleci-test-results


workflows:
  version: 2
  build_and_test:
    jobs:
      - build
      - test:
        requires:
          - build

This is a standard debugging problem. I would suggest these steps in order (use a feature branch if you don’t want a messy mainline branch with lots of attempts):

  • Remove the &reference and expand all of these by copy+paste
  • Remove the comments
  • Cut down the test and build jobs to the smallest possible config

Push for every change so you can see if it has helped.

Then, once you have identified the cause of the YAML error, build the config back up slowly, to narrow down what is causing it.

This is a standard debugging problem. I would suggest these steps in order (use a feature branch if you don’t want a messy mainline branch with lots of attempts):
My problem was, that Circle stopped building my pushes (eg. after the
third faulty config). Maybe I should re-create the repo after every
third attempt?!

  • Remove the &reference and expand all of these by copy+paste
    Did this already. Didn’t change anything
  • Remove the comments
    why should comments be a source of error?
  • Cut down the test and build jobs to the smallest possible config
    It is already fairly simple, isn’t it.

Push for every change so you can see if it has helped.
This would make my life easier indeed, but I’ve described the problem
already.

(Your quote block is hard to read: it seems my material and your material is in the same quote. Would you repair it please, by editing it? I will respond to it after you have done so).

I figured it out with the cli tool. Thanks for your kind offer.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.