@@ -1331,6 +1331,28 @@ jobs:
13311331 name : Run benchmarks (CodSpeed)
13321332 runs-on : ubuntu-latest
13331333 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 }
13341356 steps :
13351357 - uses : actions/checkout@v5
13361358 with :
@@ -1353,40 +1375,19 @@ jobs:
13531375 shell : bash
13541376 run : cargo install cargo-codspeed --locked
13551377
1356- - name : Get benchmark list
1357- id : benchmark_list
1358- shell : bash
1359- run : |
1360- echo "Finding all utilities with benchmarks..."
1361- benchmark_packages=""
1362- for bench_dir in $(ls -d src/uu/*/benches 2>/dev/null); do
1363- prog_dir=$(dirname "$bench_dir")
1364- prog_name=$(basename "$prog_dir")
1365- echo "Found benchmarks for uu_$prog_name"
1366- benchmark_packages="$benchmark_packages uu_$prog_name"
1367- done
1368- echo "benchmark_packages=${benchmark_packages}" >> $GITHUB_OUTPUT
1369- echo "Found benchmark packages:${benchmark_packages}"
1370-
1371- - name : Build benchmarks
1378+ - name : Build benchmarks for ${{ matrix.benchmark-target.package }}
13721379 shell : bash
13731380 run : |
1374- echo "Building benchmarks for packages: ${{ steps.benchmark_list.outputs.benchmark_packages }}"
1375- for package in ${{ steps.benchmark_list.outputs.benchmark_packages }}; do
1376- echo "Building benchmarks for $package"
1377- cargo codspeed build -p $package
1378- done
1381+ echo "Building benchmarks for ${{ matrix.benchmark-target.package }}"
1382+ cargo codspeed build -p ${{ matrix.benchmark-target.package }}
13791383
1380- - name : Run benchmarks
1384+ - name : Run benchmarks for ${{ matrix.benchmark-target.package }}
13811385 uses : CodSpeedHQ/action@v4
13821386 env :
13831387 CODSPEED_LOG : debug
13841388 with :
13851389 mode : instrumentation
13861390 run : |
1387- echo "Running benchmarks for packages: ${{ steps.benchmark_list.outputs.benchmark_packages }}"
1388- for package in ${{ steps.benchmark_list.outputs.benchmark_packages }}; do
1389- echo "Running benchmarks for $package"
1390- cargo codspeed run -p $package > /dev/null
1391- done
1391+ echo "Running benchmarks for ${{ matrix.benchmark-target.package }}"
1392+ cargo codspeed run -p ${{ matrix.benchmark-target.package }} > /dev/null
13921393 token : ${{ secrets.CODSPEED_TOKEN }}
0 commit comments