From 740bbe29f53f53b24baaa3d1a66eedfdc9bac65a Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Thu, 12 Sep 2024 18:52:25 +0100 Subject: [PATCH] Compactify bench_ec2_all.yml Signed-off-by: Hanno Becker --- .github/workflows/bench_ec2_all.yml | 48 ++++++++++------------------- 1 file changed, 17 insertions(+), 31 deletions(-) diff --git a/.github/workflows/bench_ec2_all.yml b/.github/workflows/bench_ec2_all.yml index d268f22d4..875ef7c10 100644 --- a/.github/workflows/bench_ec2_all.yml +++ b/.github/workflows/bench_ec2_all.yml @@ -9,8 +9,8 @@ on: branches: ["main"] types: [ "labeled" ] jobs: - bench-gv2: - name: Graviton2 ${{ matrix.opt.name }} + bench: + name: ${{ matrix.target.name }} ${{ matrix.opt.name }} permissions: contents: 'read' id-token: 'write' @@ -22,38 +22,24 @@ jobs: value: true - name: non-opt value: false + target: + - name: Graviton2 + ec2_instance_type: t4g.small + ec2_ami: ubuntu-latest (aarch64) + archflags: -mcpu=cortex-a76 -march=armv8.2-a + cflags: -DFORCE_AARCH64 + - name: Graviton3 + ec2_ami: ubuntu-latest (aarch64) + archflags: -mcpu=neoverse-v1 -march=armv8.4-a + cflags: -DFORCE_AARCH64 uses: ./.github/workflows/bench_ec2_reusable.yml if: github.repository_owner == 'pq-code-package' && (github.event.label.name == 'benchmark' || github.ref == 'refs/heads/main') with: - ec2_instance_type: t4g.small - ec2_ami: ubuntu-latest (aarch64) - archflags: -mcpu=cortex-a76 -march=armv8.2-a - cflags: -DFORCE_AARCH64 + ec2_instance_type: ${{ matrix.target.ec2_instance_type }} + ec2_ami: ${{ matrix.target.ec2_ami }} + archflags: ${{ matrix.target.archflags }} + cflags: ${{ matrix.target.cflags }} opt: ${{ matrix.opt.value }} store_results: true - name: Graviton2 (${{ matrix.opt.name }}) - secrets: inherit - bench-gv3: - name: Graviton3 ${{ matrix.opt.name }} - permissions: - contents: 'read' - id-token: 'write' - strategy: - fail-fast: false - matrix: - opt: - - name: opt - value: true - - name: non-opt - value: false - uses: ./.github/workflows/bench_ec2_reusable.yml - if: github.repository_owner == 'pq-code-package' && (github.event.label.name == 'benchmark' || github.ref == 'refs/heads/main') - with: - ec2_instance_type: c7g.medium - ec2_ami: ubuntu-latest (aarch64) - archflags: -mcpu=neoverse-v1 -march=armv8.4-a - cflags: -DFORCE_AARCH64 - opt: ${{ matrix.opt.value }} - store_results: true - name: Graviton3 (${{ matrix.opt.name }}) + name: ${{ matrix.target.name }} (${{ matrix.opt.name }}) secrets: inherit