mirror of
https://github.com/espressif/esp-matter.git
synced 2026-04-27 19:13:13 +00:00
ESP Matter Developement docker image with IDF v4.4.3
Once docker image is ready, trigger the pages workflow to deploy built binaries to launchpad.
This commit is contained in:
@@ -16,19 +16,17 @@ name: Docker Image CI
|
||||
|
||||
on:
|
||||
push:
|
||||
# Runs when chip-builds file changes
|
||||
branches: [ "main" ]
|
||||
paths:
|
||||
- "tools/docker/chip-builds"
|
||||
|
||||
# Can be run manually
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
# Platforms to build the image for
|
||||
BUILD_PLATFORMS: linux/amd64,linux/arm64
|
||||
# Github runner is running out of space when we are building for multiple architectures in single runner
|
||||
BUILD_PLATFORMS: linux/amd64
|
||||
DOCKERHUB_REPO: ${{ github.repository }}
|
||||
TAG_NAME: chip
|
||||
TAG_NAME: latest
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -55,7 +53,7 @@ jobs:
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: tools/docker
|
||||
file: tools/docker/chip-builds
|
||||
file: tools/docker/matter-builds
|
||||
push: true
|
||||
tags: ${{ env.DOCKERHUB_REPO }}:${{ env.TAG_NAME }}
|
||||
platforms: ${{ env.BUILD_PLATFORMS }}
|
||||
|
||||
+14
-24
@@ -18,8 +18,9 @@
|
||||
name: Build and Deploy example bins to github pages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["main"]
|
||||
workflow_run:
|
||||
workflows: ["Docker Image CI"]
|
||||
types: [completed]
|
||||
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
@@ -36,46 +37,38 @@ concurrency:
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
|
||||
Build:
|
||||
# Disable the job in forks
|
||||
if: ${{ github.repository_owner == 'espressif' }}
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: espressif/esp-matter:chip
|
||||
image: espressif/esp-matter:latest
|
||||
strategy:
|
||||
matrix:
|
||||
build-dir: ['examples/light', 'examples/light_switch']
|
||||
targets: ['esp32', 'esp32c3']
|
||||
|
||||
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: idf stuff
|
||||
run: |
|
||||
rm -rf connectedhomeip/connectedhomeip
|
||||
ln -s $CHIP_PATH connectedhomeip
|
||||
mkdir -p images
|
||||
|
||||
- run: mkdir -p images
|
||||
- name: build application
|
||||
run: |
|
||||
export ESP_MATTER_PATH=$PWD
|
||||
. $IDF_PATH/export.sh
|
||||
. $ESP_MATTER_PATH/export.sh
|
||||
cd ${{matrix.build-dir}}
|
||||
cd $ESP_MATTER_PATH/${{matrix.build-dir}}
|
||||
idf.py set-target ${{matrix.targets}} build
|
||||
cd build
|
||||
TARGET_CHIP=`cat project_description.json | python3 -c 'import sys,json; print(json.load(sys.stdin)["target"])'`
|
||||
APP_BIN=`cat project_description.json | python3 -c 'import sys,json; print(json.load(sys.stdin)["app_bin"])'`
|
||||
esptool.py --chip $TARGET_CHIP merge_bin -o "$ESP_MATTER_PATH/images/$TARGET_CHIP"_"$APP_BIN" `cat flash_args | tr '\n' '\ '`
|
||||
esptool.py --chip $TARGET_CHIP merge_bin -o "$GITHUB_WORKSPACE/images/$TARGET_CHIP"_"$APP_BIN" `cat flash_args | tr '\n' '\ '`
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: build-images
|
||||
path: 'images/'
|
||||
path: images/
|
||||
|
||||
deploy:
|
||||
# Disable the job in forks
|
||||
@@ -88,12 +81,9 @@ jobs:
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: espressif/esp-matter:chip
|
||||
image: espressif/esp-matter:latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Download builds
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
@@ -102,9 +92,9 @@ jobs:
|
||||
|
||||
- name: generate launchpad config
|
||||
run: |
|
||||
cd images
|
||||
cd images/
|
||||
ls
|
||||
../tools/launchpad/generate_launchpad_config.sh
|
||||
$ESP_MATTER_PATH/tools/launchpad/generate_launchpad_config.sh
|
||||
|
||||
- name: Setup Pages
|
||||
uses: actions/configure-pages@v2
|
||||
@@ -112,7 +102,7 @@ jobs:
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v1
|
||||
with:
|
||||
path: 'images/'
|
||||
path: images/
|
||||
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
|
||||
Reference in New Issue
Block a user