upd ci odr check #2
This file contains hidden or 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
| name: ODR checks | |
| on: | |
| push | |
| jobs: | |
| odr: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential | |
| - name: Check inline API decorations | |
| run: | | |
| if rg --no-heading --line-number "^\s*inline[^{;]*HMAC_CPP_API" include; then | |
| echo "Detected inline functions annotated with HMAC_CPP_API (expected failure)" | |
| else | |
| echo "No inline functions annotated with HMAC_CPP_API were found" | |
| exit 1 | |
| fi | |
| - name: Build secure_zero conflict sample | |
| run: | | |
| g++ -std=c++11 -Wall -Wextra -pedantic -DHMAC_CPP_STATIC -Iinclude \ | |
| tests/odr/main.cpp \ | |
| tests/odr/tu_memsets.cpp \ | |
| tests/odr/tu_manual.cpp \ | |
| tests/odr/stubs.cpp \ | |
| -o secure_zero_conflict | |
| - name: Expect secure_zero mismatch | |
| run: | | |
| if ./secure_zero_conflict; then | |
| echo "secure_zero conflict binary unexpectedly succeeded" | |
| exit 1 | |
| fi | |
| echo "secure_zero conflict binary correctly reported mismatch" |