Skip to content

Commit f19d7ec

Browse files
committed
github: move benchmark into a single file
1 parent 6df73f0 commit f19d7ec

File tree

2 files changed

+82
-65
lines changed

2 files changed

+82
-65
lines changed

.github/workflows/CICD.yml

Lines changed: 0 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1326,68 +1326,3 @@ jobs:
13261326
run: cargo build --release -p uu_rm -p uu_chmod -p uu_chown -p uu_chgrp -p uu_mv -p uu_du
13271327
- name: Run safe traversal verification
13281328
run: ./util/check-safe-traversal.sh
1329-
1330-
benchmarks:
1331-
name: Run benchmarks (CodSpeed)
1332-
runs-on: ubuntu-latest
1333-
needs: min_version
1334-
strategy:
1335-
matrix:
1336-
benchmark-target:
1337-
- { package: uu_base64 }
1338-
- { package: uu_cp }
1339-
- { package: uu_cut }
1340-
- { package: uu_du }
1341-
- { package: uu_expand }
1342-
- { package: uu_fold }
1343-
- { package: uu_hashsum }
1344-
- { package: uu_ls }
1345-
- { package: uu_mv }
1346-
- { package: uu_nl }
1347-
- { package: uu_numfmt }
1348-
- { package: uu_rm }
1349-
- { package: uu_seq }
1350-
- { package: uu_sort }
1351-
- { package: uu_split }
1352-
- { package: uu_tsort }
1353-
- { package: uu_unexpand }
1354-
- { package: uu_uniq }
1355-
- { package: uu_wc }
1356-
steps:
1357-
- uses: actions/checkout@v5
1358-
with:
1359-
persist-credentials: false
1360-
1361-
- name: Install system dependencies
1362-
shell: bash
1363-
run: |
1364-
sudo apt-get -y update
1365-
sudo apt-get -y install libselinux1-dev
1366-
1367-
- uses: dtolnay/rust-toolchain@stable
1368-
1369-
- uses: Swatinem/rust-cache@v2
1370-
1371-
- name: Run sccache-cache
1372-
uses: mozilla-actions/[email protected]
1373-
1374-
- name: Install cargo-codspeed
1375-
shell: bash
1376-
run: cargo install cargo-codspeed --locked
1377-
1378-
- name: Build benchmarks for ${{ matrix.benchmark-target.package }}
1379-
shell: bash
1380-
run: |
1381-
echo "Building benchmarks for ${{ matrix.benchmark-target.package }}"
1382-
cargo codspeed build -p ${{ matrix.benchmark-target.package }}
1383-
1384-
- name: Run benchmarks for ${{ matrix.benchmark-target.package }}
1385-
uses: CodSpeedHQ/action@v4
1386-
env:
1387-
CODSPEED_LOG: debug
1388-
with:
1389-
mode: instrumentation
1390-
run: |
1391-
echo "Running benchmarks for ${{ matrix.benchmark-target.package }}"
1392-
cargo codspeed run -p ${{ matrix.benchmark-target.package }} > /dev/null
1393-
token: ${{ secrets.CODSPEED_TOKEN }}

.github/workflows/benchmarks.yml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: Benchmarks
2+
3+
# spell-checker:ignore codspeed dtolnay Swatinem sccache
4+
5+
on:
6+
pull_request:
7+
push:
8+
branches:
9+
- '*'
10+
11+
permissions:
12+
contents: read # to fetch code (actions/checkout)
13+
14+
# End the current execution if there is a new changeset in the PR.
15+
concurrency:
16+
group: ${{ github.workflow }}-${{ github.ref }}
17+
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
18+
19+
jobs:
20+
benchmarks:
21+
name: Run benchmarks (CodSpeed)
22+
runs-on: ubuntu-latest
23+
strategy:
24+
matrix:
25+
benchmark-target:
26+
- { package: uu_base64 }
27+
- { package: uu_cp }
28+
- { package: uu_cut }
29+
- { package: uu_du }
30+
- { package: uu_expand }
31+
- { package: uu_fold }
32+
- { package: uu_hashsum }
33+
- { package: uu_ls }
34+
- { package: uu_mv }
35+
- { package: uu_nl }
36+
- { package: uu_numfmt }
37+
- { package: uu_rm }
38+
- { package: uu_seq }
39+
- { package: uu_sort }
40+
- { package: uu_split }
41+
- { package: uu_tsort }
42+
- { package: uu_unexpand }
43+
- { package: uu_uniq }
44+
- { package: uu_wc }
45+
steps:
46+
- uses: actions/checkout@v5
47+
with:
48+
persist-credentials: false
49+
50+
- name: Install system dependencies
51+
shell: bash
52+
run: |
53+
sudo apt-get -y update
54+
sudo apt-get -y install libselinux1-dev
55+
56+
- uses: dtolnay/rust-toolchain@stable
57+
58+
- uses: Swatinem/rust-cache@v2
59+
60+
- name: Run sccache-cache
61+
uses: mozilla-actions/[email protected]
62+
63+
- name: Install cargo-codspeed
64+
shell: bash
65+
run: cargo install cargo-codspeed --locked
66+
67+
- name: Build benchmarks for ${{ matrix.benchmark-target.package }}
68+
shell: bash
69+
run: |
70+
echo "Building benchmarks for ${{ matrix.benchmark-target.package }}"
71+
cargo codspeed build -p ${{ matrix.benchmark-target.package }}
72+
73+
- name: Run benchmarks for ${{ matrix.benchmark-target.package }}
74+
uses: CodSpeedHQ/action@v4
75+
env:
76+
CODSPEED_LOG: debug
77+
with:
78+
mode: instrumentation
79+
run: |
80+
echo "Running benchmarks for ${{ matrix.benchmark-target.package }}"
81+
cargo codspeed run -p ${{ matrix.benchmark-target.package }} > /dev/null
82+
token: ${{ secrets.CODSPEED_TOKEN }}

0 commit comments

Comments
 (0)