<commit_before>version: v1.0
name: Felix

execution_time_limit:
  hours: 2

agent:
  machine:
    type: e1-standard-2
    os_image: ubuntu1804

auto_cancel:
  running:
    when: "branch != 'master'"
  queued:
    when: "branch != 'master'"

promotions:
- name: Cleanup
  pipeline_file: cleanup.yml
  auto_promote:
    when: "result = 'stopped'"

blocks:
- name: Build
  dependencies: []
  task:
    agent:
      machine:
        type: e1-standard-4
        os_image: ubuntu1804
    jobs:
    - name: Build
      commands:
      - checkout
      - cache restore go-pkg-cache
      - cache restore go-mod-cache
      - >-
        make image fv/fv.test bin/test-workload bin/test-connection
        bin/calico-felix
      - 'cache store bin-${SEMAPHORE_GIT_SHA} bin'
      - cache store go-pkg-cache .go-pkg-cache
      - 'cache store go-mod-cache ${HOME}/go/pkg/mod/cache'
      - docker save -o /tmp/calico-felix.tar calico/felix:latest-amd64
      - 'cache store felix-image-${SEMAPHORE_GIT_SHA} /tmp/calico-felix.tar'
- name: FV Tests
  dependencies: ["Build"]
  task:
    prologue:
      commands:
      # Free up space on the build machine.
      - sudo rm -rf ~/.kiex ~/.phpbrew ~/.rbenv ~/.nvm ~/.kerl
      - checkout
      - cache restore go-pkg-cache
      - cache restore go-mod-cache
      - 'cache restore bin-${SEMAPHORE_GIT_SHA}'
      - 'cache restore felix-image-${SEMAPHORE_GIT_SHA}'
      - docker load -i /tmp/calico-felix.tar
      - rm /tmp/calico-felix.tar
      - touch bin/*
    jobs:
    - name: FV Test matrix
      commands:
      # Check that Wireguard is NOT available on the normal Semaphore VM.  If it becomes
      # available in future, then:
      #
      # 1. We should remove the `make fv GINKGO_FOCUS=WireGuard-Supported` that we're
      # running on the newer kernel VMs (below), so as not to run those tests twice.
      #
      # 2. We should delete the WireGuard-Unsupported tests, or find another way to run
      # them in CI, as they only do anything when WireGuard is NOT available.
      - " make check-wireguard"
      - make fv FV_BATCHES_TO_RUN="${SEMAPHORE_JOB_INDEX}" FV_NUM_BATCHES=${SEMAPHORE_JOB_COUNT}
      parallelism: 3
    epilogue:
      always:
        commands:
        - ./.semaphore/collect-artifacts
        - ./.semaphore/publish-artifacts
- name: BPF UT/FV tests on new kernel
  dependencies: []
  task:
    prologue:
      commands:
      - checkout
      - export GOOGLE_APPLICATION_CREDENTIALS=$HOME/secrets/secret.google-service-account-key.json
      - export SHORT_WORKFLOW_ID=$(echo ${SEMAPHORE_WORKFLOW_ID} | sha256sum | cut -c -8)
      - export ZONE=europe-west3-c
      - export VM_NAME=sem-${SEMAPHORE_PROJECT_NAME}-${SHORT_WORKFLOW_ID}-${SEMAPHORE_JOB_INDEX:-ut}
      - echo VM_NAME=${VM_NAME}
      - export REPO_NAME=$(basename $(pwd))
      - mkdir artifacts
      - ./.semaphore/create-test-vm ${VM_NAME}
    jobs:
    - name: UT and Wireguard non-BPF FV on newer kernel
      commands:
      - ./.semaphore/on-test-vm make --directory=${REPO_NAME} ut-bpf
      - ./.semaphore/on-test-vm make --directory=${REPO_NAME} check-wireguard
    - name: FV on newer kernel
      commands:
      - ./.semaphore/on-test-vm make --directory=${REPO_NAME} fv-bpf GINKGO_FOCUS=BPF-SAFE FV_NUM_BATCHES=${SEMAPHORE_JOB_COUNT} FV_BATCHES_TO_RUN="${SEMAPHORE_JOB_INDEX}"
      parallelism: 8
    epilogue:
      always:
        commands:
        - ./.semaphore/on-test-vm ${REPO_NAME}/.semaphore/collect-artifacts
        - gcloud --quiet compute scp "--zone=${ZONE}" "ubuntu@${VM_NAME}:${REPO_NAME}/artifacts" ./ --recurse
        - ./.semaphore/publish-artifacts
        - gcloud --quiet compute instances delete ${VM_NAME} --zone=${ZONE}
    secrets:
    - name: google-service-account-for-gce
- name: Static checks
  dependencies: []
  task:
    agent:
      machine:
        # Linters use a lot of RAM so use a bigger machine type.
        type: e1-standard-8
        os_image: ubuntu1804
    prologue:
      commands:
      - checkout
      - cache restore go-pkg-cache
      - cache restore go-mod-cache
    jobs:
    - name: Static checks
      commands:
      - make static-checks
- name: Multi-arch builds, UT, k8sfv-tests
  dependencies: []
  task:
    prologue:
      commands:
      - checkout
      - cache restore go-pkg-cache
      - cache restore go-mod-cache
    jobs:
    - name: CI excluding FV
      commands:
      - make ci EXCEPT=fv
<commit_msg>Removing comments<commit_after>version: v1.0
name: Felix

execution_time_limit:
  hours: 2

agent:
  machine:
    type: e1-standard-2
    os_image: ubuntu1804

auto_cancel:
  running:
    when: "branch != 'master'"
  queued:
    when: "branch != 'master'"

promotions:
- name: Cleanup
  pipeline_file: cleanup.yml
  auto_promote:
    when: "result = 'stopped'"

blocks:
- name: Build
  dependencies: []
  task:
    agent:
      machine:
        type: e1-standard-4
        os_image: ubuntu1804
    jobs:
    - name: Build
      commands:
      - checkout
      - cache restore go-pkg-cache
      - cache restore go-mod-cache
      - >-
        make image fv/fv.test bin/test-workload bin/test-connection
        bin/calico-felix
      - 'cache store bin-${SEMAPHORE_GIT_SHA} bin'
      - cache store go-pkg-cache .go-pkg-cache
      - 'cache store go-mod-cache ${HOME}/go/pkg/mod/cache'
      - docker save -o /tmp/calico-felix.tar calico/felix:latest-amd64
      - 'cache store felix-image-${SEMAPHORE_GIT_SHA} /tmp/calico-felix.tar'
- name: FV Tests
  dependencies: ["Build"]
  task:
    prologue:
      commands:
      # Free up space on the build machine.
      - sudo rm -rf ~/.kiex ~/.phpbrew ~/.rbenv ~/.nvm ~/.kerl
      - checkout
      - cache restore go-pkg-cache
      - cache restore go-mod-cache
      - 'cache restore bin-${SEMAPHORE_GIT_SHA}'
      - 'cache restore felix-image-${SEMAPHORE_GIT_SHA}'
      - docker load -i /tmp/calico-felix.tar
      - rm /tmp/calico-felix.tar
      - touch bin/*
    jobs:
    - name: FV Test matrix
      commands:
      - " make check-wireguard"
      - make fv FV_BATCHES_TO_RUN="${SEMAPHORE_JOB_INDEX}" FV_NUM_BATCHES=${SEMAPHORE_JOB_COUNT}
      parallelism: 3
    epilogue:
      always:
        commands:
        - ./.semaphore/collect-artifacts
        - ./.semaphore/publish-artifacts
- name: BPF UT/FV tests on new kernel
  dependencies: []
  task:
    prologue:
      commands:
      - checkout
      - export GOOGLE_APPLICATION_CREDENTIALS=$HOME/secrets/secret.google-service-account-key.json
      - export SHORT_WORKFLOW_ID=$(echo ${SEMAPHORE_WORKFLOW_ID} | sha256sum | cut -c -8)
      - export ZONE=europe-west3-c
      - export VM_NAME=sem-${SEMAPHORE_PROJECT_NAME}-${SHORT_WORKFLOW_ID}-${SEMAPHORE_JOB_INDEX:-ut}
      - echo VM_NAME=${VM_NAME}
      - export REPO_NAME=$(basename $(pwd))
      - mkdir artifacts
      - ./.semaphore/create-test-vm ${VM_NAME}
    jobs:
    - name: UT and Wireguard non-BPF FV on newer kernel
      commands:
      - ./.semaphore/on-test-vm make --directory=${REPO_NAME} ut-bpf
      - ./.semaphore/on-test-vm make --directory=${REPO_NAME} check-wireguard
    - name: FV on newer kernel
      commands:
      - ./.semaphore/on-test-vm make --directory=${REPO_NAME} fv-bpf GINKGO_FOCUS=BPF-SAFE FV_NUM_BATCHES=${SEMAPHORE_JOB_COUNT} FV_BATCHES_TO_RUN="${SEMAPHORE_JOB_INDEX}"
      parallelism: 8
    epilogue:
      always:
        commands:
        - ./.semaphore/on-test-vm ${REPO_NAME}/.semaphore/collect-artifacts
        - gcloud --quiet compute scp "--zone=${ZONE}" "ubuntu@${VM_NAME}:${REPO_NAME}/artifacts" ./ --recurse
        - ./.semaphore/publish-artifacts
        - gcloud --quiet compute instances delete ${VM_NAME} --zone=${ZONE}
    secrets:
    - name: google-service-account-for-gce
- name: Static checks
  dependencies: []
  task:
    agent:
      machine:
        # Linters use a lot of RAM so use a bigger machine type.
        type: e1-standard-8
        os_image: ubuntu1804
    prologue:
      commands:
      - checkout
      - cache restore go-pkg-cache
      - cache restore go-mod-cache
    jobs:
    - name: Static checks
      commands:
      - make static-checks
- name: Multi-arch builds, UT, k8sfv-tests
  dependencies: []
  task:
    prologue:
      commands:
      - checkout
      - cache restore go-pkg-cache
      - cache restore go-mod-cache
    jobs:
    - name: CI excluding FV
      commands:
      - make ci EXCEPT=fv

{'fraction_non_alphanumeric': 0.11858554589832122, 'fraction_numerical': 0.007619954756518633, 'mean_word_length': 2.277409285992977, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1968681', 'n_tokens_mistral': 3042, 'n_tokens_neox': 2920, 'n_words': 666}