Skip to content

Commit 5a1d37b

Browse files
Upload full logs on CI failure (#42)
* Upload full logs on CI failure * Use a unique artifact name and set retention period
1 parent 6e127fd commit 5a1d37b

2 files changed

Lines changed: 16 additions & 1 deletion

File tree

.config.ci

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
CONFIG_ALL=n
22
CONFIG_AUTOREMOVE=n
33
CONFIG_AUTOREBUILD=n
4+
CONFIG_BUILD_LOG=y
45
CONFIG_MBEDTLS_CCM_C=y
56
CONFIG_PACKAGE_matter-netman-mbedtls=m
67
CONFIG_PACKAGE_matter-netman-openssl=m

.github/workflows/build-packages.yaml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,19 @@ jobs:
1111
- name: Checkout
1212
uses: actions/checkout@v3
1313

14+
- name: Prepare log directory
15+
run: |
16+
mkdir -p ${{ runner.temp }}/logs
17+
chmod 0777 ${{ runner.temp }}/logs
18+
1419
# Run only the build step in the container rather than the whole job, because the UID of the
1520
# buildbot user (1000) that owns the OpenWrt SDK files in /builder doesn't match the UID of
1621
# the GitHub runner user (1001), causing file system permission issues.
1722
- name: Build
1823
uses: addnab/docker-run-action@v3
1924
with:
2025
image: ghcr.io/project-chip/matter-openwrt-build:25.12.4
21-
options: --volume ${{ github.workspace }}:/workspace
26+
options: --volume ${{ github.workspace }}:/workspace --volume ${{ runner.temp }}/logs:/builder/logs
2227
shell: bash
2328
run: |
2429
set -x
@@ -40,3 +45,12 @@ jobs:
4045
echo "ERROR: Some packages failed to build: ${failed[*]}"
4146
exit 2
4247
fi
48+
49+
- name: Upload build logs
50+
if: failure()
51+
uses: actions/upload-artifact@v7
52+
with:
53+
name: build-logs-${{ github.run_id }}-${{ github.run_attempt }}
54+
path: ${{ runner.temp }}/logs
55+
if-no-files-found: ignore
56+
retention-days: 14

0 commit comments

Comments
 (0)