retch-cli 0.6.12

A fast, feature-rich system information fetcher written in Rust (similar to fastfetch or neofetch)
Documentation
name: Continuous Benchmarking

on:
  push:
    branches: [ "main" ]

permissions:
  contents: write
  deployments: write

env:
  CARGO_TERM_COLOR: always

jobs:
  benchmark-linux-x64:
    name: Benchmark Linux x64
    runs-on: ubuntu-latest
    container: fedora:latest
    steps:
      - name: Install dependencies (Fedora)
        run: |
          dnf install -y git curl gcc make sqlite-devel python3
          curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
          echo "$HOME/.cargo/bin" >> $GITHUB_PATH
          git config --global --add safe.directory '*'

      - uses: actions/checkout@v7.0.1

      - name: Install fastfetch and hyperfine
        run: |
          python3 scripts/install_fastfetch.py
          python3 scripts/install_hyperfine.py

      - name: Build release binary
        run: cargo build --release

      - name: Run benchmarks
        run: |
          cargo bench
          hyperfine --warmup 3 --runs 10 './target/release/retch' 'fastfetch' --export-json hyperfine_default.json
          hyperfine --warmup 3 --runs 10 './target/release/retch --short' 'fastfetch -c none' --export-json hyperfine_short.json
          hyperfine --warmup 3 --runs 10 './target/release/retch --long' 'fastfetch -c all' --export-json hyperfine_long.json
          python3 scripts/parse_criterion.py

      - name: Store benchmark result
        uses: benchmark-action/github-action-benchmark@v1
        with:
          name: "Linux x64 Benchmarks"
          tool: 'customSmallerIsBetter'
          output-file-path: benchmark_result.json
          github-token: ${{ secrets.GITHUB_TOKEN }}
          auto-push: true
          gh-pages-branch: gh-pages
          benchmark-data-dir-path: dev/bench
          alert-threshold: '200%'
          fail-on-alert: false
          comment-on-alert: true
          alert-comment-cc-users: '@l1a'
          max-items-in-chart: 50

  benchmark-linux-arm:
    name: Benchmark Linux arm64
    needs: benchmark-linux-x64
    runs-on: ubuntu-24.04-arm
    container: fedora:latest
    steps:
      - name: Install dependencies (Fedora)
        run: |
          dnf install -y git curl gcc make sqlite-devel python3
          curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
          echo "$HOME/.cargo/bin" >> $GITHUB_PATH
          git config --global --add safe.directory '*'

      - uses: actions/checkout@v7.0.1

      - name: Install fastfetch and hyperfine
        run: |
          python3 scripts/install_fastfetch.py
          python3 scripts/install_hyperfine.py

      - name: Build release binary
        run: cargo build --release

      - name: Run benchmarks
        run: |
          cargo bench
          hyperfine --warmup 3 --runs 10 './target/release/retch' 'fastfetch' --export-json hyperfine_default.json
          hyperfine --warmup 3 --runs 10 './target/release/retch --short' 'fastfetch -c none' --export-json hyperfine_short.json
          hyperfine --warmup 3 --runs 10 './target/release/retch --long' 'fastfetch -c all' --export-json hyperfine_long.json
          python3 scripts/parse_criterion.py

      - name: Store benchmark result
        uses: benchmark-action/github-action-benchmark@v1
        with:
          name: "Linux Arm64 Benchmarks"
          tool: 'customSmallerIsBetter'
          output-file-path: benchmark_result.json
          github-token: ${{ secrets.GITHUB_TOKEN }}
          auto-push: true
          gh-pages-branch: gh-pages
          benchmark-data-dir-path: dev/bench
          alert-threshold: '200%'
          fail-on-alert: false
          comment-on-alert: true
          alert-comment-cc-users: '@l1a'
          max-items-in-chart: 50

  benchmark-macos-arm:
    name: Benchmark macOS arm64
    needs: benchmark-linux-arm
    runs-on: macos-latest
    steps:
      - uses: actions/checkout@v7.0.1

      - name: Install Rust toolchain
        uses: dtolnay/rust-toolchain@stable

      - name: Untap aws/tap (cosmetic — pre-tapped on the runner image, unrelated to this job, and untrusted-tap warnings clutter the Actions summary)
        run: brew untap aws/tap || true

      - name: Install fastfetch and hyperfine
        run: |
          python3 scripts/install_fastfetch.py
          python3 scripts/install_hyperfine.py

      - name: Build release binary
        run: cargo build --release

      - name: Run benchmarks
        run: |
          cargo bench
          hyperfine --warmup 3 --runs 10 './target/release/retch' 'fastfetch' --export-json hyperfine_default.json
          hyperfine --warmup 3 --runs 10 './target/release/retch --short' 'fastfetch -c none' --export-json hyperfine_short.json
          hyperfine --warmup 3 --runs 10 './target/release/retch --long' 'fastfetch -c all' --export-json hyperfine_long.json
          python3 scripts/parse_criterion.py

      - name: Store benchmark result
        uses: benchmark-action/github-action-benchmark@v1
        with:
          name: "macOS Arm64 Benchmarks"
          tool: 'customSmallerIsBetter'
          output-file-path: benchmark_result.json
          github-token: ${{ secrets.GITHUB_TOKEN }}
          auto-push: true
          gh-pages-branch: gh-pages
          benchmark-data-dir-path: dev/bench
          alert-threshold: '200%'
          fail-on-alert: false
          comment-on-alert: true
          alert-comment-cc-users: '@l1a'
          max-items-in-chart: 50

  benchmark-windows-x64:
    name: Benchmark Windows x64
    needs: benchmark-macos-arm
    runs-on: windows-latest
    steps:
      - uses: actions/checkout@v7.0.1

      - name: Install Rust toolchain
        uses: dtolnay/rust-toolchain@stable

      - name: Configure Windows PATH
        run: |
          echo "${env:USERPROFILE}\.cargo\bin" >> $env:GITHUB_PATH
          echo "${env:USERPROFILE}\bin" >> $env:GITHUB_PATH
          echo "${env:USERPROFILE}\scoop\shims" >> $env:GITHUB_PATH
          echo "${env:LOCALAPPDATA}\Microsoft\WinGet\Links" >> $env:GITHUB_PATH
        shell: pwsh

      - name: Install fastfetch and hyperfine
        run: |
          python scripts/install_fastfetch.py
          python scripts/install_hyperfine.py

      - name: Build release binary
        run: cargo build --release

      - name: Run benchmarks
        run: |
          cargo bench
          hyperfine --warmup 3 --runs 10 '.\target\release\retch.exe' 'fastfetch' --export-json hyperfine_default.json
          hyperfine --warmup 3 --runs 10 '.\target\release\retch.exe --short' 'fastfetch -c none' --export-json hyperfine_short.json
          hyperfine --warmup 3 --runs 10 '.\target\release\retch.exe --long' 'fastfetch -c all' --export-json hyperfine_long.json
          python scripts/parse_criterion.py

      - name: Store benchmark result
        uses: benchmark-action/github-action-benchmark@v1
        with:
          name: "Windows x64 Benchmarks"
          tool: 'customSmallerIsBetter'
          output-file-path: benchmark_result.json
          github-token: ${{ secrets.GITHUB_TOKEN }}
          auto-push: true
          gh-pages-branch: gh-pages
          benchmark-data-dir-path: dev/bench
          alert-threshold: '200%'
          fail-on-alert: false
          comment-on-alert: true
          alert-comment-cc-users: '@l1a'
          max-items-in-chart: 50

  benchmark-windows-arm:
    name: Benchmark Windows arm64
    needs: benchmark-windows-x64
    runs-on: windows-11-arm
    steps:
      - uses: actions/checkout@v7.0.1

      - name: Install Rust toolchain
        uses: dtolnay/rust-toolchain@stable

      - name: Configure Windows PATH
        run: |
          echo "${env:USERPROFILE}\.cargo\bin" >> $env:GITHUB_PATH
          echo "${env:USERPROFILE}\bin" >> $env:GITHUB_PATH
          echo "${env:USERPROFILE}\scoop\shims" >> $env:GITHUB_PATH
          echo "${env:LOCALAPPDATA}\Microsoft\WinGet\Links" >> $env:GITHUB_PATH
        shell: pwsh

      - name: Install fastfetch and hyperfine
        run: |
          python scripts/install_fastfetch.py
          python scripts/install_hyperfine.py

      - name: Build release binary
        run: cargo build --release

      - name: Run benchmarks
        run: |
          cargo bench
          hyperfine --warmup 3 --runs 10 '.\target\release\retch.exe' 'fastfetch' --export-json hyperfine_default.json
          hyperfine --warmup 3 --runs 10 '.\target\release\retch.exe --short' 'fastfetch -c none' --export-json hyperfine_short.json
          hyperfine --warmup 3 --runs 10 '.\target\release\retch.exe --long' 'fastfetch -c all' --export-json hyperfine_long.json
          python scripts/parse_criterion.py

      - name: Store benchmark result
        uses: benchmark-action/github-action-benchmark@v1
        with:
          name: "Windows Arm64 Benchmarks"
          tool: 'customSmallerIsBetter'
          output-file-path: benchmark_result.json
          github-token: ${{ secrets.GITHUB_TOKEN }}
          auto-push: true
          gh-pages-branch: gh-pages
          benchmark-data-dir-path: dev/bench
          alert-threshold: '200%'
          fail-on-alert: false
          comment-on-alert: true
          alert-comment-cc-users: '@l1a'
          max-items-in-chart: 50