forked from rust-lang/backtrace-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Factor out the CI binary size measurement as a separate Github action…
… for easier tuning.
- Loading branch information
Showing
2 changed files
with
66 additions
and
27 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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Build with patched std | ||
description: > | ||
Build a binary with a version of std that's had a specific revision of | ||
backtrace patched in. | ||
inputs: | ||
backtrace-commit: | ||
description: The git commit of backtrace to patch in to std | ||
required: true | ||
main-rs: | ||
description: The (single) source code file to compile | ||
required: true | ||
outputs: | ||
test-binary-size: | ||
description: The size in bytes of the built test binary | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Build binary with patched version of backtrace | ||
run: | | ||
rm -rf build/x86_64-unknown-linux-gnu/stage0-std | ||
(cd library/backtrace && git checkout ${{ inputs.backtrace-commit }}) | ||
git add library/backtrace | ||
python3 x.py build library --stage 0 | ||
cp -r ./build/x86_64-unknown-linux-gnu/stage0/bin ./build/x86_64-unknown-linux-gnu/stage0-sysroot/bin | ||
cp -r ./build/x86_64-unknown-linux-gnu/stage0/lib/*.so ./build/x86_64-unknown-linux-gnu/stage0-sysroot/lib | ||
TEMP_BUILD_OUTPUT=$(mktemp test-binary) | ||
./build/x86_64-unknown-linux-gnu/stage0-sysroot/bin/rustc -O ${{ inputs.main-rs }} -o "$TEMP_BUILD_OUTPUT" | ||
echo "$(stat -c '%s' binary-reference)" >> "$GITHUB_OUTPUT" |
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