<commit_before>version: 2
workflows:
  version: 2
  build_and_test:
    jobs:
      - clean-code
      - test:
          requires:
            - clean-code
      - race:
          requires:
            - clean-code
      - compile_cmds:
          requires:
            - clean-code
      - bb_amd64:
          requires:
            - clean-code
      - bb_arm7:
          requires:
            - clean-code
      - bb_arm64:
          requires:
            - clean-code
      - bb_ppc64le:
          requires:
            - clean-code
      - source_amd64:
          requires:
            - clean-code
      - source_amd64_test_archive:
          requires:
            - clean-code
      - extra_files:
          requires:
            - clean-code
      - extra_files_multiple_files:
          requires:
            - clean-code
      - extra_files_comma_syntax:
          requires:
            - clean-code
      - extra_files_multiple_files_mixed_syntax:
          requires:
            - clean-code
      - extra_files_wrong_comma_syntax:
          requires:
            - clean-code
jobs:
  clean-code:
    docker:
      - image: circleci/golang:latest
    working_directory: /go/src/github.com/u-root/u-root
    steps:
      - checkout
      - run:
          name: Install dep
          command: |
            wget https://github.com/golang/dep/releases/download/v0.4.1/dep-linux-amd64
            chmod +x ./dep-linux-amd64
      - run:
          name: Check vendored dependencies
          command: |
            ./dep-linux-amd64 hash-inputs
            ./dep-linux-amd64 status
            ./dep-linux-amd64 ensure -vendor-only
            if [[ -n "$(git status --porcelain vendor)" ]]; then
              echo 'vendor/ is out-of-date: run `dep ensure -vendor-only` and then check in the changes'
              git status --porcelain vendor
              exit 1
            fi
      - run:
          name: vet
          command: |
            go tool vet cmds xcmds pkg
            go tool vet u-root.go
      - run:
          name: gofmt
          command: test -z $(gofmt -s -l cmds xcmds pkg u-root.go)
  test:
    docker:
      - image: circleci/golang:latest
    working_directory: /go/src/github.com/u-root/u-root
    environment:
      - CGO_ENABLED: 0
    steps:
      - checkout
      - run:
          name: Test all
          command: go test -a -ldflags '-s' ./pkg/... ./cmds/... ./xcmds/...
      - run:
          name: Test coverage
          command: go test -cover ./pkg/... ./cmds/... ./xcmds/...
  race:
    docker:
      - image: circleci/golang:latest
    working_directory: /go/src/github.com/u-root/u-root
    environment:
      - CGO_ENABLED: 1
    steps:
      - checkout
      - run:
          name: Race detector
          command: go test -race ./pkg/... ./cmds/... ./xcmds/...
  bb_amd64:
    docker:
      - image: circleci/golang:latest
    working_directory: /go/src/github.com/u-root/u-root
    environment:
      - CGO_ENABLED: 0
    steps:<commit_msg>integration: Run integrations tests in circleci<commit_after>version: 2
workflows:
  version: 2
  build_and_test:
    jobs:
      - clean-code
      - test:
          requires:
            - clean-code
      - test-integration:
          requires:
            - clean-code
      - race:
          requires:
            - clean-code
      - compile_cmds:
          requires:
            - clean-code
      - bb_amd64:
          requires:
            - clean-code
      - bb_arm7:
          requires:
            - clean-code
      - bb_arm64:
          requires:
            - clean-code
      - bb_ppc64le:
          requires:
            - clean-code
      - source_amd64:
          requires:
            - clean-code
      - source_amd64_test_archive:
          requires:
            - clean-code
      - extra_files:
          requires:
            - clean-code
      - extra_files_multiple_files:
          requires:
            - clean-code
      - extra_files_comma_syntax:
          requires:
            - clean-code
      - extra_files_multiple_files_mixed_syntax:
          requires:
            - clean-code
      - extra_files_wrong_comma_syntax:
          requires:
            - clean-code
jobs:
  clean-code:
    docker:
      - image: circleci/golang:latest
    working_directory: /go/src/github.com/u-root/u-root
    steps:
      - checkout
      - run:
          name: Install dep
          command: |
            wget https://github.com/golang/dep/releases/download/v0.4.1/dep-linux-amd64
            chmod +x ./dep-linux-amd64
      - run:
          name: Check vendored dependencies
          command: |
            ./dep-linux-amd64 hash-inputs
            ./dep-linux-amd64 status
            ./dep-linux-amd64 ensure -vendor-only
            if [[ -n "$(git status --porcelain vendor)" ]]; then
              echo 'vendor/ is out-of-date: run `dep ensure -vendor-only` and then check in the changes'
              git status --porcelain vendor
              exit 1
            fi
      - run:
          name: vet
          command: |
            go tool vet cmds xcmds pkg
            go tool vet u-root.go
      - run:
          name: gofmt
          command: test -z $(gofmt -s -l cmds xcmds pkg u-root.go)
  test:
    docker:
      - image: circleci/golang:latest
    working_directory: /go/src/github.com/u-root/u-root
    environment:
      - CGO_ENABLED: 0
    steps:
      - checkout
      - run:
          name: Test all
          command: go test -a -ldflags '-s' ./pkg/... ./cmds/... ./xcmds/...
      - run:
          name: Test coverage
          command: go test -cover ./pkg/... ./cmds/... ./xcmds/...
  test-integration:
    docker:
      - image: roleary/uroot-integration:latest
    working_directory: /go/src/github.com/u-root/u-root
    environment:
      - CGO_ENABLED: 0
    steps:
      - checkout
      - run:
          name: Test integration all
          command: go test -v -a -ldflags '-s' ./integration/...
  race:
    docker:
      - image: circleci/golang:latest
    working_directory: /go/src/github.com/u-root/u-root
    environment:
      - CGO_ENABLED: 1
    steps:
      - checkout
      - run:
          name: Race detector
          command: go test -race ./pkg/... ./cmds/... ./xcmds/...
  bb_amd64:
    docker:
      - image: circleci/golang:latest
    working_directory: /go/src/github.com/u-root/u-root
    environment:
      - CGO_ENABLED: 0
    steps:
{'fraction_non_alphanumeric': 0.10651902682470368, 'fraction_numerical': 0.010137242669993761, 'mean_word_length': 1.2822064056939502, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2088239', 'n_tokens_mistral': 2051, 'n_tokens_neox': 1954, 'n_words': 439}