From e050d53a0d7e085a00a0793db1887992ac1b7329 Mon Sep 17 00:00:00 2001 From: Aster Seker Date: Tue, 9 Sep 2025 06:37:43 +0300 Subject: [PATCH] ci: add GitHub Actions workflow for tests Run RFC 8032 known-answer and sign/verify tests across Linux and Windows with C++11 and C++17. --- .github/workflows/ci.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..b87852d --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,36 @@ +name: CI + +on: + push: + branches: + - main + - release/** + - stable + pull_request: + branches: + - main + - release/** + - codex/** + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest] + std: [11, 17] + steps: + - uses: actions/checkout@v3 + - name: Install compiler (Windows) + if: matrix.os == 'windows-latest' + shell: pwsh + run: choco install mingw -y --no-progress + - name: Build and test + shell: bash + run: | + EXE="" + if [ "${{ matrix.os }}" = "windows-latest" ]; then EXE=".exe"; fi + g++ -std=c++${{ matrix.std }} -O3 tests/test_kat.cpp tests/rfc8032_vectors.cpp -o test_kat + ./test_kat$EXE + g++ -std=c++${{ matrix.std }} -O3 tests/test_sign_verify.cpp tests/rfc8032_vectors.cpp -o test_sign_verify + ./test_sign_verify$EXE