<commit_before>name: android_build

on:
  push:
    branches:
      - main
  pull_request:

jobs:
  androidbuild:
    name: android_build
    runs-on: macos-12
    timeout-minutes: 90
    steps:
      - uses: actions/checkout@v1
        with:
          submodules: true
      - uses: actions/setup-java@v1
        with:
          java-version: '8'
          java-package: jdk
          architecture: x64
      - name: 'Install dependencies'
        run: ./ci/mac_ci_setup.sh --android
      - name: 'Build envoy.aar distributable'
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: |
          ./bazelw build \
            --config=remote-ci-macos \
            --remote_header="Authorization=Bearer $GITHUB_TOKEN" \
            --fat_apk_cpu=x86_64 \
            //:android_dist
  javahelloworld:
    name: java_helloworld
    needs: androidbuild
    runs-on: macos-12
    timeout-minutes: 25
    steps:
      - uses: actions/checkout@v1
        with:
          submodules: true
      - uses: actions/setup-java@v1
        with:
          java-version: '8'
          java-package: jdk
          architecture: x64
      - run: ./ci/mac_ci_setup.sh --android
        name: 'Install dependencies'
      - name: 'Start simulator'
        run: ./ci/mac_start_emulator.sh
      # Return to using:
      #   ./bazelw mobile-install --fat_apk_cpu=x86_64 --start_app //examples/java/hello_world:hello_envoy
      # When https://github.com/envoyproxy/envoy-mobile/issues/853 is fixed.
      - name: 'Start java app'
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: |
          ./bazelw build \
            --config=remote-ci-macos \
            --remote_header="Authorization=Bearer $GITHUB_TOKEN" \
            --fat_apk_cpu=x86_64 \
            //examples/java/hello_world:hello_envoy
          adb install -r --no-incremental bazel-bin/examples/java/hello_world/hello_envoy.apk
          adb shell am start -n io.envoyproxy.envoymobile.helloenvoy/.MainActivity
      - name: 'Check connectivity'
        run: adb logcat -e "received headers with status 200" -m 1
  kotlinhelloworld:
    name: kotlin_helloworld
    needs: androidbuild
    runs-on: macos-12
    timeout-minutes: 25
    steps:
      - uses: actions/checkout@v1
        with:
          submodules: true
      - uses: actions/setup-java@v1
        with:
          java-version: '8'
          java-package: jdk
          architecture: x64
      - name: 'Install dependencies'
        run: ./ci/mac_ci_setup.sh --android
      - name: 'Start simulator'
        run: ./ci/mac_start_emulator.sh
      # Return to using:
      #   ./bazelw mobile-install --fat_apk_cpu=x86_64 --start_app //examples/kotlin/hello_world:hello_envoy_kt
      # When https://github.com/envoyproxy/envoy-mobile/issues/853 is fixed.
      - name: 'Start kotlin app'
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: |
          ./bazelw build \
            --config=remote-ci-macos \
            --remote_header="Authorization=Bearer $GITHUB_TOKEN" \
            --fat_apk_cpu=x86_64 \
            //examples/kotlin/hello_world:hello_envoy_kt
          adb install -r --no-incremental bazel-bin/examples/kotlin/hello_world/hello_envoy_kt.apk
          adb shell am start -n io.envoyproxy.envoymobile.helloenvoykotlin/.MainActivity
      - name: 'Check connectivity'
        run: adb logcat -e "received headers with status 200" -m 1
  kotlinbaselineapp:
    name: kotlin_baseline_app
    needs: androidbuild
    runs-on: macos-12
    timeout-minutes: 25
    steps:
      - uses: actions/checkout@v1
        with:
          submodules: true
      - uses: actions/setup-java@v1
        with:
          java-version: '8'
          java-package: jdk
          architecture: x64
      - name: 'Install dependencies'
        run: ./ci/mac_ci_setup.sh --android
      - name: 'Start simulator'
        run: ./ci/mac_start_emulator.sh
      # Return to using:
      #   ./bazelw mobile-install --fat_apk_cpu=x86_64 --start_app //examples/kotlin/hello_world:hello_envoy_kt
      # When https://github.com/envoyproxy/envoy-mobile/issues/853 is fixed.
      - name: 'Start kotlin app'
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: |
          ./bazelw build \
            --config=remote-ci-macos \
            --remote_header="Authorization=Bearer $GITHUB_TOKEN" \
            --fat_apk_cpu=x86_64 \
            //test/kotlin/apps/baseline:hello_envoy_kt
          adb install -r --no-incremental bazel-bin/test/kotlin/apps/baseline/hello_envoy_kt.apk
          adb shell am start -n io.envoyproxy.envoymobile.helloenvoykotlin/.MainActivity
      - name: 'Check connectivity'
        run: adb logcat -e "received headers with status 200" -m 1
  kotlinexperimentalapp:
    name: kotlin_experimental_app
    needs: androidbuild
    runs-on: macos-12
    timeout-minutes: 25
    steps:
      - uses: actions/checkout@v1
        with:
          submodules: true
      - uses: actions/setup-java@v1
        with:
          java-version: '8'
          java-package: jdk
          architecture: x64
      - name: 'Install dependencies'
        run: ./ci/mac_ci_setup.sh --android
      - name: 'Start simulator'
        run: ./ci/mac_start_emulator.sh
      # Return to using:
      #   ./bazelw mobile-install --fat_apk_cpu=x86_64 --start_app //examples/kotlin/hello_world:hello_envoy_kt
      # When https://github.com/envoyproxy/envoy-mobile/issues/853 is fixed.
      - name: 'Start kotlin app'
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: |
          ./bazelw build \
            --config=remote-ci-macos \
            --remote_header="Authorization=Bearer $GITHUB_TOKEN" \
            --fat_apk_cpu=x86_64 \
            //test/kotlin/apps/experimental:hello_envoy_kt
          adb install -r --no-incremental bazel-bin/test/kotlin/apps/experimental/hello_envoy_kt.apk
          adb shell am start -n io.envoyproxy.envoymobile.helloenvoykotlin/.MainActivity
      - name: 'Check connectivity'
        run: adb logcat -e "received headers with status 200" -m 1<commit_msg>ci: fix test apps (#2542)<commit_after>name: android_build

on:
  push:
    branches:
      - main
  pull_request:

jobs:
  androidbuild:
    name: android_build
    runs-on: macos-12
    timeout-minutes: 90
    steps:
      - uses: actions/checkout@v1
        with:
          submodules: true
      - uses: actions/setup-java@v1
        with:
          java-version: '8'
          java-package: jdk
          architecture: x64
      - name: 'Install dependencies'
        run: ./ci/mac_ci_setup.sh --android
      - name: 'Build envoy.aar distributable'
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: |
          ./bazelw build \
            --config=remote-ci-macos \
            --remote_header="Authorization=Bearer $GITHUB_TOKEN" \
            --fat_apk_cpu=x86_64 \
            //:android_dist
  javahelloworld:
    name: java_helloworld
    needs: androidbuild
    runs-on: macos-12
    timeout-minutes: 25
    steps:
      - uses: actions/checkout@v1
        with:
          submodules: true
      - uses: actions/setup-java@v1
        with:
          java-version: '8'
          java-package: jdk
          architecture: x64
      - run: ./ci/mac_ci_setup.sh --android
        name: 'Install dependencies'
      - name: 'Start simulator'
        run: ./ci/mac_start_emulator.sh
      # Return to using:
      #   ./bazelw mobile-install --fat_apk_cpu=x86_64 --start_app //examples/java/hello_world:hello_envoy
      # When https://github.com/envoyproxy/envoy-mobile/issues/853 is fixed.
      - name: 'Start java app'
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: |
          ./bazelw build \
            --config=remote-ci-macos \
            --remote_header="Authorization=Bearer $GITHUB_TOKEN" \
            --fat_apk_cpu=x86_64 \
            //examples/java/hello_world:hello_envoy
          adb install -r --no-incremental bazel-bin/examples/java/hello_world/hello_envoy.apk
          adb shell am start -n io.envoyproxy.envoymobile.helloenvoy/.MainActivity
      - name: 'Check connectivity'
        run: adb logcat -e "received headers with status 200" -m 1
  kotlinhelloworld:
    name: kotlin_helloworld
    needs: androidbuild
    runs-on: macos-12
    timeout-minutes: 25
    steps:
      - uses: actions/checkout@v1
        with:
          submodules: true
      - uses: actions/setup-java@v1
        with:
          java-version: '8'
          java-package: jdk
          architecture: x64
      - name: 'Install dependencies'
        run: ./ci/mac_ci_setup.sh --android
      - name: 'Start simulator'
        run: ./ci/mac_start_emulator.sh
      # Return to using:
      #   ./bazelw mobile-install --fat_apk_cpu=x86_64 --start_app //examples/kotlin/hello_world:hello_envoy_kt
      # When https://github.com/envoyproxy/envoy-mobile/issues/853 is fixed.
      - name: 'Start kotlin app'
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: |
          ./bazelw build \
            --config=remote-ci-macos \
            --remote_header="Authorization=Bearer $GITHUB_TOKEN" \
            --fat_apk_cpu=x86_64 \
            //examples/kotlin/hello_world:hello_envoy_kt
          adb install -r --no-incremental bazel-bin/examples/kotlin/hello_world/hello_envoy_kt.apk
          adb shell am start -n io.envoyproxy.envoymobile.helloenvoykotlin/.MainActivity
      - name: 'Check connectivity'
        run: adb logcat -e "received headers with status 200" -m 1
  kotlinbaselineapp:
    name: kotlin_baseline_app
    needs: androidbuild
    runs-on: macos-12
    timeout-minutes: 25
    steps:
      - uses: actions/checkout@v1
        with:
          submodules: true
      - uses: actions/setup-java@v1
        with:
          java-version: '8'
          java-package: jdk
          architecture: x64
      - name: 'Install dependencies'
        run: ./ci/mac_ci_setup.sh --android
      - name: 'Start simulator'
        run: ./ci/mac_start_emulator.sh
      # Return to using:
      #   ./bazelw mobile-install --fat_apk_cpu=x86_64 --start_app //examples/kotlin/hello_world:hello_envoy_kt
      # When https://github.com/envoyproxy/envoy-mobile/issues/853 is fixed.
      - name: 'Start kotlin app'
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: |
          ./bazelw build \
            --config=remote-ci-macos \
            --remote_header="Authorization=Bearer $GITHUB_TOKEN" \
            --fat_apk_cpu=x86_64 \
            //test/kotlin/apps/baseline:hello_envoy_kt
          adb install -r --no-incremental bazel-bin/test/kotlin/apps/baseline/hello_envoy_kt.apk
          adb shell am start -n io.envoyproxy.envoymobile.helloenvoybaselinetest/.MainActivity
      - name: 'Check connectivity'
        run: adb logcat -e "received headers with status 200" -m 1
  kotlinexperimentalapp:
    name: kotlin_experimental_app
    needs: androidbuild
    runs-on: macos-12
    timeout-minutes: 25
    steps:
      - uses: actions/checkout@v1
        with:
          submodules: true
      - uses: actions/setup-java@v1
        with:
          java-version: '8'
          java-package: jdk
          architecture: x64
      - name: 'Install dependencies'
        run: ./ci/mac_ci_setup.sh --android
      - name: 'Start simulator'
        run: ./ci/mac_start_emulator.sh
      # Return to using:
      #   ./bazelw mobile-install --fat_apk_cpu=x86_64 --start_app //examples/kotlin/hello_world:hello_envoy_kt
      # When https://github.com/envoyproxy/envoy-mobile/issues/853 is fixed.
      - name: 'Start kotlin app'
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: |
          ./bazelw build \
            --config=remote-ci-macos \
            --remote_header="Authorization=Bearer $GITHUB_TOKEN" \
            --fat_apk_cpu=x86_64 \
            //test/kotlin/apps/experimental:hello_envoy_kt
          adb install -r --no-incremental bazel-bin/test/kotlin/apps/experimental/hello_envoy_kt.apk
          adb shell am start -n io.envoyproxy.envoymobile.helloenvoyexperimentaltest/.MainActivity
      - name: 'Check connectivity'
        run: adb logcat -e "received headers with status 200" -m 1
{'fraction_non_alphanumeric': 0.1061615997398797, 'fraction_numerical': 0.01804584620386929, 'mean_word_length': 1.9355762347888332, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 8, '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': '2537049', 'n_tokens_mistral': 4259, 'n_tokens_neox': 4007, 'n_words': 801}