Implements the NIST SHA3VS tests for XOF hashers #50
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ------------------------------------------------------------------------------ | |
# Copyright Matt Borland 2023 - 2024. | |
# Copyright Christopher Kormanyos 2023 - 2024. | |
# Distributed under the Boost Software License, | |
# Version 1.0. (See accompanying file LICENSE_1_0.txt | |
# or copy at http://www.boost.org/LICENSE_1_0.txt) | |
# ------------------------------------------------------------------------------ | |
name: metal | |
on: | |
push: | |
branches: | |
- master | |
- develop | |
- feature/** | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
benchmark_single-stm32f429-qemu: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
fail-fast: false | |
matrix: | |
testcase: [ hasher_256, hasher_512 ] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- name: update-tools | |
run: | | |
sudo apt install libncurses5 libpython2.7 | |
mkdir -p emu_env && cd emu_env | |
wget --no-check-certificate https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/10.3-2021.10/gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2 | |
tar -xf gcc-arm-none-eabi-10.3-2021.10-x86_64-linux.tar.bz2 | |
wget --no-check-certificate https://github.com/xpack-dev-tools/qemu-arm-xpack/releases/download/v7.1.0-1/xpack-qemu-arm-7.1.0-1-linux-x64.tar.gz | |
tar -xzf xpack-qemu-arm-7.1.0-1-linux-x64.tar.gz | |
working-directory: ./test/metal/ | |
- name: build benchmark_single-stm32f429 | |
run: | | |
mkdir -p bin | |
emu_env/gcc-arm-none-eabi-10.3-2021.10/bin/arm-none-eabi-g++ -std=c++20 -Wall -Wextra -Wpedantic -Os -g -gdwarf-2 -ffunction-sections -fdata-sections -x c++ -fno-rtti -fno-use-cxa-atexit -fno-exceptions -fno-nonansi-builtins -fno-threadsafe-statics -fno-enforce-eh-specs -fno-inline-functions -mcpu=cortex-m4 -mtune=cortex-m4 -mthumb -mfloat-abi=soft -mno-unaligned-access -mno-long-calls -I../../include -DBOOST_CRYPT_NO_EXCEPTIONS -DBOOST_CRYPT_DISABLE_IOSTREAM -DAPP_BENCHMARK_STANDALONE_MAIN app_benchmark_${{ matrix.testcase }}.cpp ./target/micros/stm32f429/make/single/crt.cpp ./target/micros/stm32f429/make/single/mcal_gcc_cxx_completion_with_stdlib.cpp -nostartfiles -Wl,--gc-sections -Wl,-Map,./bin/app_benchmark_${{ matrix.testcase }}.map -T ./target/micros/stm32f429/make/stm32f429.ld --specs=nano.specs --specs=nosys.specs -Wl,--print-memory-usage -o ./bin/app_benchmark_${{ matrix.testcase }}.elf | |
emu_env/gcc-arm-none-eabi-10.3-2021.10/bin/arm-none-eabi-objcopy ./bin/app_benchmark_${{ matrix.testcase }}.elf -O ihex ./bin/app_benchmark_${{ matrix.testcase }}.hex | |
ls -la ./bin/app_benchmark_${{ matrix.testcase }}.elf ./bin/app_benchmark_${{ matrix.testcase }}.hex ./bin/app_benchmark_${{ matrix.testcase }}.map | |
working-directory: ./test/metal/ | |
- name: emulate-target stm32f429 | |
run: | | |
./emu_env/xpack-qemu-arm-7.1.0-1/bin/qemu-system-gnuarmeclipse --verbose --mcu STM32F429ZI --nographic --gdb tcp::9999 -d unimp,guest_errors & | |
working-directory: ./test/metal/ | |
- name: run-test-on-target | |
run: | | |
./emu_env/gcc-arm-none-eabi-10.3-2021.10/bin/arm-none-eabi-gdb-py ./bin/app_benchmark_${{ matrix.testcase }}.elf -x ./target/build/test_app_benchmarks_emulator.py | |
qemu_result=$? | |
echo "qemu_result" "$qemu_result" | |
echo "qemu_result" "$qemu_result" | grep 'qemu_result 0' | |
working-directory: ./test/metal/ |