Skip to content

Add the python3/host package to the SDK docker image #106

Add the python3/host package to the SDK docker image

Add the python3/host package to the SDK docker image #106

Workflow file for this run

name: build matter packages
on:
pull_request:
push:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Prepare log directory
run: |
mkdir -p ${{ runner.temp }}/logs
chmod 0777 ${{ runner.temp }}/logs
# Run only the build step in the container rather than the whole job, because the UID of the
# buildbot user (1000) that owns the OpenWrt SDK files in /builder doesn't match the UID of
# the GitHub runner user (1001), causing file system permission issues.
- name: Build
uses: addnab/docker-run-action@v3
with:
image: ghcr.io/project-chip/matter-openwrt-build:25.12.4
options: --volume ${{ github.workspace }}:/workspace --volume ${{ runner.temp }}/logs:/builder/logs
shell: bash
run: |
set -x
echo "src-link --force matter /workspace" >>feeds.conf
./scripts/feeds update matter
./scripts/feeds install -a -p matter
cat feeds/matter/.config.ci >.config
make defconfig
failed=()
for pkg in $(awk -F '[[:space:]]|/' '/^Source-Makefile:/{print$(NF-1)}' feeds/matter.index); do
echo "::group::Building $pkg"
if ! make -j "$(nproc)" "package/$pkg/compile"; then
failed+=("$pkg")
make "package/$pkg/compile" V=s || true # re-run with verbose output
fi
echo "::endgroup::"
done
if [[ "${#failed[@]}" -gt 0 ]]; then
echo "ERROR: Some packages failed to build: ${failed[*]}"
exit 2
fi
- name: Upload build logs
if: failure()
uses: actions/upload-artifact@v7
with:
name: build-logs-${{ github.run_id }}-${{ github.run_attempt }}
path: ${{ runner.temp }}/logs
if-no-files-found: ignore
retention-days: 14