-
Notifications
You must be signed in to change notification settings - Fork 83
112 lines (93 loc) · 4.29 KB
/
size-check.yml
File metadata and controls
112 lines (93 loc) · 4.29 KB
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: Size Check
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: "50 6 * * *"
workflow_dispatch:
env:
RUST_TOOLCHAIN: stable
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_TERM_COLOR: always
jobs:
build_and_run_size_report:
runs-on: ubuntu-latest
steps:
- name: Rust
uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
components: rustfmt, clippy, rust-src
- name: Setup | Rust no-std Thumbv6 target
run: rustup target add thumbv6m-none-eabi
- name: Setup | Rust no-std Thumbv7 target
run: rustup target add thumbv7em-none-eabi
- name: Setup | Rust no-std Riscv32 target
run: rustup target add riscv32imac-unknown-none-elf
- name: Install libdbus
run: sudo apt-get install -y libdbus-1-dev
- name: Checkout
uses: actions/checkout@v3
- name: Set up environment for size reports
uses: ./.github/actions/setup-size-reports
if: ${{ !env.ACT }}
with:
gh-context: ${{ toJson(github) }}
- name: Build | Host binary for size report
run: cd bloat-check; cargo build --release
- name: Clippy - bloat-check
run: cd bloat-check; cargo clippy --no-deps -- -Dwarnings
- name: Clippy - bloat-check - riscv32imac
run: cd bloat-check; cargo clippy --no-deps --target riscv32imac-unknown-none-elf -- -Dwarnings
- name: Build | Thumbv6m binary for size report
# run: cd bloat-check; cargo build --release --target thumbv6m-none-eabi -Zbuild-std=core,alloc,panic_abort
run: cd bloat-check; cargo build --release --target thumbv6m-none-eabi
- name: Build | Thumbv7em binary for size report
# run: cd bloat-check; cargo build --release --target thumbv7em-none-eabi -Zbuild-std=core,alloc,panic_abort
run: cd bloat-check; cargo build --release --target thumbv7em-none-eabi
- name: Build | Riscv32imac binary for size report
# run: cd bloat-check; cargo build --release --target riscv32imac-unknown-none-elf -Zbuild-std=core,alloc,panic_abort
run: cd bloat-check; cargo build --release --target riscv32imac-unknown-none-elf
- name: Examples
run: cargo build --release --no-default-features --features os,rustcrypto,log,zbus
- name: Prepare bloat report from the previous builds
run: |
python .github/scripts/memory/gh_sizes.py \
"(core)" infologs-optz-ltofat x86_64-unknown-linux-gnu \
bloat-check/target/release/bloat-check \
/tmp/bloat_reports/
python .github/scripts/memory/gh_sizes.py \
"(core)" infodefmt-optz-ltofat thumbv6m-none-eabi \
bloat-check/target/thumbv6m-none-eabi/release/bloat-check \
/tmp/bloat_reports/
python .github/scripts/memory/gh_sizes.py \
"(core)" infodefmt-optz-ltofat thumbv7em-none-eabi \
bloat-check/target/thumbv7em-none-eabi/release/bloat-check \
/tmp/bloat_reports/
python .github/scripts/memory/gh_sizes.py \
"(core)" infodefmt-optz-ltofat riscv32imac-unknown-none-elf \
bloat-check/target/riscv32imac-unknown-none-elf/release/bloat-check \
/tmp/bloat_reports/
python .github/scripts/memory/gh_sizes.py \
onoff-light infologs-optz-ltofat x86_64-unknown-linux-gnu \
target/release/onoff_light \
/tmp/bloat_reports/
python .github/scripts/memory/gh_sizes.py \
onoff-light-bt infologs-optz-ltofat x86_64-unknown-linux-gnu \
target/release/onoff_light_bt \
/tmp/bloat_reports/
python .github/scripts/memory/gh_sizes.py \
dimmable-light infologs-optz-ltofat x86_64-unknown-linux-gnu \
target/release/dimmable_light \
/tmp/bloat_reports/
python .github/scripts/memory/gh_sizes.py \
speaker infologs-optz-ltofat x86_64-unknown-linux-gnu \
target/release/speaker \
/tmp/bloat_reports/
- name: Uploading Size Reports
uses: ./.github/actions/upload-size-reports
if: ${{ !env.ACT }}
with:
platform-name: cross-platform