-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
72afa87
commit fa1b8c7
Showing
1 changed file
with
8 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,32 +62,34 @@ jobs: | |
|
||
- name: Calculate binary size | ||
working-directory: ./example | ||
run: cargo size --release -- -A > ../binsize_new.txt | ||
run: | | ||
mkdir ../binsizes | ||
cargo size --release -- -A > ../binsizes/binsize_new.txt | ||
- name: Rename binsize artifact | ||
if: github.ref_name == 'master' | ||
run: cp binsize_new.txt binsize_master.txt | ||
run: mv ./binsizes/binsize_new.txt ./binsizes/binsize_master.txt | ||
|
||
- name: Store binsize artifact | ||
if: github.ref_name == 'master' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: master-binsize | ||
path: binsize_master.txt | ||
path: ./binsizes/* | ||
overwrite: true | ||
|
||
- name: Retrieve master binsize artifact | ||
if: github.ref_name != 'master' | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: master-binsize | ||
path: binsize_master.txt | ||
path: ./binsizes | ||
|
||
- name: Run diff | ||
if: github.ref_name != 'master' | ||
uses: LouisBrunner/[email protected] | ||
with: | ||
old: binsize_master.txt | ||
new: binsize_new.txt | ||
old: ./binsizes/binsize_master.txt | ||
new: ./binsizes/binsize_new.txt | ||
token: $GITHUB_TOKEN | ||
notify_issue: true |