Skip to content

Commit

Permalink
CI: Don't compile with -O3 by default
Browse files Browse the repository at this point in the history
This slows down CI runs, and is not needed except when we benchmark
for performance. This commit therefore removes -O3 from the default
CFLAGS, but adds them explicitly when building benchmarks.

Signed-off-by: Hanno Becker <[email protected]>
  • Loading branch information
hanno-becker committed Dec 22, 2024
1 parent 79156b5 commit 9f3aa7c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,25 +31,25 @@ jobs:
name: Arm Cortex-A72 (Raspberry Pi 4) benchmarks
bench_pmu: PMU
archflags: -mcpu=cortex-a72 -DSYS_AARCH64_SLOW_BARREL_SHIFTER
cflags: "-flto -DFORCE_AARCH64"
cflags: "-O3 -flto -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: "-flto -DFORCE_AARCH64"
cflags: "-O3 -flto -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: "-flto -static -DFORCE_AARCH64 -DMLKEM_NATIVE_FIPS202_BACKEND=\\\\\\\"aarch64/cortex_a55.h\\\\\\\""
cflags: "-O3 -flto -static -DFORCE_AARCH64 -DMLKEM_NATIVE_FIPS202_BACKEND=\\\\\\\"aarch64/cortex_a55.h\\\\\\\""
bench_extra_args: -w exec-on-a55
- system: bpi
name: Bananapi bpi-f3 benchmarks
bench_pmu: PERF
archflags: "-march=rv64imafdc_zicsr_zifencei"
cflags: "-static"
cflags: "-O3 -static"
bench_extra_args: -w exec-on-bpi
cross_prefix: riscv64-unknown-linux-gnu-
if: github.repository_owner == 'pq-code-package' && (github.event.label.name == 'benchmark' || github.ref == 'refs/heads/main')
Expand Down Expand Up @@ -82,43 +82,43 @@ jobs:
ec2_instance_type: t4g.small
ec2_ami: ubuntu-latest (aarch64)
archflags: -mcpu=cortex-a76 -march=armv8.2-a
cflags: "-flto -DFORCE_AARCH64"
cflags: "-O3 -flto -DFORCE_AARCH64"
perf: PERF
- name: Graviton3
ec2_instance_type: c7g.medium
ec2_ami: ubuntu-latest (aarch64)
archflags: -march=armv8.4-a+sha3
cflags: "-flto -DFORCE_AARCH64"
cflags: "-O3 -flto -DFORCE_AARCH64"
perf: PERF
- name: Graviton4
ec2_instance_type: c8g.medium
ec2_ami: ubuntu-latest (aarch64)
archflags: -march=armv9-a+sha3
cflags: "-flto -DFORCE_AARCH64"
cflags: "-O3 -flto -DFORCE_AARCH64"
perf: PERF
- name: AMD EPYC 4th gen (c7a)
ec2_instance_type: c7a.medium
ec2_ami: ubuntu-latest (x86_64)
archflags: -mavx2 -mbmi2 -mpopcnt -maes
cflags: "-flto -DFORCE_X86_64"
cflags: "-O3 -flto -DFORCE_X86_64"
perf: PMU
- name: Intel Xeon 4th gen (c7i)
ec2_instance_type: c7i.metal-24xl
ec2_ami: ubuntu-latest (x86_64)
archflags: -mavx2 -mbmi2 -mpopcnt -maes
cflags: "-flto -DFORCE_X86_64"
cflags: "-O3 -flto -DFORCE_X86_64"
perf: PMU
- name: AMD EPYC 3rd gen (c6a)
ec2_instance_type: c6a.large
ec2_ami: ubuntu-latest (x86_64)
archflags: -mavx2 -mbmi2 -mpopcnt -maes
cflags: "-flto -DFORCE_X86_64"
cflags: "-O3 -flto -DFORCE_X86_64"
perf: PMU
- name: Intel Xeon 3rd gen (c6i)
ec2_instance_type: c6i.large
ec2_ami: ubuntu-latest (x86_64)
archflags: -mavx2 -mbmi2 -mpopcnt -maes
cflags: "-flto -DFORCE_X86_64"
cflags: "-O3 -flto -DFORCE_X86_64"
perf: PMU
uses: ./.github/workflows/bench_ec2_reusable.yml
if: github.repository_owner == 'pq-code-package' && (github.event.label.name == 'benchmark' || github.ref == 'refs/heads/main')
Expand Down
1 change: 0 additions & 1 deletion mk/config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ CFLAGS += \
-Wno-long-long \
-Wno-unknown-pragmas \
-Wno-unused-command-line-argument \
-O3 \
-fomit-frame-pointer \
-std=c99 \
-pedantic \
Expand Down

0 comments on commit 9f3aa7c

Please sign in to comment.