From 64d335cadea695b2d04bb7d623a8ac8ae90376f2 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 8 Sep 2022 11:34:55 -0400 Subject: [PATCH 1/5] Split out android builds to not use as much space during building --- .github/workflows/full-android.yaml | 30 +++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/.github/workflows/full-android.yaml b/.github/workflows/full-android.yaml index 8a327d99066275..fd30df8da86fd1 100644 --- a/.github/workflows/full-android.yaml +++ b/.github/workflows/full-android.yaml @@ -61,16 +61,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 \ From f53385ab0451eef140d9aea797555208e285a817 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 8 Sep 2022 11:36:43 -0400 Subject: [PATCH 2/5] Ensure we can test android builds with act --- .github/workflows/full-android.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/full-android.yaml b/.github/workflows/full-android.yaml index fd30df8da86fd1..225ea13cf229c6 100644 --- a/.github/workflows/full-android.yaml +++ b/.github/workflows/full-android.yaml @@ -40,6 +40,7 @@ jobs: steps: - uses: Wandalen/wretry.action@v1.0.15 + if: ${{ !env.ACT }} name: Checkout with: action: actions/checkout@v3 @@ -48,6 +49,12 @@ jobs: token: ${{ github.token }} attempt_limit: 3 attempt_delay: 2000 + - uses: actions/checkout@v3 + if: ${{ env.ACT }} + name: Checkout (ACT for local build) + with: + submodules: true + token: ${{ github.token }} - name: Checkout submodules run: scripts/checkout_submodules.py --shallow --platform android - name: Bootstrap From c60b91cd81a113561f7db287a340629e068816b6 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 8 Sep 2022 11:39:17 -0400 Subject: [PATCH 3/5] Since we use checkout_submodules, submodules are not needed on the other checkout --- .github/workflows/full-android.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/full-android.yaml b/.github/workflows/full-android.yaml index 225ea13cf229c6..535383974866e1 100644 --- a/.github/workflows/full-android.yaml +++ b/.github/workflows/full-android.yaml @@ -45,16 +45,12 @@ jobs: with: action: actions/checkout@v3 with: | - submodules: true token: ${{ github.token }} attempt_limit: 3 attempt_delay: 2000 - uses: actions/checkout@v3 if: ${{ env.ACT }} name: Checkout (ACT for local build) - with: - submodules: true - token: ${{ github.token }} - name: Checkout submodules run: scripts/checkout_submodules.py --shallow --platform android - name: Bootstrap From 4dd14d344cbadcdf174d5e9f6c6d77bd25bee7f8 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 8 Sep 2022 12:12:07 -0400 Subject: [PATCH 4/5] Add some documentation on using act to test --- .github/workflows/full-android.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/full-android.yaml b/.github/workflows/full-android.yaml index 535383974866e1..fcf4fc0a14619a 100644 --- a/.github/workflows/full-android.yaml +++ b/.github/workflows/full-android.yaml @@ -48,6 +48,12 @@ jobs: 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) From 1b6f5ad29aea45ad84b9d0beb6af359a904c6046 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 8 Sep 2022 12:12:32 -0400 Subject: [PATCH 5/5] Fix ENOBUFS being undefined when compiling tv-casting-app on arm --- src/messaging/ReliableMessageMgr.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/messaging/ReliableMessageMgr.cpp b/src/messaging/ReliableMessageMgr.cpp index b870e6becc2287..e745e54d46665e 100644 --- a/src/messaging/ReliableMessageMgr.cpp +++ b/src/messaging/ReliableMessageMgr.cpp @@ -21,6 +21,7 @@ * */ +#include #include #include