Skip to content

Commit

Permalink
mobile/ci: Fix iOS build failures (#31756)
Browse files Browse the repository at this point in the history
mobile/ci: Fix iOS_build failures

The error:

```
ERROR: /Users/runner/work/envoy/envoy/mobile/WORKSPACE:98:18: fetching android_sdk_repository rule //external:androidsdk: Android SDK api level 30 was requested but it is not installed in the Android SDK at /Users/runner/Library/Android/sdk. The api levels found were [34, 33, 32, 31]. Please choose an available api level or install api level 30 from the Android SDK Manager.
```

This PR is a workaround to install Android SDK 30 even though it's not
used for building iOS apps, that's because mobile/WORKSPACE expects the
Android SDK 30 to be available and GitHub Runner image no longer
includes Android SDK 30. See actions/runner-images#8952.
Passing `--android` in the `./ci/mac_ci_setup.sh` will install the Android SDK 30.

Signed-off-by: Fredy Wijaya <fredyw@google.com>
  • Loading branch information
fredyw committed Jan 11, 2024
1 parent 5b7bbef commit f37ef3f
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 7 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/envoy-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ jobs:
- target: ci/mac_ci_steps.sh
name: macOS
steps-pre: |
- run: ./ci/mac_ci_setup.sh
# TODO(fredyw): A workaround since mobile/WORKSPACE requires Android SDK to be available
# and the GitHub Action runner image no longer includes Android SDK 30:
# https://github.com/actions/runner-images/issues/8952
- run: ./ci/mac_ci_setup.sh --android
shell: bash
name: Setup macos
source: |
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/mobile-compile_time_options.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,10 @@ jobs:
--config=mobile-remote-ci-macos-swift
//library/swift:ios_framework
source: |
./ci/mac_ci_setup.sh
# TODO(fredyw): A workaround since mobile/WORKSPACE requires Android SDK to be available
# and the GitHub Action runner image no longer includes Android SDK 30:
# https://github.com/actions/runner-images/issues/8952
./ci/mac_ci_setup.sh --android
./bazelw shutdown
request:
Expand Down
15 changes: 12 additions & 3 deletions .github/workflows/mobile-ios_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ jobs:
request: ${{ needs.load.outputs.request }}
runs-on: macos-12
source: |
./ci/mac_ci_setup.sh
# TODO(fredyw): A workaround since mobile/WORKSPACE requires Android SDK to be available
# and the GitHub Action runner image no longer includes Android SDK 30:
# https://github.com/actions/runner-images/issues/8952
./ci/mac_ci_setup.sh --android
./bazelw shutdown
steps-post: ${{ matrix.steps-post }}
target: ${{ matrix.target }}
Expand Down Expand Up @@ -83,7 +86,10 @@ jobs:
request: ${{ needs.load.outputs.request }}
runs-on: macos-12
source: |
./ci/mac_ci_setup.sh
# TODO(fredyw): A workaround since mobile/WORKSPACE requires Android SDK to be available
# and the GitHub Action runner image no longer includes Android SDK 30:
# https://github.com/actions/runner-images/issues/8952
./ci/mac_ci_setup.sh --android
./bazelw shutdown
steps-post: |
- uses: envoyproxy/toolshed/gh-actions/envoy/ios/post@2b4b266dbf6e410f2e8a05abf0dcd8ad13e6ecac # actions-v0.2.23
Expand Down Expand Up @@ -125,7 +131,10 @@ jobs:
request: ${{ needs.load.outputs.request }}
runs-on: macos-12
source: |
./ci/mac_ci_setup.sh
# TODO(fredyw): A workaround since mobile/WORKSPACE requires Android SDK to be available
# and the GitHub Action runner image no longer includes Android SDK 30:
# https://github.com/actions/runner-images/issues/8952
./ci/mac_ci_setup.sh --android
steps-post: |
- uses: envoyproxy/toolshed/gh-actions/envoy/ios/post@2b4b266dbf6e410f2e8a05abf0dcd8ad13e6ecac # actions-v0.2.23
with:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/mobile-ios_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ jobs:
request: ${{ needs.load.outputs.request }}
runs-on: macos-12
source: |
./ci/mac_ci_setup.sh
# TODO(fredyw): A workaround since mobile/WORKSPACE requires Android SDK to be available
# and the GitHub Action runner image no longer includes Android SDK 30:
# https://github.com/actions/runner-images/issues/8952
./ci/mac_ci_setup.sh --android
steps-post: ${{ matrix.steps-post }}
target: ${{ matrix.target }}
timeout-minutes: ${{ matrix.timeout-minutes }}
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/mobile-release_validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ jobs:
request: ${{ needs.load.outputs.request }}
runs-on: macos-12
source: |
./ci/mac_ci_setup.sh
# TODO(fredyw): A workaround since mobile/WORKSPACE always requires Android SDK to be available
# and the GitHub Action runner image no longer includes Android SDK 30:
# https://github.com/actions/runner-images/issues/8952
./ci/mac_ci_setup.sh --android
# Ignore errors: Bad CRC when unzipping large files: https://bbs.archlinux.org/viewtopic.php?id=153011
steps-post: |
- run: |
Expand Down

0 comments on commit f37ef3f

Please sign in to comment.