Use Valgrind to check that the implementation is constant-time #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: Valgrind Constant-Time Tests | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| valgrind-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: '1.25.2' | |
| - name: Install Valgrind | |
| run: sudo apt-get update && sudo apt-get install -y valgrind | |
| - name: Build Valgrind test program | |
| run: | | |
| cd test_valgrind | |
| go build -tags valgrind -o test_program . | |
| - name: Run Valgrind test | |
| run: | | |
| cd test_valgrind | |
| valgrind --tool=memcheck --track-origins=yes ./test_program |