File: check-size.yml

package info (click to toggle)
golang-github-checkpoint-restore-checkpointctl 1.3.0%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 524 kB
  • sloc: ansic: 208; makefile: 172; sh: 40
file content (27 lines) | stat: -rw-r--r-- 1,121 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
name: Check binary size

on:
  pull_request:
    types: [opened, reopened, synchronize, labeled, unlabeled, ready_for_review]

jobs:
  check_size:
    runs-on: ubuntu-latest
    # Check if pull request does not have label "bloat-ok".
    if: "!contains(github.event.pull_request.labels.*.name, 'bloat-ok')"
    steps:
    - uses: actions/checkout@v4
      with:
        # Needed to rebase against the base branch
        fetch-depth: 0
        # Checkout pull request HEAD commit instead of merge commit
        ref: ${{ github.event.pull_request.head.sha }}
    - name: Configure git user details
      run: |
        git config --global user.email "checkpoint-restore@users.noreply.github.com"
        git config --global user.name "checkpoint-restore"
    - name: Configure base branch without switching current branch
      run: git fetch origin ${GITHUB_BASE_REF}:${GITHUB_BASE_REF}
    - name: Compare binary size change across each commit
      # Use the last non-merge commit from the base branch as the baseline
      run: git rebase -v $(git rev-list --no-merges -n 1 ${GITHUB_BASE_REF})^ -x test/check-size.sh