-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
107 lines (95 loc) · 2.67 KB
/
benchmarks.yml
File metadata and controls
107 lines (95 loc) · 2.67 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
name: Benchmarks
# spell-checker:ignore (people) taiki-e
# spell-checker:ignore (misc) codspeed sccache
on:
pull_request:
push:
branches:
- '*'
permissions:
contents: read # to fetch code (actions/checkout)
# End the current execution if there is a new changeset in the PR.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
benchmarks:
name: Run ${{ matrix.type }} benchmarks for ${{ matrix.package }} (CodSpeed)
runs-on: ubuntu-latest
env:
CARGO_INCREMENTAL: 0
strategy:
matrix:
type: [simulation, memory]
package: [
uu_base64,
uu_cksum,
uu_cp,
uu_cat,
uu_cut,
uu_dd,
uu_df,
uu_du,
uu_expand,
uu_fold,
uu_hostname,
uu_join,
uu_ls,
uu_mv,
uu_nl,
uu_numfmt,
uu_rm,
uu_seq,
uu_shuf,
uu_sort,
uu_split,
uu_timeout,
uu_tsort,
uu_unexpand,
uu_uniq,
uu_wc,
uu_factor,
uu_date,
uu_csplit,
uu_true,
uu_false
]
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Run sccache-cache
id: sccache-setup
uses: mozilla-actions/sccache-action@v0.0.10
continue-on-error: true
- name: Export sccache
if: steps.sccache-setup.outcome == 'success'
run: |
echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
echo "SCCACHE_GHA_ENABLED=true" >> $GITHUB_ENV
- name: Install locales
shell: bash
run: |
sudo locale-gen fr_FR.UTF-8
sudo update-locale
- name: Install tools
uses: taiki-e/install-action@v2
with:
tool: cargo-codspeed
- name: Build benchmarks for ${{ matrix.package }} (${{ matrix.type }})
shell: bash
run: |
echo "Building ${{ matrix.type }} benchmarks for ${{ matrix.package }}"
cargo codspeed build -m ${{ matrix.type }} -p ${{ matrix.package }}
- name: Run ${{ matrix.type }} benchmarks for ${{ matrix.package }}
uses: CodSpeedHQ/action@v4
env:
CODSPEED_LOG: debug
with:
mode: ${{ matrix.type }}
run: |
echo "Running ${{ matrix.type }} benchmarks for ${{ matrix.package }}"
cargo codspeed run -p ${{ matrix.package }} > /dev/null
token: ${{ secrets.CODSPEED_TOKEN }}