Skip to content

Commit 6db80df

Browse files
committed
Add .github/workflows/build.yml
1 parent d6f88d3 commit 6db80df

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

.github/workflows/build.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Build Matter Examples
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
branches: ["main"]
8+
schedule:
9+
# Build on Mondays at 9am PST every week
10+
- cron: '0 17 * * 1'
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
container: espressif/esp-matter:latest
16+
17+
steps:
18+
- name: Checkout repo
19+
uses: actions/checkout@v4
20+
21+
- name: Install Swift & CMake
22+
run: |
23+
set -vex
24+
25+
SWIFT_TOOLCHAIN_VERSION=swift-DEVELOPMENT-SNAPSHOT-2024-08-01-a
26+
wget https://download.swift.org/development/ubuntu2204/${SWIFT_TOOLCHAIN_VERSION}/${SWIFT_TOOLCHAIN_VERSION}-ubuntu22.04.tar.gz
27+
tar xzf ${SWIFT_TOOLCHAIN_VERSION}-ubuntu22.04.tar.gz
28+
export PATH="$PATH:`pwd`/${SWIFT_TOOLCHAIN_VERSION}-ubuntu22.04/usr/bin/"
29+
swiftc --version
30+
31+
wget https://github.com/Kitware/CMake/releases/download/v3.30.2/cmake-3.30.2-linux-x86_64.tar.gz
32+
tar xzf cmake-3.30.2-linux-x86_64.tar.gz
33+
export PATH="`pwd`/cmake-3.30.2-linux-x86_64/bin:$PATH"
34+
cmake --version
35+
36+
echo "PATH=$PATH" >> $GITHUB_ENV
37+
38+
- name: Build with idf.py
39+
run: |
40+
pwd
41+
cd /opt/espressif/esp-idf
42+
. ./export.sh
43+
cd -
44+
cd /opt/espressif/esp-matter
45+
. ./export.sh
46+
cd -
47+
cd smart-light/
48+
idf.py set-target esp32c6 &&
49+
idf.py build

smart-light/main/BridgingHeader.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@
3838
//
3939
// connectedhomeip/src/credentials/FabricTable.h:82:69: error: use of undeclared identifier 'strnlen'
4040
extern "C" size_t strnlen(const char *s, size_t maxlen);
41+
// esp-matter/components/esp_matter/esp_matter_client.h:57:26: error: use of undeclared identifier 'strdup'
42+
extern "C" char *strdup(const char *s1);
4143

4244
#include <esp_matter.h>
4345
#include <esp_matter_cluster.h>

0 commit comments

Comments
 (0)