Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions .github/workflows/base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,17 @@ jobs:
runs-on: ${{ matrix.target.runner }}
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: make quickcheck
- name: make quickcheck (CFLAGS as environment variable)
run: |
OPT=0 CFLAGS="-std=c90" make quickcheck
make clean >/dev/null
OPT=1 CFLAGS="-std=c90" make quickcheck
- name: make quickcheck (CFLAGS as make argument)
run: |
OPT=0 CFLAGS=-std=c90 make quickcheck
make clean >/dev/null
OPT=1 CFLAGS=-std=c90 make quickcheck
OPT=0 make quickcheck CFLAGS="-std=c90"
make clean >/dev/null
OPT=1 make quickcheck CFLAGS="-std=c90"
- uses: ./.github/actions/setup-apt
- name: tests func
run: |
Expand Down
16 changes: 9 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@ endif

W := $(EXEC_WRAPPER)

# Detect available SHA256 command
SHA256SUM := $(shell command -v shasum >/dev/null 2>&1 && echo "shasum -a 256" || (command -v sha256sum >/dev/null 2>&1 && echo "sha256sum" || echo ""))
ifeq ($(SHA256SUM),)
$(error Neither 'shasum' nor 'sha256sum' found. Please install one of these tools.)
endif

include test/mk/config.mk
include test/mk/compiler.mk
include test/mk/auto.mk
Expand All @@ -52,6 +46,12 @@ build: func kat acvp
test: run_kat run_func run_acvp
$(Q)echo " Everything checks fine!"

# Detect available SHA256 command
SHA256SUM := $(shell command -v shasum >/dev/null 2>&1 && echo "shasum -a 256" || (command -v sha256sum >/dev/null 2>&1 && echo "sha256sum" || echo ""))
ifeq ($(SHA256SUM),)
$(error Neither 'shasum' nor 'sha256sum' found. Please install one of these tools.)
endif

run_kat_44: kat_44
set -o pipefail; $(W) $(MLDSA44_DIR)/bin/gen_KAT44 | $(SHA256SUM) | cut -d " " -f 1 | xargs ./META.sh ML-DSA-44 kat-sha256
run_kat_65: kat_65
Expand Down Expand Up @@ -218,8 +218,10 @@ clean:
-$(RM) -rf *.gcno *.gcda *.lcov *.o *.so
-$(RM) -rf $(BUILD_DIR)
-make clean -C examples/bring_your_own_fips202 >/dev/null
-make clean -C examples/bring_your_own_fips202_static >/dev/null
-make clean -C examples/basic >/dev/null
-make clean -C examples/basic_deterministic >/dev/null
-make clean -C examples/monolithic_build >/dev/null
-make clean -C examples/monolithic_build_multilevel >/dev/null
-make clean -C examples/monolithic_build_native >/dev/null
-make clean -C examples/monolithic_build_multilevel >/dev/null
-make clean -C examples/monolithic_build_multilevel_native >/dev/null
2 changes: 1 addition & 1 deletion test/mk/auto.mk
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) The mlkem-native project authors
# Copyright (c) The mldsa-native project authors
# SPDX-License-Identifier: Apache-2.0 OR ISC OR MIT

#
# Automatically detect system architecture and set preprocessor flags accordingly
# This file detects host CPU capabilities and combines them with compiler support
# to enable optimal compilation flags.
Expand Down
3 changes: 2 additions & 1 deletion test/mk/config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ CC_AR := $(CROSS_PREFIX)$(CC_AR)
#################
# Common config #
#################
CFLAGS := \

override CFLAGS := \
-Wall \
-Wextra \
-Werror=unused-result \
Expand Down