-
Notifications
You must be signed in to change notification settings - Fork 8
76 lines (68 loc) · 2.67 KB
/
report-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
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
name: Size report
on:
pull_request:
push:
permissions:
contents: read
checks: write
jobs:
# Report the binary size of the test suite
size-freestanding:
name: Build and report size
runs-on: ubuntu-20.04
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
include:
# MPS2+ AN505, Armv7-M + FPU + DSP
- { ty: arm, runner_target: qemu_mps2_an505, runner_args: --arch cortex_m4f }
# MPS2+ AN385, Armv7-M
- { ty: arm, runner_target: qemu_mps2_an385, runner_args: "" }
# MPS2+ AN385, Armv6-M
- { ty: arm, runner_target: qemu_mps2_an385, runner_args: --arch cortex_m0 }
# SiFive U, RV64GC
- { ty: riscv, runner_target: qemu_sifive_u_rv64, runner_args: "" }
# SiFive U, RV64IMAC
- { ty: riscv, runner_target: qemu_sifive_u_rv64, runner_args: --arch rv64i+m+a+c }
# SiFive U, RV64IMA
- { ty: riscv, runner_target: qemu_sifive_u_rv64, runner_args: --arch rv64i+m+a }
# SiFive E, RV32IMAC
- { ty: riscv, runner_target: qemu_sifive_e_rv32, runner_args: "" }
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Rust
# FIXME: Switch back when actions-rs/toolchain#{209,220,222} is merged
uses: r3-os/actions-rust-toolchain@a862b6623c178b43a3135516442a5f72fb5c1877
with:
profile: minimal
components: rust-src
- name: Install dependencies (Linux)
run: |
sudo apt-get update
sudo apt-get install libusb-1.0-0-dev libudev-dev
.github/scripts/install-deno.sh
- name: Cache test runner's binary
uses: actions/cache@v3
with:
path: ./target/debug
key: ${{ runner.os }}-ci-runner-${{ hashFiles('rust-toolchain', 'src/r3_test_runner/**', 'src/r3_test_suite/**') }}
- name: "Set -Clto -Ccodegen-units=1 -Copt-level=z"
run: |
echo 'lto = true' >> Cargo.toml
echo 'codegen-units = 1' >> Cargo.toml
echo 'opt-level = "z"' >> Cargo.toml
- name: Generate a size report
run: |
deno --version
deno run -A scripts/report-size.ts -- --target ${{ matrix.runner_target }} ${{ matrix.runner_args }} -- -basepri > size-report.md
- name: Publish the report as a check run
uses: LouisBrunner/checks-action@v1.5.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: "Size report: ${{ matrix.runner_target }} ${{ matrix.runner_args }}"
output: |
{"summary": "Test suite size report"}
output_text_description_file: size-report.md
conclusion: success