<commit_before>version: 2

defaults: &defaults
  machine:
      enabled: true

run_apt_packages: &run_apt_packages 
  name: Prepare VM
  command: sudo apt-get update && sudo apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common git python3

set_python_version: &set_python_version
  name: Set Python Version
  command: pyenv global 3.5.2

run_base_setup: &run_base_setup
  name: Setup repo and execute VM builder
  command: ./gitian-build.py --docker --commit --setup marpme master

jobs:
  build:
    <<: *defaults
    steps:
      - run:
          <<: *run_apt_packages
      - checkout:
          path: ~/project/verge
      - run:
          name: Hardcopy gitian build script
          command: cp ./verge/contrib/gitian-build.py . && chmod u+x gitian-build.py
      - run:
          name: Prepare VM Builder
          command: git clone https://github.com/newroco/vmbuilder.git && cd vmbuilder && sudo chmod u+x setup.py && sudo ./setup.py install
      - run: 
          name: Add OSX SDK
          command: mkdir -p gitian-builder && cd ./gitian-builder && mkdir -p inputs && cd inputs && curl -L https://github.com/phracker/MacOSX-SDKs/releases/download/10.13/MacOSX10.11.sdk.tar.xz --output MacOSX10.11.sdk.tar.gz
      - persist_to_workspace:
          root: "."
          paths:
            - "."

  windows:
    <<: *defaults
    steps:
      - attach_workspace:
          at: .
      - run:
          <<: *run_apt_packages
      - run:
          <<: *set_python_version
      - run:
          <<: *run_base_setup
      - run: 
          name: Gitian Build Windows
          command: ./gitian-build.py --docker --detach-sign -o w --commit -j 4 -m 4000 -b marpme master

  macos:
    <<: *defaults
    steps:
      - attach_workspace:
          at: .
      - run: 
          <<: *run_apt_packages
      - run:
          <<: *set_python_version
      - run:
          <<: *run_base_setup
      - run: 
          name: Gitian Build Windows
          command: ./gitian-build.py --docker --detach-sign -o m --commit -j 4 -m 4000 -b marpme master
  linux:
    <<: *defaults
    steps:
      - attach_workspace:
          at: .
      - run: 
          <<: *run_apt_packages
      - run:
          <<: *set_python_version
      - run:
          <<: *run_base_setup
      - run: 
          name: Gitian Build Windows
          command: ./gitian-build.py --docker --detach-sign -o l --commit -j 4 -m 4000 -b marpme master

workflows:
  version: 2
  build_all:
    jobs:
      - build
      - windows:
          requires:
            - build
          filters:
            branches:
              only: master
      - macos:
          requires:
            - build
          filters:
            branches:
              only: master
      - linux:
          requires:
            - build
          filters:
            branches:
              only: master
<commit_msg>fix fix and circle CI<commit_after>version: 2

defaults: &defaults
  machine:
      enabled: true

run_apt_packages: &run_apt_packages 
  name: Prepare VM
  command: sudo apt-get update && sudo apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common git python3

set_python_version: &set_python_version
  name: Set Python Version
  command: pyenv global 3.5.2

run_base_setup: &run_base_setup
  name: Setup repo and execute VM builder
  command: ./gitian-build.py --docker --commit --setup marpme master

jobs:
  build:
    <<: *defaults
    steps:
      - run:
          <<: *run_apt_packages
      - checkout:
          path: ~/project/verge
      - run:
          name: Hardcopy gitian build script
          command: cp ./verge/contrib/gitian-build.py . && chmod u+x gitian-build.py
      - run:
          name: Prepare VM Builder
          command: git clone https://github.com/newroco/vmbuilder.git && cd vmbuilder && sudo chmod u+x setup.py && sudo ./setup.py install
      - persist_to_workspace:
          root: "."
          paths:
            - "."

  windows:
    <<: *defaults
    steps:
      - attach_workspace:
          at: .
      - run:
          <<: *run_apt_packages
      - run:
          <<: *set_python_version
      - run:
          <<: *run_base_setup
      - run: 
          name: Gitian Build Windows
          command: ./gitian-build.py --docker --detach-sign -o w --commit -j 4 -m 4000 -b marpme master

  macos:
    <<: *defaults
    steps:
      - attach_workspace:
          at: .
      - run: 
          <<: *run_apt_packages
      - run:
          <<: *set_python_version
      - run:
          <<: *run_base_setup
      - run: 
          name: Gitian Build MacOS
          command: ./gitian-build.py --docker --detach-sign -o m --commit -j 4 -m 4000 -b marpme master
  linux:
    <<: *defaults
    steps:
      - attach_workspace:
          at: .
      - run: 
          <<: *run_apt_packages
      - run:
          <<: *set_python_version
      - run:
          <<: *run_base_setup
      - run: 
          name: Add OSX SDK
          command: mkdir -p gitian-builder && cd ./gitian-builder && mkdir -p inputs && cd inputs && curl -L https://github.com/phracker/MacOSX-SDKs/releases/download/10.13/MacOSX10.11.sdk.tar.xz --output MacOSX10.11.sdk.tar.gz
      - run: 
          name: Gitian Build Linux
          command: ./gitian-build.py --docker --detach-sign -o l --commit -j 4 -m 4000 -b marpme master

workflows:
  version: 2
  build_all:
    jobs:
      - build
      - windows:
          requires:
            - build
          filters:
            branches:
              only: master
      - macos:
          requires:
            - build
          filters:
            branches:
              only: master
      - linux:
          requires:
            - build
          filters:
            branches:
              only: master

{'fraction_non_alphanumeric': 0.10939643347050755, 'fraction_numerical': 0.01131687242798354, 'mean_word_length': 1.5549715286903198, 'pattern_counts': {'":': 0, '<': 59, '<?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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1028493', 'n_tokens_mistral': 1913, 'n_tokens_neox': 1813, 'n_words': 470}