Skip to content

Commit f318a5d

Browse files
committedFeb 6, 2025
[nrf noup] workflow: release tools workflow
Updated release tools to build and capture all needed artifacts used for testing. Signed-off-by: Michał Szablowski <michal.szablowski@nordicsemi.no>
1 parent 9dc37b1 commit f318a5d

File tree

1 file changed

+26
-33
lines changed

1 file changed

+26
-33
lines changed
 

‎.github/workflows/release_tools.yaml

+26-33
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
name: Build CHIP Tools
3131
timeout-minutes: 60
3232

33-
runs-on: ubuntu-latest
33+
runs-on: ubuntu-20.04
3434

3535
env:
3636
DEBIAN_FRONTEND: noninteractive
@@ -50,7 +50,7 @@ jobs:
5050
echo 'deb http://ppa.launchpad.net/deadsnakes/ppa/ubuntu focal main' > /etc/apt/sources.list.d/deadsnakes-ubuntu-ppa-focal.list
5151
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BA6932366A755776
5252
apt update
53-
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
53+
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
5454
ln -snf /usr/bin/python3.11 /usr/bin/python
5555
ln -snf /usr/bin/python3.11 /usr/bin/python3
5656
- name: Checkout
@@ -77,13 +77,21 @@ jobs:
7777
run: |
7878
scripts/run_in_build_env.sh "gn gen out/chiptool_x64_debug --args='chip_mdns=\"platform\" chip_crypto=\"mbedtls\" symbol_level=0'"
7979
scripts/run_in_build_env.sh "ninja -C out/chiptool_x64_debug chip-tool"
80-
mv out/chiptool_x64_debug/chip-tool out/chiptool_x64_debug/chip-tool-debug
81-
- name: Build x64 CHIP Tool with debug logs disabled
80+
strip out/chiptool_x64_debug/chip-tool -o /tmp/output_binaries/chip-tool_x64
81+
- name: Build x64 OTA Provider
82+
timeout-minutes: 10
83+
run: |
84+
scripts/run_in_build_env.sh "gn gen out/chipotaprovider_x64 --args='symbol_level=0 chip_crypto=\"mbedtls\"' --root=examples/ota-provider-app/linux"
85+
scripts/run_in_build_env.sh "ninja -C out/chipotaprovider_x64 chip-ota-provider-app"
86+
strip out/chipotaprovider_x64/chip-ota-provider-app -o /tmp/output_binaries/chip-ota-provider-app_x64
87+
- name: Build x64 Python Wheels
8288
timeout-minutes: 10
8389
run: |
84-
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'"
85-
scripts/run_in_build_env.sh "ninja -C out/chiptool_x64_release chip-tool"
86-
mv out/chiptool_x64_release/chip-tool out/chiptool_x64_release/chip-tool-release
90+
scripts/build_python.sh --enable_ble true --chip_detail_logging true --chip_mdns platform
91+
python3 -m zipfile -c /tmp/output_binaries/python_matter_controller.zip \
92+
out/python_lib/controller/python/chip_clusters-0.0-py3-none-any.whl \
93+
out/python_lib/controller/python/chip_core-0.0-cp37-abi3-linux_x86_64.whl \
94+
out/python_lib/obj/scripts/matter_yamltests_distribution._build_wheel/*.whl
8795
- name: Build arm64 CHIP Tool with debug logs enabled
8896
timeout-minutes: 10
8997
run: |
@@ -96,32 +104,7 @@ jobs:
96104
symbol_level=0
97105
chip_crypto=\"mbedtls\"'"
98106
scripts/run_in_build_env.sh "ninja -C out/chiptool_arm64_debug chip-tool"
99-
mv out/chiptool_arm64_debug/chip-tool out/chiptool_arm64_debug/chip-tool-debug
100-
- name: Build arm64 CHIP Tool with debug logs disabled
101-
timeout-minutes: 10
102-
run: |
103-
scripts/run_in_build_env.sh "gn gen out/chiptool_arm64_release --args='chip_mdns=\"platform\"
104-
chip_detail_logging=false
105-
custom_toolchain=\"//build/toolchain/custom\"
106-
target_cc=\"aarch64-linux-gnu-gcc\"
107-
target_cxx=\"aarch64-linux-gnu-g++\"
108-
target_ar=\"aarch64-linux-gnu-ar\"
109-
target_cpu=\"arm64\"
110-
symbol_level=0
111-
chip_crypto=\"mbedtls\"'"
112-
scripts/run_in_build_env.sh "ninja -C out/chiptool_arm64_release chip-tool"
113-
mv out/chiptool_arm64_release/chip-tool out/chiptool_arm64_release/chip-tool-release
114-
- name: Build x64 OTA Provider
115-
timeout-minutes: 10
116-
run: |
117-
scripts/run_in_build_env.sh "gn gen out/chipotaprovider_x64 --args='symbol_level=0 chip_crypto=\"mbedtls\"' --root=examples/ota-provider-app/linux"
118-
scripts/run_in_build_env.sh "ninja -C out/chipotaprovider_x64 chip-ota-provider-app"
119-
mv out/chipotaprovider_x64/chip-ota-provider-app /tmp/output_binaries/chip-ota-provider-app-linux_x64
120-
- name: Create zip files for CHIP Tool debug and release packages
121-
timeout-minutes: 10
122-
run: |
123-
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
124-
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
107+
strip out/chiptool_arm64_debug/chip-tool -o /tmp/output_binaries/chip-tool_arm64
125108
- name: Upload release packages
126109
uses: softprops/action-gh-release@v1
127110
if: github.event.inputs.publishRelease == 'true'
@@ -131,3 +114,13 @@ jobs:
131114
tag_name: "${{ github.event.inputs.commit }}"
132115
env:
133116
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
117+
- name: Upload packages
118+
uses: actions/upload-artifact@v4
119+
if: github.event.inputs.publishRelease == 'false'
120+
with:
121+
path: /tmp/output_binaries
122+
name: "test-${{ github.event.inputs.commit }}"
123+
if-no-files-found: error
124+
overwrite: true
125+
env:
126+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)