Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[nrf noup] workflow: release tools workflow #541

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 36 additions & 35 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 @@ -45,12 +45,13 @@ jobs:
- name: Install dependencies
timeout-minutes: 10
run: |
export CODENAME=$(cat /etc/os-release | grep UBUNTU_CODENAME | cut -d= -f2)
apt update
apt install -y --no-install-recommends gnupg ca-certificates
echo 'deb http://ppa.launchpad.net/deadsnakes/ppa/ubuntu focal main' > /etc/apt/sources.list.d/deadsnakes-ubuntu-ppa-focal.list
echo "deb http://ppa.launchpad.net/deadsnakes/ppa/ubuntu ${CODENAME} main" > /etc/apt/sources.list.d/deadsnakes-ubuntu-ppa-${CODENAME}.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 binutils-aarch64-linux-gnu
ln -snf /usr/bin/python3.11 /usr/bin/python
ln -snf /usr/bin/python3.11 /usr/bin/python3
- name: Checkout
Expand All @@ -75,15 +76,29 @@ jobs:
- name: Build x64 CHIP Tool with debug logs enabled
timeout-minutes: 10
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 "gn gen out/chiptool_x64_debug --args='chip_mdns=\"platform\" chip_crypto=\"mbedtls\" symbol_level=0 is_debug=false'"
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 is_debug=false 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 Chip Cert
timeout-minutes: 10
run: |
scripts/run_in_build_env.sh "gn gen out/chipcert_x64 --args='symbol_level=0 is_debug=false chip_crypto=\"boringssl\"'"
scripts/run_in_build_env.sh "ninja -C out/chipcert_x64 chip-cert"
strip out/chipcert_x64/chip-cert -o /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: |
Expand All @@ -94,34 +109,10 @@ jobs:
target_ar=\"aarch64-linux-gnu-ar\"
target_cpu=\"arm64\"
symbol_level=0
is_debug=false
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
aarch64-linux-gnu-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 +122,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 }}
2 changes: 1 addition & 1 deletion scripts/build_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ export SYSTEM_VERSION_COMPAT=0
# Make all possible human redable tracing available.
tracing_options="matter_log_json_payload_hex=true matter_log_json_payload_decode_full=true matter_enable_tracing_support=true"

gn --root="$CHIP_ROOT" gen "$OUTPUT_ROOT" --args="$tracing_options chip_detail_logging=$chip_detail_logging chip_project_config_include_dirs=[\"//config/python\"] $chip_mdns_arg $chip_case_retry_arg $pregen_dir_arg chip_config_network_layer_ble=$enable_ble chip_enable_ble=$enable_ble chip_crypto=\"boringssl\""
gn --root="$CHIP_ROOT" gen "$OUTPUT_ROOT" --args="$tracing_options chip_detail_logging=$chip_detail_logging chip_project_config_include_dirs=[\"//config/python\"] $chip_mdns_arg $chip_case_retry_arg $pregen_dir_arg chip_config_network_layer_ble=$enable_ble chip_enable_ble=$enable_ble chip_crypto=\"boringssl\" symbol_level=0 is_debug=false"

function ninja_target() {
# Print the ninja target required to build a gn label.
Expand Down
Loading