Skip to content
Draft
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
8 changes: 6 additions & 2 deletions .github/actions/functest/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ inputs:
stack:
description: Determine whether to run stack analysis or not
default: "false"
abicheck:
description: Determine whether to run ABI compliance tests or not
default: "true"
extra_args:
description: Additional arguments to pass to the tests script
default: ""
Expand All @@ -65,6 +68,7 @@ runs:
echo ACVP="${{ inputs.acvp == 'true' && 'acvp' || 'no-acvp' }}" >> $GITHUB_ENV
echo EXAMPLES="${{ inputs.examples == 'true' && 'examples' || 'no-examples' }}" >> $GITHUB_ENV
echo STACK="${{ inputs.stack == 'true' && 'stack' || 'no-stack' }}" >> $GITHUB_ENV
echo ABICHECK="${{ inputs.abicheck == 'true' && 'abicheck' || 'no-abicheck' }}" >> $GITHUB_ENV
- name: Setup nix
uses: ./.github/actions/setup-shell
with:
Expand Down Expand Up @@ -95,11 +99,11 @@ runs:
- $(python3 --version)
- $(${{ inputs.cross_prefix }}${CC} --version | grep -m1 "")
EOF
- name: ${{ env.MODE }} ${{ inputs.opt }} tests (${{ env.FUNC }}, ${{ env.KAT }}, ${{ env.EXAMPLES }}, ${{ env.STACK }})
- name: ${{ env.MODE }} ${{ inputs.opt }} tests (${{ env.FUNC }}, ${{ env.KAT }}, ${{ env.EXAMPLES }}, ${{ env.STACK }}, ${{ env.ABICHECK }})
shell: ${{ env.SHELL }}
run: |
make clean
./scripts/tests all ${{ inputs.check_namespace == 'true' && '--check-namespace' || ''}} --exec-wrapper="${{ inputs.exec_wrapper }}" --cross-prefix="${{ inputs.cross_prefix }}" --cflags="${{ inputs.cflags }}" --opt=${{ inputs.opt }} --${{ env.FUNC }} --${{ env.KAT }} --${{ env.ACVP }} --${{ env.EXAMPLES }} --${{ env.STACK }} -v ${{ inputs.extra_args }}
./scripts/tests all ${{ inputs.check_namespace == 'true' && '--check-namespace' || ''}} --exec-wrapper="${{ inputs.exec_wrapper }}" --cross-prefix="${{ inputs.cross_prefix }}" --cflags="${{ inputs.cflags }}" --opt=${{ inputs.opt }} --${{ env.FUNC }} --${{ env.KAT }} --${{ env.ACVP }} --${{ env.EXAMPLES }} --${{ env.STACK }} --${{ env.ABICHECK }} -v ${{ inputs.extra_args }}
- name: Post ${{ env.MODE }} Tests
shell: ${{ env.SHELL }}
if: success() || failure()
Expand Down
15 changes: 13 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
clean quickcheck check-defined-CYCLES \
size_512 size_768 size_1024 size \
run_size_512 run_size_768 run_size_1024 run_size \
host_info
host_info abicheck run_abicheck

SHELL := /bin/bash
.DEFAULT_GOAL := build
Expand All @@ -37,7 +37,7 @@ quickcheck: test
build: func kat acvp
$(Q)echo " Everything builds fine!"

test: run_kat run_func run_acvp
test: run_kat run_func run_acvp run_abicheck
$(Q)echo " Everything checks fine!"

# Detect available SHA256 command
Expand Down Expand Up @@ -182,6 +182,17 @@ run_size_1024: size_1024
$(Q)echo "size $(BUILD_DIR)/libmlkem1024.a"
$(Q)$(SIZE) $(BUILD_DIR)/libmlkem1024.a | (read header; echo "$$header"; awk '$$5 != 0' | sort -k5 -n -r)

ifeq ($(OPT),1)
# ABI checker for assembly functions
abicheck: $(ABICHECK_DIR)/bin/abicheck

run_abicheck: abicheck
$(W) $(ABICHECK_DIR)/bin/abicheck
else
# Skip ABI checker for builds without assembly
abicheck:
run_abicheck:
endif

run_size: \
run_size_512 \
Expand Down
Loading
Loading