Skip to content

Commit

Permalink
[nrf noup] workflow: release tools workflow
Browse files Browse the repository at this point in the history
Updated release tools to build and capture all needed artifacts
used for testing.

Signed-off-by: Michał Szablowski <[email protected]>
  • Loading branch information
doublemis1 committed Feb 6, 2025
1 parent 9dc37b1 commit f318a5d
Showing 1 changed file with 26 additions and 33 deletions.
59 changes: 26 additions & 33 deletions .github/workflows/release_tools.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -77,13 +77,21 @@ 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
strip out/chiptool_x64_debug/chip-tool -o /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"
strip out/chipotaprovider_x64/chip-ota-provider-app -o /tmp/output_binaries/chip-ota-provider-app_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: |
Expand All @@ -96,32 +104,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
strip out/chiptool_arm64_debug/chip-tool -o /tmp/output_binaries/chip-tool_arm64
- name: Upload release packages
uses: softprops/action-gh-release@v1
if: github.event.inputs.publishRelease == 'true'
Expand All @@ -131,3 +114,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 }}

0 comments on commit f318a5d

Please sign in to comment.