From 659d9c8948a6a78af7c5e8800a1848bddbbc70e4 Mon Sep 17 00:00:00 2001 From: Abdelaziz Mahdy Date: Mon, 4 Nov 2024 21:06:26 -0400 Subject: [PATCH 1/5] remove macos_arm_size_report.json --- .github/workflows/examples.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/examples.yaml b/.github/workflows/examples.yaml index 18aa0973..4ade2518 100644 --- a/.github/workflows/examples.yaml +++ b/.github/workflows/examples.yaml @@ -478,11 +478,11 @@ jobs: } EOL - - name: Upload size report - uses: actions/upload-artifact@v4 - with: - name: macos-arm-size-report - path: macos_arm_size_report.json + # - name: Upload size report + # uses: actions/upload-artifact@v4 + # with: + # name: macos-arm-size-report + # path: macos_arm_size_report.json combine-reports: name: Generate Combined Size Reports From 69aa751a507e2a652f9d5d5ddc6893f56f0994b9 Mon Sep 17 00:00:00 2001 From: Abdelaziz Mahdy Date: Mon, 4 Nov 2024 21:21:37 -0400 Subject: [PATCH 2/5] skip macos_arm --- .github/workflows/examples.yaml | 10 +++++----- scripts/generate_combined_report.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/examples.yaml b/.github/workflows/examples.yaml index 4ade2518..18aa0973 100644 --- a/.github/workflows/examples.yaml +++ b/.github/workflows/examples.yaml @@ -478,11 +478,11 @@ jobs: } EOL - # - name: Upload size report - # uses: actions/upload-artifact@v4 - # with: - # name: macos-arm-size-report - # path: macos_arm_size_report.json + - name: Upload size report + uses: actions/upload-artifact@v4 + with: + name: macos-arm-size-report + path: macos_arm_size_report.json combine-reports: name: Generate Combined Size Reports diff --git a/scripts/generate_combined_report.py b/scripts/generate_combined_report.py index e480b152..7d68658f 100644 --- a/scripts/generate_combined_report.py +++ b/scripts/generate_combined_report.py @@ -51,7 +51,7 @@ def consolidate_data(reports: list) -> Dict[str, Any]: data = json.load(f) for package, sizes in data.items(): if ( - package == "base_size" or package == "platform" + package == "base_size" or package == "platform" or platform.lower() == "macos_arm" ): # Skip platform mapping continue if package not in combined: From b968a3979a50a21a9580a7dc487251ef0cd73438 Mon Sep 17 00:00:00 2001 From: rainy liu Date: Tue, 5 Nov 2024 10:06:15 +0800 Subject: [PATCH 3/5] fix checkout --- .github/workflows/examples.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/examples.yaml b/.github/workflows/examples.yaml index 18aa0973..d5d5704e 100644 --- a/.github/workflows/examples.yaml +++ b/.github/workflows/examples.yaml @@ -491,8 +491,6 @@ jobs: steps: - uses: actions/checkout@v4 - with: - ref: ${{ github.head_ref }} # - name: Set up Python # uses: actions/setup-python@v5 From f9b3987f0a1c097ac8c28af5ff6fee665a9390d8 Mon Sep 17 00:00:00 2001 From: rainy liu Date: Tue, 5 Nov 2024 15:22:01 +0800 Subject: [PATCH 4/5] checkout forks --- .github/workflows/examples.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/examples.yaml b/.github/workflows/examples.yaml index d5d5704e..f80cefbd 100644 --- a/.github/workflows/examples.yaml +++ b/.github/workflows/examples.yaml @@ -491,6 +491,15 @@ jobs: steps: - uses: actions/checkout@v4 + with: + # Checkout the fork/head-repository and push changes to the fork. + # If you skip this, the base repository will be checked out and changes + # will be committed to the base repository! + repository: ${{ github.event.pull_request.head.repo.full_name }} + + # Checkout the branch made in the fork. Will automatically push changes + # back to this branch. + ref: ${{ github.head_ref }} # - name: Set up Python # uses: actions/setup-python@v5 From 6afaf0b24bffed8ba15bbcea0697703363b8825e Mon Sep 17 00:00:00 2001 From: rainy liu Date: Tue, 5 Nov 2024 15:36:34 +0800 Subject: [PATCH 5/5] add write permission --- .github/workflows/examples.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/examples.yaml b/.github/workflows/examples.yaml index f80cefbd..ec51b4c7 100644 --- a/.github/workflows/examples.yaml +++ b/.github/workflows/examples.yaml @@ -488,6 +488,10 @@ jobs: name: Generate Combined Size Reports needs: [windows, android, ios, linux, macos, macos-arm] runs-on: ubuntu-latest + permissions: + # Give the default GITHUB_TOKEN write permission to commit and push the + # added or changed files to the repository. + contents: write steps: - uses: actions/checkout@v4