Skip to content

Add cpucap.h header and detect AArch64 systems #140

Add cpucap.h header and detect AArch64 systems

Add cpucap.h header and detect AArch64 systems #140

Workflow file for this run

# SPDX-License-Identifier: Apache-2.0
name: Bench
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
types: [ "labeled" ]
jobs:
bench:
name: ${{ matrix.target.name }}
strategy:
fail-fast: true
matrix:
target:
- system: rpi4
name: Arm Cortex-A72 (Raspberry Pi 4) benchmarks
bench_pmu: PMU
archflags: -mcpu=cortex-a72
cflags: -DFORCE_AARCH64
bench_extra_args:
- system: rpi5
name: Arm Cortex-A76 (Raspberry Pi 5) benchmarks
bench_pmu: PERF
archflags: "-mcpu=cortex-a76 -march=armv8.2-a"
cflags: -DFORCE_AARCH64
bench_extra_args:
- system: a55
name: Arm Cortex-A55 (Snapdragon 888) benchmarks
bench_pmu: PERF
archflags: "-mcpu=cortex-a55 -march=armv8.2-a"
cflags: "-static -DFORCE_AARCH64"
bench_extra_args: -w exec-on-a55
runs-on: self-hosted-${{ matrix.target.system }}
defaults:
run:
shell: nix develop .#ci -c bash -e {0}
permissions:
contents: write
if: github.repository_owner == 'pq-code-package' && (github.event.label.name == 'benchmark' || github.ref == 'refs/heads/main')
steps:
- uses: actions/checkout@v4
- name: Setup nix
uses: ./.github/actions/setup-nix
with:
devShell: ci
script: |
ARCH=$(uname -m)
cat >> $GITHUB_STEP_SUMMARY <<-EOF
## Setup
Architecture: $ARCH
- $(uname -a)
- $(nix --version)
- $(astyle --version)
- $(${{ matrix.target.cross_prefix }}gcc --version | grep -m1 "")
- $(bash --version | grep -m1 "")
## CPU Info
$(cat /proc/cpuinfo)
EOF
- name: Run benchmark
uses: ./.github/actions/bench
with:
name: ${{ matrix.target.name }}
cflags: ${{ matrix.target.cflags }}
archflags: ${{ matrix.target.archflags }}
perf: ${{ matrix.target.bench_pmu }}
store_results: ${{ github.repository_owner == 'pq-code-package' && github.ref == 'refs/heads/main' }}
bench_extra_args: ${{ matrix.target.bench_extra_args }}
gh_token: ${{ secrets.GITHUB_TOKEN }}