From b5563e75c47c2cb8ab818c88a4e9db59686569d6 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Fri, 9 Sep 2022 10:58:57 -0400 Subject: [PATCH] Fixes android builds (cherrypick from master) (#22513) * Fix Android Tests in CI (#22464) * Enable android CI on push as well * Revert "Enable android CI on push as well" This reverts commit 3bcca58482b07fefedb86aa4becc518c0130f26a. * Add submodule checkout to full android: needed to set secure.directory * Distinct name for full android builds * Place the submodule checkout to the right location * Undo the wandalen retry removal Co-authored-by: Andrei Litvin * Fix android full build in CI (#22486) * Split out android builds to not use as much space during building * Ensure we can test android builds with act * Since we use checkout_submodules, submodules are not needed on the other checkout * Add some documentation on using act to test * Fix ENOBUFS being undefined when compiling tv-casting-app on arm Co-authored-by: Andrei Litvin --- .github/workflows/full-android.yaml | 45 ++++++++++++++++++++++++---- src/messaging/ReliableMessageMgr.cpp | 1 + 2 files changed, 40 insertions(+), 6 deletions(-) diff --git a/.github/workflows/full-android.yaml b/.github/workflows/full-android.yaml index cb5eb7ffa74d1c..55e8af321a76be 100644 --- a/.github/workflows/full-android.yaml +++ b/.github/workflows/full-android.yaml @@ -23,7 +23,7 @@ concurrency: cancel-in-progress: true jobs: - android: + full_android: name: Run timeout-minutes: 75 @@ -40,14 +40,25 @@ jobs: steps: - uses: Wandalen/wretry.action@v1.0.15 + if: ${{ !env.ACT }} name: Checkout with: action: actions/checkout@v3 with: | - submodules: true token: ${{ github.token }} attempt_limit: 3 attempt_delay: 2000 + # To use act like: + # act -j full_android + # + # Note you likely still need to have non submodules setup for the + # local machine, like: + # git submodule deinit --all + - uses: actions/checkout@v3 + if: ${{ env.ACT }} + name: Checkout (ACT for local build) + - name: Checkout submodules + run: scripts/checkout_submodules.py --shallow --platform android - name: Bootstrap timeout-minutes: 10 run: scripts/build/gn_bootstrap.sh @@ -59,16 +70,38 @@ jobs: path: | .environment/gn_out/.ninja_log .environment/pigweed-venv/*.log - - name: Build Android CHIPTool and CHIPTest (ARM) + - name: Build Android arm-chip-tool run: | ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --no-log-timestamps --target-glob 'android-arm-*' build" + "./scripts/build/build_examples.py --no-log-timestamps --target android-arm-chip-tool build" - name: Clean out build output run: rm -rf ./out - - name: Build Android CHIPTool and CHIPTest (ARM64) + - name: Build Android arm-tv-casting-app run: | ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --no-log-timestamps --target-glob 'android-arm64-*' build" + "./scripts/build/build_examples.py --no-log-timestamps --target android-arm-tv-casting-app build" + - name: Clean out build output + run: rm -rf ./out + - name: Build Android arm-tv-server + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py --no-log-timestamps --target android-arm-tv-server build" + - name: Clean out build output + run: rm -rf ./out + - name: Build Android arm64-tv-casting-app + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py --no-log-timestamps --target android-arm64-tv-casting-app build" + - name: Clean out build output + run: rm -rf ./out + - name: Build Android arm64-tv-server + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py --no-log-timestamps --target android-arm64-tv-server build" + - name: Build Android arm64-chip-tool + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py --no-log-timestamps --target android-arm64-chip-tool build" - name: Run Android build rule tests run: | ./scripts/run_in_build_env.sh \ diff --git a/src/messaging/ReliableMessageMgr.cpp b/src/messaging/ReliableMessageMgr.cpp index d37c186d3daf3a..526707d1827592 100644 --- a/src/messaging/ReliableMessageMgr.cpp +++ b/src/messaging/ReliableMessageMgr.cpp @@ -21,6 +21,7 @@ * */ +#include #include #include