-
Notifications
You must be signed in to change notification settings - Fork 15
27 lines (25 loc) · 1.09 KB
/
check-size.yml
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 "[email protected]"
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