<commit_before>name: perf

on:
  push:
    branches:
      - main
  pull_request:

jobs:
  sizecurrent:
    name: size_current
    runs-on: ubuntu-latest
    timeout-minutes: 120
    container:
      image: envoyproxy/envoy-build-ubuntu:0a02a76af5951bf7f4c7029c0ea6d29d96c0f682
      env:
        CC: /opt/llvm/bin/clang
        CXX: /opt/llvm/bin/clang++
    steps:
      - uses: actions/checkout@v1
        with:
          submodules: true
      - name: Add safe directory
        run: git config --global --add safe.directory /__w/envoy/envoy
      - name: 'Build test binary'
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: |
          cd mobile && ./bazelw build \
            --config=sizeopt \
            --config=remote-ci-linux-clang \
            --remote_header="Authorization=Bearer $GITHUB_TOKEN" \
            //test/performance:test_binary_size
      - uses: actions/upload-artifact@v2
        with:
          name: sizecurrent
          path: mobile/bazel-bin/test/performance/test_binary_size
  sizemain:
    name: size_main
    runs-on: ubuntu-latest
    timeout-minutes: 90
    container:
      image: envoyproxy/envoy-build-ubuntu:0a02a76af5951bf7f4c7029c0ea6d29d96c0f682
      env:
        CC: /opt/llvm/bin/clang
        CXX: /opt/llvm/bin/clang++
    steps:
      - uses: actions/checkout@v1
        with:
          submodules: true
      - name: Add safe directory
        run: |
          git config --global --add safe.directory /__w/envoy/envoy
      - name: 'Build test binary'
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: |
          git checkout main && git pull origin main
          cd mobile && ./bazelw build \
            --config=sizeopt \
            --config=remote-ci-linux-clang \
            --remote_header="Authorization=Bearer $GITHUB_TOKEN" \
            //test/performance:test_binary_size
      - uses: actions/upload-artifact@v2
        with:
          name: sizemain
          path: mobile/bazel-bin/test/performance/test_binary_size
  sizecompare:
    name: size_compare
    needs: [sizecurrent, sizemain]
    runs-on: ubuntu-latest
    timeout-minutes: 30
    container:
      image: envoyproxy/envoy-build-ubuntu:0a02a76af5951bf7f4c7029c0ea6d29d96c0f682
    steps:
      - uses: actions/checkout@v1
      - uses: actions/download-artifact@v2
        with:
          name: sizecurrent
          path: dist/sizecurrent
      - uses: actions/download-artifact@v2
        with:
          name: sizemain
          path: dist/sizemain
      - name: 'Strip and Zip binary'
        run: |
          ls -lh dist/
          strip -s -o dist/main.stripped dist/sizemain/test_binary_size
          strip -s -o dist/current.stripped dist/sizecurrent/test_binary_size
          zip -9 dist/main.zip dist/main.stripped
          zip -9 dist/current.zip dist/current.stripped
      - name: 'Test size regression'
        run: cd mobile && ./ci/test_size_regression.sh dist/main.zip dist/current.zip<commit_msg>build(deps): bump actions/download-artifact from 2 to 3 (#24177)<commit_after>name: perf

on:
  push:
    branches:
      - main
  pull_request:

jobs:
  sizecurrent:
    name: size_current
    runs-on: ubuntu-latest
    timeout-minutes: 120
    container:
      image: envoyproxy/envoy-build-ubuntu:0a02a76af5951bf7f4c7029c0ea6d29d96c0f682
      env:
        CC: /opt/llvm/bin/clang
        CXX: /opt/llvm/bin/clang++
    steps:
      - uses: actions/checkout@v1
        with:
          submodules: true
      - name: Add safe directory
        run: git config --global --add safe.directory /__w/envoy/envoy
      - name: 'Build test binary'
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: |
          cd mobile && ./bazelw build \
            --config=sizeopt \
            --config=remote-ci-linux-clang \
            --remote_header="Authorization=Bearer $GITHUB_TOKEN" \
            //test/performance:test_binary_size
      - uses: actions/upload-artifact@v2
        with:
          name: sizecurrent
          path: mobile/bazel-bin/test/performance/test_binary_size
  sizemain:
    name: size_main
    runs-on: ubuntu-latest
    timeout-minutes: 90
    container:
      image: envoyproxy/envoy-build-ubuntu:0a02a76af5951bf7f4c7029c0ea6d29d96c0f682
      env:
        CC: /opt/llvm/bin/clang
        CXX: /opt/llvm/bin/clang++
    steps:
      - uses: actions/checkout@v1
        with:
          submodules: true
      - name: Add safe directory
        run: |
          git config --global --add safe.directory /__w/envoy/envoy
      - name: 'Build test binary'
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: |
          git checkout main && git pull origin main
          cd mobile && ./bazelw build \
            --config=sizeopt \
            --config=remote-ci-linux-clang \
            --remote_header="Authorization=Bearer $GITHUB_TOKEN" \
            //test/performance:test_binary_size
      - uses: actions/upload-artifact@v2
        with:
          name: sizemain
          path: mobile/bazel-bin/test/performance/test_binary_size
  sizecompare:
    name: size_compare
    needs: [sizecurrent, sizemain]
    runs-on: ubuntu-latest
    timeout-minutes: 30
    container:
      image: envoyproxy/envoy-build-ubuntu:0a02a76af5951bf7f4c7029c0ea6d29d96c0f682
    steps:
      - uses: actions/checkout@v1
      - uses: actions/download-artifact@v3
        with:
          name: sizecurrent
          path: dist/sizecurrent
      - uses: actions/download-artifact@v3
        with:
          name: sizemain
          path: dist/sizemain
      - name: 'Strip and Zip binary'
        run: |
          ls -lh dist/
          strip -s -o dist/main.stripped dist/sizemain/test_binary_size
          strip -s -o dist/current.stripped dist/sizecurrent/test_binary_size
          zip -9 dist/main.zip dist/main.stripped
          zip -9 dist/current.zip dist/current.stripped
      - name: 'Test size regression'
        run: cd mobile && ./ci/test_size_regression.sh dist/main.zip dist/current.zip
{'fraction_non_alphanumeric': 0.09883050568275407, 'fraction_numerical': 0.031131609290067534, 'mean_word_length': 1.9390125847047435, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 5, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5364299', 'n_tokens_mistral': 2122, 'n_tokens_neox': 2013, 'n_words': 394}