Allocator Bench #20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Allocator Bench | |
| on: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.run_id }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| bench: | |
| name: ${{ matrix.platform }} (tokio-multi-thread=${{ matrix.tokio_multi_thread }}, ${{ matrix.allocator }}) | |
| runs-on: ${{ matrix.runner }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| allocator: | |
| - system | |
| - jemalloc | |
| - mimalloc_v2 | |
| - mimalloc_v3 | |
| tokio_multi_thread: [true, false] | |
| platform: | |
| - ubuntu-24.04-arm | |
| - ubuntu-24.04 | |
| - windows-2025 | |
| - windows-11-arm | |
| - macos-26 | |
| - macos-26-intel | |
| - alpine | |
| - alpine-arm | |
| include: | |
| - platform: ubuntu-24.04-arm | |
| runner: ubuntu-24.04-arm | |
| alpine: false | |
| - platform: ubuntu-24.04 | |
| runner: ubuntu-24.04 | |
| alpine: false | |
| - platform: windows-2025 | |
| runner: windows-2025 | |
| alpine: false | |
| - platform: windows-11-arm | |
| runner: windows-11-arm | |
| alpine: false | |
| - platform: macos-26 | |
| runner: macos-26 | |
| alpine: false | |
| - platform: macos-26-intel | |
| runner: macos-26-intel | |
| alpine: false | |
| - platform: alpine | |
| runner: ubuntu-24.04 | |
| alpine: true | |
| - platform: alpine-arm | |
| runner: ubuntu-24.04-arm | |
| alpine: true | |
| exclude: | |
| - platform: windows-2025 | |
| allocator: jemalloc | |
| - platform: windows-11-arm | |
| allocator: jemalloc | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| with: | |
| persist-credentials: false | |
| - if: ${{ !matrix.alpine }} | |
| uses: actions-rust-lang/setup-rust-toolchain@2b1f5e9b395427c92ee4e3331786ca3c37afe2d7 # v1 | |
| with: | |
| toolchain: beta | |
| cache: true | |
| cache-key: allocator-bench-${{ matrix.runner }}-${{ matrix.allocator }} | |
| - if: ${{ !matrix.alpine && runner.os != 'Windows' }} | |
| shell: bash | |
| env: | |
| ALLOCATOR: ${{ matrix.allocator }} | |
| TOKIO_MULTI_THREAD: ${{ matrix.tokio_multi_thread }} | |
| PLATFORM_LABEL: ${{ matrix.platform }} | |
| run: bash .github/scripts/allocator_bench_unix.sh | |
| - if: ${{ !matrix.alpine && runner.os == 'Windows' }} | |
| shell: pwsh | |
| env: | |
| ALLOCATOR: ${{ matrix.allocator }} | |
| TOKIO_MULTI_THREAD: ${{ matrix.tokio_multi_thread }} | |
| PLATFORM_LABEL: ${{ matrix.platform }} | |
| run: ./.github/scripts/allocator_bench_windows.ps1 | |
| - if: ${{ matrix.alpine }} | |
| shell: bash | |
| env: | |
| ALLOCATOR: ${{ matrix.allocator }} | |
| TOKIO_MULTI_THREAD: ${{ matrix.tokio_multi_thread }} | |
| PLATFORM_LABEL: ${{ matrix.platform }} | |
| run: bash .github/scripts/allocator_bench_alpine.sh |