From c40c984df46dee1e0f7e9901ee7a026802652914 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Szablowski?= Date: Wed, 29 Jan 2025 15:27:56 +0100 Subject: [PATCH] [nrf noup] workflow: release tools workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Updated release tools to build and capture all needed artifacts used for testing. Signed-off-by: MichaƂ Szablowski --- .github/workflows/release_tools.yaml | 65 ++++++++++++++-------------- 1 file changed, 32 insertions(+), 33 deletions(-) diff --git a/.github/workflows/release_tools.yaml b/.github/workflows/release_tools.yaml index 639dfe3002..b69a5e9f24 100644 --- a/.github/workflows/release_tools.yaml +++ b/.github/workflows/release_tools.yaml @@ -30,7 +30,7 @@ jobs: name: Build CHIP Tools timeout-minutes: 60 - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 env: DEBIAN_FRONTEND: noninteractive @@ -50,7 +50,7 @@ jobs: echo 'deb http://ppa.launchpad.net/deadsnakes/ppa/ubuntu focal main' > /etc/apt/sources.list.d/deadsnakes-ubuntu-ppa-focal.list apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BA6932366A755776 apt update - apt install -y --no-install-recommends python3.11 python3.11-dev python3.11-venv g++ git libffi-dev libglib2.0-dev-bin libghc-gio-dev zlib1g-dev libavahi-client-dev libavahi-common-dev libgirepository-1.0-1 + apt install -y --no-install-recommends python3.11 python3.11-dev python3.11-venv g++ git libffi-dev libglib2.0-dev-bin libghc-gio-dev zlib1g-dev libavahi-client-dev libavahi-common-dev libgirepository-1.0-1 libssl-dev ln -snf /usr/bin/python3.11 /usr/bin/python ln -snf /usr/bin/python3.11 /usr/bin/python3 - name: Checkout @@ -77,13 +77,27 @@ jobs: run: | scripts/run_in_build_env.sh "gn gen out/chiptool_x64_debug --args='chip_mdns=\"platform\" chip_crypto=\"mbedtls\" symbol_level=0'" scripts/run_in_build_env.sh "ninja -C out/chiptool_x64_debug chip-tool" - mv out/chiptool_x64_debug/chip-tool out/chiptool_x64_debug/chip-tool-debug - - name: Build x64 CHIP Tool with debug logs disabled + mv out/chiptool_x64_debug/chip-tool /tmp/output_binaries/chip-tool_x64 + - name: Build x64 OTA Provider + timeout-minutes: 10 + run: | + scripts/run_in_build_env.sh "gn gen out/chipotaprovider_x64 --args='symbol_level=0 chip_crypto=\"mbedtls\"' --root=examples/ota-provider-app/linux" + scripts/run_in_build_env.sh "ninja -C out/chipotaprovider_x64 chip-ota-provider-app" + mv out/chipotaprovider_x64/chip-ota-provider-app /tmp/output_binaries/chip-ota-provider-app_x64 + - name: Build x64 Chip Cert + timeout-minutes: 10 + run: | + scripts/run_in_build_env.sh "gn gen out/chipcert_x64" + scripts/run_in_build_env.sh "ninja -C out/chipcert_x64 chip-cert" + mv out/chipcert_x64/chip-cert /tmp/output_binaries/chip-cert_x64 + - name: Build x64 Python Wheels timeout-minutes: 10 run: | - scripts/run_in_build_env.sh "gn gen out/chiptool_x64_release --args='chip_mdns=\"platform\" chip_detail_logging=false chip_crypto=\"mbedtls\" symbol_level=0'" - scripts/run_in_build_env.sh "ninja -C out/chiptool_x64_release chip-tool" - mv out/chiptool_x64_release/chip-tool out/chiptool_x64_release/chip-tool-release + scripts/build_python.sh --enable_ble true --chip_detail_logging true --chip_mdns platform + python3 -m zipfile -c /tmp/output_binaries/python_matter_controller.zip \ + out/python_lib/controller/python/chip_clusters-0.0-py3-none-any.whl \ + out/python_lib/controller/python/chip_core-0.0-cp37-abi3-linux_x86_64.whl \ + out/python_lib/obj/scripts/matter_yamltests_distribution._build_wheel/*.whl - name: Build arm64 CHIP Tool with debug logs enabled timeout-minutes: 10 run: | @@ -96,32 +110,7 @@ jobs: symbol_level=0 chip_crypto=\"mbedtls\"'" scripts/run_in_build_env.sh "ninja -C out/chiptool_arm64_debug chip-tool" - mv out/chiptool_arm64_debug/chip-tool out/chiptool_arm64_debug/chip-tool-debug - - name: Build arm64 CHIP Tool with debug logs disabled - timeout-minutes: 10 - run: | - scripts/run_in_build_env.sh "gn gen out/chiptool_arm64_release --args='chip_mdns=\"platform\" - chip_detail_logging=false - custom_toolchain=\"//build/toolchain/custom\" - target_cc=\"aarch64-linux-gnu-gcc\" - target_cxx=\"aarch64-linux-gnu-g++\" - target_ar=\"aarch64-linux-gnu-ar\" - target_cpu=\"arm64\" - symbol_level=0 - chip_crypto=\"mbedtls\"'" - scripts/run_in_build_env.sh "ninja -C out/chiptool_arm64_release chip-tool" - mv out/chiptool_arm64_release/chip-tool out/chiptool_arm64_release/chip-tool-release - - name: Build x64 OTA Provider - timeout-minutes: 10 - run: | - scripts/run_in_build_env.sh "gn gen out/chipotaprovider_x64 --args='symbol_level=0 chip_crypto=\"mbedtls\"' --root=examples/ota-provider-app/linux" - scripts/run_in_build_env.sh "ninja -C out/chipotaprovider_x64 chip-ota-provider-app" - mv out/chipotaprovider_x64/chip-ota-provider-app /tmp/output_binaries/chip-ota-provider-app-linux_x64 - - name: Create zip files for CHIP Tool debug and release packages - timeout-minutes: 10 - run: | - python3 -m zipfile -c /tmp/output_binaries/chip-tool-linux_x64.zip out/chiptool_x64_debug/chip-tool-debug out/chiptool_x64_release/chip-tool-release - python3 -m zipfile -c /tmp/output_binaries/chip-tool-linux_aarch64.zip out/chiptool_arm64_debug/chip-tool-debug out/chiptool_arm64_release/chip-tool-release + mv out/chiptool_arm64_debug/chip-tool /tmp/output_binaries/chip-tool_arm64 - name: Upload release packages uses: softprops/action-gh-release@v1 if: github.event.inputs.publishRelease == 'true' @@ -131,3 +120,13 @@ jobs: tag_name: "${{ github.event.inputs.commit }}" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Upload packages + uses: actions/upload-artifact@v4 + if: github.event.inputs.publishRelease == 'false' + with: + path: /tmp/output_binaries + name: "test-${{ github.event.inputs.commit }}" + if-no-files-found: error + overwrite: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}