Skip to content

[bp/1.25] Backport stack #6934

[bp/1.25] Backport stack

[bp/1.25] Backport stack #6934

Workflow file for this run

name: android_build
on:
push:
branches:
- main
pull_request:
jobs:
androidbuild:
if: github.repository == 'envoyproxy/envoy'
name: android_build
runs-on: macos-12
timeout-minutes: 90
steps:
- uses: actions/checkout@v1
- id: should_run
name: 'Check whether to run'
run: ./mobile/tools/should_run_ci.sh
- uses: actions/setup-java@c3ac5dd0ed8db40fedb61c32fbe677e6b355e94c
if: steps.should_run.outputs.run_ci_job == 'true'
with:
java-version: '8'
java-package: jdk
architecture: x64
distribution: zulu
- name: 'Install dependencies'
if: steps.should_run.outputs.run_ci_job == 'true'
run: cd mobile && ./ci/mac_ci_setup.sh --android
- name: 'Build envoy.aar distributable'
if: steps.should_run.outputs.run_ci_job == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd mobile && ./bazelw build \
$([ -z $GITHUB_TOKEN ] || echo "--config=remote-ci-macos") \
--remote_header="Authorization=Bearer $GITHUB_TOKEN" \
--fat_apk_cpu=x86_64 \
//:android_dist
javahelloworld:
if: github.repository == 'envoyproxy/envoy'
name: java_helloworld
needs: androidbuild
runs-on: macos-12
timeout-minutes: 50
steps:
- uses: actions/checkout@v1
- id: should_run
name: 'Check whether to run'
run: ./mobile/tools/should_run_ci.sh
- uses: actions/setup-java@c3ac5dd0ed8db40fedb61c32fbe677e6b355e94c
if: steps.should_run.outputs.run_ci_job == 'true'
with:
java-version: '8'
java-package: jdk
architecture: x64
distribution: zulu
- run: cd mobile && ./ci/mac_ci_setup.sh --android
if: steps.should_run.outputs.run_ci_job == 'true'
name: 'Install dependencies'
- uses: nick-fields/retry@943e742917ac94714d2f408a0e8320f2d1fcafcd
if: steps.should_run.outputs.run_ci_job == 'true'
name: 'Start emulator'
with:
timeout_minutes: 6
max_attempts: 3
command: cd mobile && ./ci/mac_start_emulator.sh
# Return to using:
# cd mobile && ./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'
if: steps.should_run.outputs.run_ci_job == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd mobile && ./bazelw build \
$([ -z $GITHUB_TOKEN ] || echo "--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'
if: steps.should_run.outputs.run_ci_job == 'true'
run: adb logcat -e "received headers with status 200" -m 1
kotlinhelloworld:
if: github.repository == 'envoyproxy/envoy'
name: kotlin_helloworld
needs: androidbuild
runs-on: macos-12
timeout-minutes: 50
steps:
- uses: actions/checkout@v1
- id: should_run
name: 'Check whether to run'
run: ./mobile/tools/should_run_ci.sh
- uses: actions/setup-java@c3ac5dd0ed8db40fedb61c32fbe677e6b355e94c
if: steps.should_run.outputs.run_ci_job == 'true'
with:
java-version: '8'
java-package: jdk
architecture: x64
distribution: zulu
- name: 'Install dependencies'
if: steps.should_run.outputs.run_ci_job == 'true'
run: cd mobile && ./ci/mac_ci_setup.sh --android
- uses: nick-fields/retry@943e742917ac94714d2f408a0e8320f2d1fcafcd
if: steps.should_run.outputs.run_ci_job == 'true'
name: 'Start emulator'
with:
timeout_minutes: 6
max_attempts: 3
command: cd mobile && ./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'
if: steps.should_run.outputs.run_ci_job == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd mobile && ./bazelw build \
$([ -z $GITHUB_TOKEN ] || echo "--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'
if: steps.should_run.outputs.run_ci_job == 'true'
run: adb logcat -e "received headers with status 200" -m 1
kotlinbaselineapp:
if: github.repository == 'envoyproxy/envoy'
name: kotlin_baseline_app
needs: androidbuild
runs-on: macos-12
timeout-minutes: 50
steps:
- uses: actions/checkout@v1
- id: should_run
name: 'Check whether to run'
run: ./mobile/tools/should_run_ci.sh
- uses: actions/setup-java@c3ac5dd0ed8db40fedb61c32fbe677e6b355e94c
if: steps.should_run.outputs.run_ci_job == 'true'
with:
java-version: '8'
java-package: jdk
architecture: x64
distribution: zulu
- name: 'Install dependencies'
if: steps.should_run.outputs.run_ci_job == 'true'
run: cd mobile && ./ci/mac_ci_setup.sh --android
- uses: nick-fields/retry@943e742917ac94714d2f408a0e8320f2d1fcafcd
if: steps.should_run.outputs.run_ci_job == 'true'
name: 'Start emulator'
with:
timeout_minutes: 6
max_attempts: 3
command: cd mobile && ./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'
if: steps.should_run.outputs.run_ci_job == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd mobile && ./bazelw build \
$([ -z $GITHUB_TOKEN ] || echo "--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'
if: steps.should_run.outputs.run_ci_job == 'true'
run: adb logcat -e "received headers with status 301" -m 1
kotlinexperimentalapp:
if: github.repository == 'envoyproxy/envoy'
name: kotlin_experimental_app
needs: androidbuild
runs-on: macos-12
timeout-minutes: 50
steps:
- uses: actions/checkout@v1
- id: should_run
name: 'Check whether to run'
run: ./mobile/tools/should_run_ci.sh
- uses: actions/setup-java@c3ac5dd0ed8db40fedb61c32fbe677e6b355e94c
if: steps.should_run.outputs.run_ci_job == 'true'
with:
java-version: '8'
java-package: jdk
architecture: x64
distribution: zulu
- name: 'Install dependencies'
if: steps.should_run.outputs.run_ci_job == 'true'
run: cd mobile && ./ci/mac_ci_setup.sh --android
- uses: nick-fields/retry@943e742917ac94714d2f408a0e8320f2d1fcafcd
if: steps.should_run.outputs.run_ci_job == 'true'
name: 'Start emulator'
with:
timeout_minutes: 6
max_attempts: 3
command: cd mobile && ./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'
if: steps.should_run.outputs.run_ci_job == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
cd mobile && ./bazelw build \
$([ -z $GITHUB_TOKEN ] || echo "--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'
if: steps.should_run.outputs.run_ci_job == 'true'
run: adb logcat -e "received headers with status 200" -m 1