<commit_before># Run resolving benchmark and store results. Fail if any resolved runtimes
# change from previous result
#
name: benchmark
on:
  release:
    types: [released]

jobs:
  run_benchmark:
    name: run_benchmark
    runs-on: ubuntu-latest

    strategy:
      matrix:
        python-version:
          - '2.7'
          - '3.7'

      # without this, we're sometimes getting at the end of this job:
      # '[error] The operation was canceled'.
      # Do we hit a resource limit?
      #
      max-parallel: 1

    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.python-version }}

      - name: Install Rez
        run: |
          mkdir ./installdir
          python ./install.py ./installdir

      - name: Run Benchmark
        run: |
          ./installdir/bin/rez/rez-benchmark --out ./out

          # remove benchmarking suite package repo
          rm -rf ./out/packages

      - name: Validate Result
        run: |
          python ./.github/scripts/validate_benchmark.py

      - uses: actions/upload-artifact@v2
        with:
          name: "benchmark-result-${{ matrix.python-version }}"
          path: ./out

  store_benchmark_result:
    name: store_benchmark_result
    runs-on: ubuntu-latest
    needs: run_benchmark

    strategy:
      matrix:
        python-version:
          - '2.7'
          - '3.7'

      # so we don't have jobs trying to push to git at the same time
      max-parallel: 1

    steps:
      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.python-version }}

      - uses: actions/download-artifact@v2
        with:
          name: "benchmark-result-${{ matrix.python-version }}"
          path: .

      - name: Checkout
        uses: actions/checkout@v2
        with:
          ref: master
          path: src

      # Note failing due to
      # https://github.com/actions/virtual-environments/issues/675
      #
      # We'll just skip on failure, this just means the gnuplot doesn't render
      #
      - name: Install gnuplot
        run: |
          sudo apt-get update
          sudo apt-get install -y gnuplot || /bin/true

      - name: Store Benchmark Result
        run: |
          python ./.github/scripts/store_benchmark.py
        working-directory: src

      - name: Setup git config
        run: |
          git config user.name 'github-actions[bot]'
          git config user.email '<EMAIL>-actions[<EMAIL>]<EMAIL>'
        working-directory: src

      - name: Git commit and push
        run: |
          git add --all
          git commit \
            -m "Generated from GitHub "${{ github.workflow }}" Workflow" \
            && git push origin master \
            || echo "Nothing new to commit"
        working-directory: src<commit_msg>fix accidental skip of fail in benchmarking ci Signed-off-by: ajohns <<EMAIL>><commit_after># Run resolving benchmark and store results. Fail if any resolved runtimes
# change from previous result
#
name: benchmark
on:
  release:
    types: [released]

jobs:
  run_benchmark:
    name: run_benchmark
    runs-on: ubuntu-latest

    strategy:
      matrix:
        python-version:
          - '2.7'
          - '3.7'

      # without this, we're sometimes getting at the end of this job:
      # '[error] The operation was canceled'.
      # Do we hit a resource limit?
      #
      max-parallel: 1

    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.python-version }}

      - name: Install Rez
        run: |
          mkdir ./installdir
          python ./install.py ./installdir

      - name: Run Benchmark
        run: |
          ./installdir/bin/rez/rez-benchmark --out ./out

          # remove benchmarking suite package repo
          rm -rf ./out/packages

      - name: Validate Result
        run: |
          python ./.github/scripts/validate_benchmark.py

      - uses: actions/upload-artifact@v2
        with:
          name: "benchmark-result-${{ matrix.python-version }}"
          path: ./out

  store_benchmark_result:
    name: store_benchmark_result
    runs-on: ubuntu-latest
    needs: run_benchmark

    strategy:
      matrix:
        python-version:
          - '2.7'
          - '3.7'

      # so we don't have jobs trying to push to git at the same time
      max-parallel: 1

    steps:
      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.python-version }}

      - uses: actions/download-artifact@v2
        with:
          name: "benchmark-result-${{ matrix.python-version }}"
          path: .

      - name: Checkout
        uses: actions/checkout@v2
        with:
          ref: master
          path: src

      # Note failing due to
      # https://github.com/actions/virtual-environments/issues/675
      #
      # We'll just skip on failure, this just means the gnuplot doesn't render
      #
      - name: Install gnuplot
        run: |
          sudo apt-get update
          sudo apt-get install -y gnuplot || /bin/true

      - name: Store Benchmark Result
        run: |
          python ./.github/scripts/store_benchmark.py
        working-directory: src

      - name: Setup git config
        run: |
          git config user.name 'github-actions[bot]'
          git config user.email 'github-actions[bot]@users.<EMAIL>'
        working-directory: src

      - name: Git commit and push
        run: |
          if [[ "$(git status --porcelain)" == "" ]]; then
            echo "Nothing new to commit"
          else
            git add --all
            git commit -m "Generated from GitHub "${{ github.workflow }}" Workflow"
            git push origin master
          fi
        working-directory: src
{'fraction_non_alphanumeric': 0.10151116951379763, 'fraction_numerical': 0.006241787122207621, 'mean_word_length': 1.7026187305814469, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '5373177', 'n_tokens_mistral': 1817, 'n_tokens_neox': 1717, 'n_words': 510}