File: benchmarks.yml

package info (click to toggle)
rust-coreutils 0.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 485,976 kB
  • sloc: ansic: 103,608; asm: 28,570; sh: 8,672; python: 5,662; makefile: 474; cpp: 97; javascript: 72
file content (96 lines) | stat: -rw-r--r-- 2,493 bytes parent folder | download
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
name: Benchmarks

# spell-checker:ignore codspeed dtolnay Swatinem 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:
      RUSTC_WRAPPER: sccache
      CARGO_INCREMENTAL: 0
      SCCACHE_GHA_ENABLED: "true"
    strategy:
      matrix:
        type: [simulation] # , memory]  # memory profile disabled due to variance
        package: [
          uu_base64,
          uu_cksum,
          uu_cp,
          uu_cut,
          uu_dd,
          uu_df,
          uu_du,
          uu_expand,
          uu_fold,
          uu_join,
          uu_ls,
          uu_mv,
          uu_nl,
          uu_numfmt,
          uu_rm,
          uu_seq,
          uu_shuf,
          uu_sort,
          uu_split,
          uu_tsort,
          uu_unexpand,
          uu_uniq,
          uu_wc,
          uu_factor,
          uu_date
        ]
    steps:
      - uses: actions/checkout@v6
        with:
          persist-credentials: false

      - uses: dtolnay/rust-toolchain@stable

      - uses: Swatinem/rust-cache@v2

      - name: Run sccache-cache
        uses: mozilla-actions/sccache-action@v0.0.9

      - name: Install locales
        shell: bash
        run: |
          sudo apt-get update
          sudo apt-get install -y locales
          sudo locale-gen fr_FR.UTF-8
          sudo update-locale

      - name: Install cargo-codspeed
        shell: bash
        run: cargo install cargo-codspeed --locked

      - 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 }}