From e946d7a1ab6bf450634599df60e0eadb1d3ed0fa Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Fri, 2 Jul 2021 20:46:38 -0700 Subject: [PATCH 01/20] Adding regeneration --- .github/workflows/zap_regenerate_all.yaml | 70 +++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 .github/workflows/zap_regenerate_all.yaml diff --git a/.github/workflows/zap_regenerate_all.yaml b/.github/workflows/zap_regenerate_all.yaml new file mode 100644 index 00000000000000..52134a90ca77fd --- /dev/null +++ b/.github/workflows/zap_regenerate_all.yaml @@ -0,0 +1,70 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: ZAP + +on: + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} + cancel-in-progress: true + +jobs: + zap_templates_regeneration: + name: ZAP templates re-generation + timeout-minutes: 60 + + runs-on: ubuntu-18.04 + if: github.actor != 'restyled-io[bot]' + + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: true + - name: Use Node.js 12.x + uses: actions/setup-node@v1 + with: + node-version: '12.x' + + - run: sudo apt-get update + - run: sudo apt-get install --fix-missing libpixman-1-dev libcairo-dev libsdl-pango-dev libjpeg-dev libgif-dev + - name: Setup ZAP + timeout-minutes: 5 + run: | + cd third_party/zap/repo/ + npm ci + npm run version-stamp + npm rebuild canvas --update-binary + npm run build-spa + - name: Generate all + timeout-minutes: 5 + run: scripts/tools/zap_regen_all.py + - uses: EndBug/add-and-commit@v7 # You can change this to use a specific version + with: + # Determines the way the action fills missing author name and email. Three options are available: + # - github_actor -> UserName + # - user_info -> Your Display Name + # - github_actions -> github-actions + # Default: + default_author: github_actor + + # The message for the commit + # Default: 'Commit from GitHub Actions (name of the workflow)' + message: 'Commited regenerated ZAP code' + + # The flag used on the pull strategy. Use NO-PULL to avoid the action pulling at all. + # Default: '--no-rebase' + pull_strategy: 'NO-PULL or --no-rebase or --no-ff or --rebase' From 2a62b511178a3a4c826bb2d83ccb2797561b994d Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Fri, 2 Jul 2021 20:47:59 -0700 Subject: [PATCH 02/20] Fixing name --- .github/workflows/zap_regenerate_all.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/zap_regenerate_all.yaml b/.github/workflows/zap_regenerate_all.yaml index 52134a90ca77fd..3ca1c9ddbbf7f4 100644 --- a/.github/workflows/zap_regenerate_all.yaml +++ b/.github/workflows/zap_regenerate_all.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: ZAP +name: ZAP Regeneration on: workflow_dispatch: From 8cfcecdba1a7a6ceaac3fa8579e92c61d89a93bf Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Fri, 22 Oct 2021 20:15:58 -0700 Subject: [PATCH 03/20] Update zap_regenerate_all.yaml --- .github/workflows/zap_regenerate_all.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/zap_regenerate_all.yaml b/.github/workflows/zap_regenerate_all.yaml index 3ca1c9ddbbf7f4..a64e2c73903992 100644 --- a/.github/workflows/zap_regenerate_all.yaml +++ b/.github/workflows/zap_regenerate_all.yaml @@ -26,7 +26,7 @@ jobs: name: ZAP templates re-generation timeout-minutes: 60 - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest if: github.actor != 'restyled-io[bot]' steps: From e761fa316d7c4c6395e8a65e573855c0d069272d Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Fri, 22 Oct 2021 21:17:04 -0700 Subject: [PATCH 04/20] Adding regen --- .github/workflows/zap_regeneration.yaml | 77 +++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 .github/workflows/zap_regeneration.yaml diff --git a/.github/workflows/zap_regeneration.yaml b/.github/workflows/zap_regeneration.yaml new file mode 100644 index 00000000000000..b8b3492b12453e --- /dev/null +++ b/.github/workflows/zap_regeneration.yaml @@ -0,0 +1,77 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: ZAP - Regenerate + +on: + push: + pull_request: + workflow_dispatch: + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} + cancel-in-progress: true + +jobs: + zap_regenerate: + name: ZAP - Regenerate + timeout-minutes: 60 + + runs-on: ubuntu-18.04 + if: github.actor != 'restyled-io[bot]' + + # container: + # image: connectedhomeip/chip-build:latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + token: ${{ secrets.APPLE_PERSONAL_ACCESS_TOKEN }} + ref: ${{ github.head_ref }} + submodules: true + - name: Use Node.js 14.x + uses: actions/setup-node@v2 + with: + node-version: '14' + - name: Use Java + uses: actions/setup-java@v2 + with: + distribution: 'zulu' + java-version: '11' + java-package: jre + - run: sudo apt-get update + - run: sudo apt-get install -fy --fix-missing libpixman-1-dev libcairo-dev libsdl-pango-dev libjpeg-dev libgif-dev python-autopep8 + - name: Setup ZAP + timeout-minutes: 5 + run: | + cd third_party/zap/repo/ + npm ci + npm run version-stamp + npm rebuild canvas --update-binary + npm run build-spa + - name: Generate all + timeout-minutes: 5 + run: scripts/tools/zap_regen_all.py + - name: Check for uncommited changes + run: git status + # git diff + # git add . + # git diff-index HEAD -- + # git diff-index --quiet HEAD -- + - name: Commit newly generated changes + uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: Auto-regenerated ZAP Changes + file_pattern: "zzz_generated/* src/darwin/Framework/* src/controller/python/chip/clusters/* src/controller/java/zap-generated/*" + branch: ${{ github.head_ref }} From 6e574f9613c75b3388d5d58c8bf3b72ec54fce9d Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Fri, 22 Oct 2021 21:22:10 -0700 Subject: [PATCH 05/20] Remove old one --- .github/workflows/zap_regenerate_all.yaml | 70 ----------------------- 1 file changed, 70 deletions(-) delete mode 100644 .github/workflows/zap_regenerate_all.yaml diff --git a/.github/workflows/zap_regenerate_all.yaml b/.github/workflows/zap_regenerate_all.yaml deleted file mode 100644 index a64e2c73903992..00000000000000 --- a/.github/workflows/zap_regenerate_all.yaml +++ /dev/null @@ -1,70 +0,0 @@ -# Copyright (c) 2020 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: ZAP Regeneration - -on: - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} - cancel-in-progress: true - -jobs: - zap_templates_regeneration: - name: ZAP templates re-generation - timeout-minutes: 60 - - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - submodules: true - - name: Use Node.js 12.x - uses: actions/setup-node@v1 - with: - node-version: '12.x' - - - run: sudo apt-get update - - run: sudo apt-get install --fix-missing libpixman-1-dev libcairo-dev libsdl-pango-dev libjpeg-dev libgif-dev - - name: Setup ZAP - timeout-minutes: 5 - run: | - cd third_party/zap/repo/ - npm ci - npm run version-stamp - npm rebuild canvas --update-binary - npm run build-spa - - name: Generate all - timeout-minutes: 5 - run: scripts/tools/zap_regen_all.py - - uses: EndBug/add-and-commit@v7 # You can change this to use a specific version - with: - # Determines the way the action fills missing author name and email. Three options are available: - # - github_actor -> UserName - # - user_info -> Your Display Name - # - github_actions -> github-actions - # Default: - default_author: github_actor - - # The message for the commit - # Default: 'Commit from GitHub Actions (name of the workflow)' - message: 'Commited regenerated ZAP code' - - # The flag used on the pull strategy. Use NO-PULL to avoid the action pulling at all. - # Default: '--no-rebase' - pull_strategy: 'NO-PULL or --no-rebase or --no-ff or --rebase' From b5a6594ceaba336df17875a5541609f4e008470c Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Fri, 22 Oct 2021 21:26:01 -0700 Subject: [PATCH 06/20] Remove this token --- .github/workflows/zap_regeneration.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/zap_regeneration.yaml b/.github/workflows/zap_regeneration.yaml index b8b3492b12453e..e9bbf6c38b3080 100644 --- a/.github/workflows/zap_regeneration.yaml +++ b/.github/workflows/zap_regeneration.yaml @@ -37,7 +37,7 @@ jobs: - name: Checkout uses: actions/checkout@v2 with: - token: ${{ secrets.APPLE_PERSONAL_ACCESS_TOKEN }} + # token: ${{ secrets.APPLE_PERSONAL_ACCESS_TOKEN }} ref: ${{ github.head_ref }} submodules: true - name: Use Node.js 14.x From 3326ba33e92919d4912bc0735ef9ecc07585fc71 Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Fri, 22 Oct 2021 21:27:42 -0700 Subject: [PATCH 07/20] Updating --- .github/workflows/zap_regeneration.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/zap_regeneration.yaml b/.github/workflows/zap_regeneration.yaml index e9bbf6c38b3080..185de484bdec73 100644 --- a/.github/workflows/zap_regeneration.yaml +++ b/.github/workflows/zap_regeneration.yaml @@ -38,7 +38,7 @@ jobs: uses: actions/checkout@v2 with: # token: ${{ secrets.APPLE_PERSONAL_ACCESS_TOKEN }} - ref: ${{ github.head_ref }} + # ref: ${{ github.head_ref }} submodules: true - name: Use Node.js 14.x uses: actions/setup-node@v2 @@ -74,4 +74,4 @@ jobs: with: commit_message: Auto-regenerated ZAP Changes file_pattern: "zzz_generated/* src/darwin/Framework/* src/controller/python/chip/clusters/* src/controller/java/zap-generated/*" - branch: ${{ github.head_ref }} + # branch: ${{ github.head_ref }} From 8c3278df310cf74d45fb944bc089e3c737dbb1eb Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Fri, 22 Oct 2021 21:38:30 -0700 Subject: [PATCH 08/20] Trying this one --- .github/workflows/zap_regeneration.yaml | 28 ++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/.github/workflows/zap_regeneration.yaml b/.github/workflows/zap_regeneration.yaml index 185de484bdec73..2da5066539e498 100644 --- a/.github/workflows/zap_regeneration.yaml +++ b/.github/workflows/zap_regeneration.yaml @@ -69,9 +69,27 @@ jobs: # git add . # git diff-index HEAD -- # git diff-index --quiet HEAD -- - - name: Commit newly generated changes - uses: stefanzweifel/git-auto-commit-action@v4 + - name: Add generated paths + run: | + git add zzz_generated/* + git add src/darwin/Framework/* + git add src/controller/python/chip/clusters/* + git add src/controller/java/zap-generated/* + - uses: GuillaumeFalourd/git-commit-push@v1 with: - commit_message: Auto-regenerated ZAP Changes - file_pattern: "zzz_generated/* src/darwin/Framework/* src/controller/python/chip/clusters/* src/controller/java/zap-generated/*" - # branch: ${{ github.head_ref }} + # email: ${{ github.actor }}@users.noreply.github.com + # name: ${{ github.actor }} + commit_message: Adding ZAP Generated Files + # target_branch: target_branch_name + # files: file1 file2 directory1 directory2/file3 + # remote_repository: https://github.com/owner/another_repository + # access_token: ${{ github.token }} + # force: true + # empty: true + # tags: true + # - name: Commit newly generated changes + # uses: stefanzweifel/git-auto-commit-action@v4 + # with: + # commit_message: Auto-regenerated ZAP Changes + # file_pattern: "zzz_generated/* src/darwin/Framework/* src/controller/python/chip/clusters/* src/controller/java/zap-generated/*" + # # branch: ${{ github.head_ref }} From e8c8188218e442e8304022d1ba94a170661d549a Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Fri, 22 Oct 2021 21:50:02 -0700 Subject: [PATCH 09/20] Making this workflow dispatch only --- .github/workflows/zap_regeneration.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/zap_regeneration.yaml b/.github/workflows/zap_regeneration.yaml index 2da5066539e498..37be9a3e373b8d 100644 --- a/.github/workflows/zap_regeneration.yaml +++ b/.github/workflows/zap_regeneration.yaml @@ -15,8 +15,8 @@ name: ZAP - Regenerate on: - push: - pull_request: + # push: + # pull_request: workflow_dispatch: concurrency: From 3a4adb7e44a3f00facc95689e5df082832dcf6d2 Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Fri, 2 Jul 2021 20:46:38 -0700 Subject: [PATCH 10/20] Adding regeneration --- .github/workflows/zap_regenerate_all.yaml | 70 +++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 .github/workflows/zap_regenerate_all.yaml diff --git a/.github/workflows/zap_regenerate_all.yaml b/.github/workflows/zap_regenerate_all.yaml new file mode 100644 index 00000000000000..52134a90ca77fd --- /dev/null +++ b/.github/workflows/zap_regenerate_all.yaml @@ -0,0 +1,70 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: ZAP + +on: + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} + cancel-in-progress: true + +jobs: + zap_templates_regeneration: + name: ZAP templates re-generation + timeout-minutes: 60 + + runs-on: ubuntu-18.04 + if: github.actor != 'restyled-io[bot]' + + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: true + - name: Use Node.js 12.x + uses: actions/setup-node@v1 + with: + node-version: '12.x' + + - run: sudo apt-get update + - run: sudo apt-get install --fix-missing libpixman-1-dev libcairo-dev libsdl-pango-dev libjpeg-dev libgif-dev + - name: Setup ZAP + timeout-minutes: 5 + run: | + cd third_party/zap/repo/ + npm ci + npm run version-stamp + npm rebuild canvas --update-binary + npm run build-spa + - name: Generate all + timeout-minutes: 5 + run: scripts/tools/zap_regen_all.py + - uses: EndBug/add-and-commit@v7 # You can change this to use a specific version + with: + # Determines the way the action fills missing author name and email. Three options are available: + # - github_actor -> UserName + # - user_info -> Your Display Name + # - github_actions -> github-actions + # Default: + default_author: github_actor + + # The message for the commit + # Default: 'Commit from GitHub Actions (name of the workflow)' + message: 'Commited regenerated ZAP code' + + # The flag used on the pull strategy. Use NO-PULL to avoid the action pulling at all. + # Default: '--no-rebase' + pull_strategy: 'NO-PULL or --no-rebase or --no-ff or --rebase' From 05bab90646456bfbe4242506299cb0b203f0c1aa Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Fri, 2 Jul 2021 20:47:59 -0700 Subject: [PATCH 11/20] Fixing name --- .github/workflows/zap_regenerate_all.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/zap_regenerate_all.yaml b/.github/workflows/zap_regenerate_all.yaml index 52134a90ca77fd..3ca1c9ddbbf7f4 100644 --- a/.github/workflows/zap_regenerate_all.yaml +++ b/.github/workflows/zap_regenerate_all.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: ZAP +name: ZAP Regeneration on: workflow_dispatch: From 76c42b9c1155714bade4a61c9e526a3bccbc6cf3 Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Fri, 22 Oct 2021 20:15:58 -0700 Subject: [PATCH 12/20] Update zap_regenerate_all.yaml --- .github/workflows/zap_regenerate_all.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/zap_regenerate_all.yaml b/.github/workflows/zap_regenerate_all.yaml index 3ca1c9ddbbf7f4..a64e2c73903992 100644 --- a/.github/workflows/zap_regenerate_all.yaml +++ b/.github/workflows/zap_regenerate_all.yaml @@ -26,7 +26,7 @@ jobs: name: ZAP templates re-generation timeout-minutes: 60 - runs-on: ubuntu-18.04 + runs-on: ubuntu-latest if: github.actor != 'restyled-io[bot]' steps: From dac63b5fdc799de4996129f49ade489f793c8ac0 Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Fri, 22 Oct 2021 21:17:04 -0700 Subject: [PATCH 13/20] Adding regen --- .github/workflows/zap_regeneration.yaml | 77 +++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 .github/workflows/zap_regeneration.yaml diff --git a/.github/workflows/zap_regeneration.yaml b/.github/workflows/zap_regeneration.yaml new file mode 100644 index 00000000000000..b8b3492b12453e --- /dev/null +++ b/.github/workflows/zap_regeneration.yaml @@ -0,0 +1,77 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: ZAP - Regenerate + +on: + push: + pull_request: + workflow_dispatch: + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} + cancel-in-progress: true + +jobs: + zap_regenerate: + name: ZAP - Regenerate + timeout-minutes: 60 + + runs-on: ubuntu-18.04 + if: github.actor != 'restyled-io[bot]' + + # container: + # image: connectedhomeip/chip-build:latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + token: ${{ secrets.APPLE_PERSONAL_ACCESS_TOKEN }} + ref: ${{ github.head_ref }} + submodules: true + - name: Use Node.js 14.x + uses: actions/setup-node@v2 + with: + node-version: '14' + - name: Use Java + uses: actions/setup-java@v2 + with: + distribution: 'zulu' + java-version: '11' + java-package: jre + - run: sudo apt-get update + - run: sudo apt-get install -fy --fix-missing libpixman-1-dev libcairo-dev libsdl-pango-dev libjpeg-dev libgif-dev python-autopep8 + - name: Setup ZAP + timeout-minutes: 5 + run: | + cd third_party/zap/repo/ + npm ci + npm run version-stamp + npm rebuild canvas --update-binary + npm run build-spa + - name: Generate all + timeout-minutes: 5 + run: scripts/tools/zap_regen_all.py + - name: Check for uncommited changes + run: git status + # git diff + # git add . + # git diff-index HEAD -- + # git diff-index --quiet HEAD -- + - name: Commit newly generated changes + uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: Auto-regenerated ZAP Changes + file_pattern: "zzz_generated/* src/darwin/Framework/* src/controller/python/chip/clusters/* src/controller/java/zap-generated/*" + branch: ${{ github.head_ref }} From 529cc4e68a920e0bf766f88db67fbaed7ef17b66 Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Fri, 22 Oct 2021 21:22:10 -0700 Subject: [PATCH 14/20] Remove old one --- .github/workflows/zap_regenerate_all.yaml | 70 ----------------------- 1 file changed, 70 deletions(-) delete mode 100644 .github/workflows/zap_regenerate_all.yaml diff --git a/.github/workflows/zap_regenerate_all.yaml b/.github/workflows/zap_regenerate_all.yaml deleted file mode 100644 index a64e2c73903992..00000000000000 --- a/.github/workflows/zap_regenerate_all.yaml +++ /dev/null @@ -1,70 +0,0 @@ -# Copyright (c) 2020 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: ZAP Regeneration - -on: - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} - cancel-in-progress: true - -jobs: - zap_templates_regeneration: - name: ZAP templates re-generation - timeout-minutes: 60 - - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - submodules: true - - name: Use Node.js 12.x - uses: actions/setup-node@v1 - with: - node-version: '12.x' - - - run: sudo apt-get update - - run: sudo apt-get install --fix-missing libpixman-1-dev libcairo-dev libsdl-pango-dev libjpeg-dev libgif-dev - - name: Setup ZAP - timeout-minutes: 5 - run: | - cd third_party/zap/repo/ - npm ci - npm run version-stamp - npm rebuild canvas --update-binary - npm run build-spa - - name: Generate all - timeout-minutes: 5 - run: scripts/tools/zap_regen_all.py - - uses: EndBug/add-and-commit@v7 # You can change this to use a specific version - with: - # Determines the way the action fills missing author name and email. Three options are available: - # - github_actor -> UserName - # - user_info -> Your Display Name - # - github_actions -> github-actions - # Default: - default_author: github_actor - - # The message for the commit - # Default: 'Commit from GitHub Actions (name of the workflow)' - message: 'Commited regenerated ZAP code' - - # The flag used on the pull strategy. Use NO-PULL to avoid the action pulling at all. - # Default: '--no-rebase' - pull_strategy: 'NO-PULL or --no-rebase or --no-ff or --rebase' From 4626364ed250649a9a21422645de8ab0be8d50af Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Fri, 22 Oct 2021 21:26:01 -0700 Subject: [PATCH 15/20] Remove this token --- .github/workflows/zap_regeneration.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/zap_regeneration.yaml b/.github/workflows/zap_regeneration.yaml index b8b3492b12453e..e9bbf6c38b3080 100644 --- a/.github/workflows/zap_regeneration.yaml +++ b/.github/workflows/zap_regeneration.yaml @@ -37,7 +37,7 @@ jobs: - name: Checkout uses: actions/checkout@v2 with: - token: ${{ secrets.APPLE_PERSONAL_ACCESS_TOKEN }} + # token: ${{ secrets.APPLE_PERSONAL_ACCESS_TOKEN }} ref: ${{ github.head_ref }} submodules: true - name: Use Node.js 14.x From e40ea66928557fb373995e5da9e3b9d9b0626678 Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Fri, 22 Oct 2021 21:27:42 -0700 Subject: [PATCH 16/20] Updating --- .github/workflows/zap_regeneration.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/zap_regeneration.yaml b/.github/workflows/zap_regeneration.yaml index e9bbf6c38b3080..185de484bdec73 100644 --- a/.github/workflows/zap_regeneration.yaml +++ b/.github/workflows/zap_regeneration.yaml @@ -38,7 +38,7 @@ jobs: uses: actions/checkout@v2 with: # token: ${{ secrets.APPLE_PERSONAL_ACCESS_TOKEN }} - ref: ${{ github.head_ref }} + # ref: ${{ github.head_ref }} submodules: true - name: Use Node.js 14.x uses: actions/setup-node@v2 @@ -74,4 +74,4 @@ jobs: with: commit_message: Auto-regenerated ZAP Changes file_pattern: "zzz_generated/* src/darwin/Framework/* src/controller/python/chip/clusters/* src/controller/java/zap-generated/*" - branch: ${{ github.head_ref }} + # branch: ${{ github.head_ref }} From c4ffb69c3f3df1192d86e8bf8cc4f20ba615a82a Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Fri, 22 Oct 2021 21:38:30 -0700 Subject: [PATCH 17/20] Trying this one --- .github/workflows/zap_regeneration.yaml | 28 ++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/.github/workflows/zap_regeneration.yaml b/.github/workflows/zap_regeneration.yaml index 185de484bdec73..2da5066539e498 100644 --- a/.github/workflows/zap_regeneration.yaml +++ b/.github/workflows/zap_regeneration.yaml @@ -69,9 +69,27 @@ jobs: # git add . # git diff-index HEAD -- # git diff-index --quiet HEAD -- - - name: Commit newly generated changes - uses: stefanzweifel/git-auto-commit-action@v4 + - name: Add generated paths + run: | + git add zzz_generated/* + git add src/darwin/Framework/* + git add src/controller/python/chip/clusters/* + git add src/controller/java/zap-generated/* + - uses: GuillaumeFalourd/git-commit-push@v1 with: - commit_message: Auto-regenerated ZAP Changes - file_pattern: "zzz_generated/* src/darwin/Framework/* src/controller/python/chip/clusters/* src/controller/java/zap-generated/*" - # branch: ${{ github.head_ref }} + # email: ${{ github.actor }}@users.noreply.github.com + # name: ${{ github.actor }} + commit_message: Adding ZAP Generated Files + # target_branch: target_branch_name + # files: file1 file2 directory1 directory2/file3 + # remote_repository: https://github.com/owner/another_repository + # access_token: ${{ github.token }} + # force: true + # empty: true + # tags: true + # - name: Commit newly generated changes + # uses: stefanzweifel/git-auto-commit-action@v4 + # with: + # commit_message: Auto-regenerated ZAP Changes + # file_pattern: "zzz_generated/* src/darwin/Framework/* src/controller/python/chip/clusters/* src/controller/java/zap-generated/*" + # # branch: ${{ github.head_ref }} From 61f08f0db60915d8fbf3ab2a4fcc49cc06e9e88f Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Fri, 22 Oct 2021 21:50:02 -0700 Subject: [PATCH 18/20] Making this workflow dispatch only --- .github/workflows/zap_regeneration.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/zap_regeneration.yaml b/.github/workflows/zap_regeneration.yaml index 2da5066539e498..37be9a3e373b8d 100644 --- a/.github/workflows/zap_regeneration.yaml +++ b/.github/workflows/zap_regeneration.yaml @@ -15,8 +15,8 @@ name: ZAP - Regenerate on: - push: - pull_request: + # push: + # pull_request: workflow_dispatch: concurrency: From 87fb83dc5443db6dd506911539b04216569def6e Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Fri, 22 Oct 2021 21:57:55 -0700 Subject: [PATCH 19/20] Fixing token --- .github/workflows/zap_regeneration.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/zap_regeneration.yaml b/.github/workflows/zap_regeneration.yaml index 37be9a3e373b8d..4f15255b318d93 100644 --- a/.github/workflows/zap_regeneration.yaml +++ b/.github/workflows/zap_regeneration.yaml @@ -83,7 +83,7 @@ jobs: # target_branch: target_branch_name # files: file1 file2 directory1 directory2/file3 # remote_repository: https://github.com/owner/another_repository - # access_token: ${{ github.token }} + access_token: ${{ secrets.APPLE_PERSONAL_ACCESS_TOKEN }} # force: true # empty: true # tags: true From 06f2774d8ab7d0320ed0227f435489eefc1a1fd8 Mon Sep 17 00:00:00 2001 From: Justin Wood Date: Fri, 22 Oct 2021 21:58:59 -0700 Subject: [PATCH 20/20] Fixing conflict --- .github/workflows/zap_regeneration.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/zap_regeneration.yaml b/.github/workflows/zap_regeneration.yaml index 16a8a8ec5025de..4f15255b318d93 100644 --- a/.github/workflows/zap_regeneration.yaml +++ b/.github/workflows/zap_regeneration.yaml @@ -83,11 +83,7 @@ jobs: # target_branch: target_branch_name # files: file1 file2 directory1 directory2/file3 # remote_repository: https://github.com/owner/another_repository -<<<<<<< HEAD access_token: ${{ secrets.APPLE_PERSONAL_ACCESS_TOKEN }} -======= - # access_token: ${{ github.token }} ->>>>>>> 61f08f0db60915d8fbf3ab2a4fcc49cc06e9e88f # force: true # empty: true # tags: true