diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 69070cea41..78ee985dd6 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -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 }} diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 4f87aac1c5..0999967abf 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -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'] - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: idf stuff - run: | - rm -rf connectedhomeip/connectedhomeip - ln -s $CHIP_PATH connectedhomeip - mkdir -p images + if: ${{ github.event.workflow_run.conclusion == 'success' }} + steps: + - 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 diff --git a/docs/en/developing.rst b/docs/en/developing.rst index 2e3357aab0..055175480b 100644 --- a/docs/en/developing.rst +++ b/docs/en/developing.rst @@ -54,6 +54,7 @@ For using VSCode for developement, please check `Developing in WSL