<commit_before>version: 2
jobs:
  checkout_code:
    machine:
      image: circleci/classic:edge
    steps:
      - checkout
      - restore_cache:
          keys:
            - bats
      - run:
          name: "Download bats"
          command: |
            if [[ ! -e deps/bats_v0.4.0.tar.gz ]];
              then
                mkdir -p deps
                curl -sSL -o deps/bats_v0.4.0.tar.gz \
                https://github.com/sstephenson/bats/archive/v0.4.0.tar.gz
                tar -xf deps/bats_v0.4.0.tar.gz
            fi
      - run:
          name: "Download Manifest Tool"
          command: |
            if [[ ! -e deps/manifest-tool-linux-amd64 ]];
              then
                mkdir -p deps
                curl -sSL -o deps/manifest-tool-linux-amd64 \
                https://github.com/estesp/manifest-tool/releases/download/v0.6.0/manifest-tool-linux-amd64
            fi
            chmod +x deps/manifest-tool-linux-amd64
      - save_cache:
          key: project-{{ .Branch }}-{{ .Revision }}
          paths:
            - build
            - arch
            - qemu
            - resources
            - test
      - save_cache:
          key: multi-{{ .Branch }}-{{ .Revision }}
          paths: multi
      - save_cache:
          key: deps-{{ .Branch }}-{{ .Revision }}
          paths:
            - deps

  build-and-test:
    machine:
      image: circleci/classic:edge
    steps:
      - restore_cache:
          keys:
            - project-{{ .Branch }}-{{ .Revision }}
      - restore_cache:
          keys:
            - deps-{{ .Branch }}-{{ .Revision }}
      - run:
          name: "Install bats"
          working_directory: deps/
          command: |
            tar -xf bats_v0.4.0.tar.gz
            sudo bats-0.4.0/install.sh /usr/local
      - run:
          name: "Install manifest tool"
          working_directory: deps/
          command: |
            sudo cp manifest-tool-linux-amd64 /usr/bin/manifest-tool
      - run:
          name: Run build script
          command: ./build
      - run:
          name: Run tests
          command: ./build test
          environment:
            - files: "versions/**/options"
      - run:
          name: "Clean up builders"
          command: docker image prune -f
      - run:
          name: "Save containers to file"
          command: |
            docker image save -o built_images.tar $CIRCLE_PROJECT_REPONAME<commit_msg>Fixes docker repos to save to file<commit_after>version: 2
jobs:
  checkout_code:
    machine:
      image: circleci/classic:edge
    steps:
      - checkout
      - restore_cache:
          keys:
            - bats
      - run:
          name: "Download bats"
          command: |
            if [[ ! -e deps/bats_v0.4.0.tar.gz ]];
              then
                mkdir -p deps
                curl -sSL -o deps/bats_v0.4.0.tar.gz \
                https://github.com/sstephenson/bats/archive/v0.4.0.tar.gz
                tar -xf deps/bats_v0.4.0.tar.gz
            fi
      - run:
          name: "Download Manifest Tool"
          command: |
            if [[ ! -e deps/manifest-tool-linux-amd64 ]];
              then
                mkdir -p deps
                curl -sSL -o deps/manifest-tool-linux-amd64 \
                https://github.com/estesp/manifest-tool/releases/download/v0.6.0/manifest-tool-linux-amd64
            fi
            chmod +x deps/manifest-tool-linux-amd64
      - save_cache:
          key: project-{{ .Branch }}-{{ .Revision }}
          paths:
            - build
            - arch
            - qemu
            - resources
            - test
      - save_cache:
          key: multi-{{ .Branch }}-{{ .Revision }}
          paths: multi
      - save_cache:
          key: deps-{{ .Branch }}-{{ .Revision }}
          paths:
            - deps

  build-and-test:
    machine:
      image: circleci/classic:edge
    steps:
      - restore_cache:
          keys:
            - project-{{ .Branch }}-{{ .Revision }}
      - restore_cache:
          keys:
            - deps-{{ .Branch }}-{{ .Revision }}
      - run:
          name: "Install bats"
          working_directory: deps/
          command: |
            tar -xf bats_v0.4.0.tar.gz
            sudo bats-0.4.0/install.sh /usr/local
      - run:
          name: "Install manifest tool"
          working_directory: deps/
          command: |
            sudo cp manifest-tool-linux-amd64 /usr/bin/manifest-tool
      - run:
          name: Run build script
          command: ./build
      - run:
          name: Run tests
          command: ./build test
          environment:
            - files: "versions/**/options"
      - run:
          name: "Clean up builders"
          command: docker image prune -f
      - run:
          name: "Save containers to file"
          command: |
            docker image save -o built_images.tar troyfontaine/armhf_min-alpinelinux troyfontaine/armhf-alpinelinux troyfontaine/x86_64-alpinelinux
{'fraction_non_alphanumeric': 0.11296818364881192, 'fraction_numerical': 0.01369311316955296, 'mean_word_length': 1.2007089056269384, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '71746', 'n_tokens_mistral': 1574, 'n_tokens_neox': 1497, 'n_words': 327}