Circle CI v2 failing with "cannot unmarshal string"

circle.yml
2.0

#1

Trying out v2 and I’m getting the following error message with a fairly vanilla build script:

cannot unmarshal string into Go value of type config.JobDescription

Here is the configuration file:

version: 2

jobs:
  working_directory: ~/prtty
  build:
    docker:
      - image: gcc@4.9.4
    steps:
      - checkout
      - run: mkdir build
      - run:
          name: Configure with CMake
          command: cmake ..
          working_directory: ~/prtty/build
      - run:
          name: Build
          command: cmake --build .
          working_directory: ~/prtty/build
      - run:
          name: Test example
          command: ./build/prtty_tests ./test

Is there something I should be adding?


#2

Your working_directory directive is on the wrong level. It should be nested under build.


#3

Any way to get a better error message on that? I wouldn’t have figured that out for a while I don’t think.

EDIT: Also, thank you :slight_smile: That fixed it.


#4

Hopefully :smiley:


#6

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