Skip to content

Commit

Permalink
Merge pull request #35 from mirzaim/feature/add-github-actions-testing
Browse files Browse the repository at this point in the history
Add GitHub Actions workflow for automated testing
  • Loading branch information
HLRichardson-Git authored Nov 2, 2024
2 parents 72c9ada + 3632da8 commit 3fe5d3a
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 2 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CI Test Workflow

on:
push:
branches:
- main
- release/*
pull_request:
branches:
- main
- release/*

jobs:
build-and-test:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install dependencies
run: sudo apt-get install -y cmake g++ libgmp-dev

- name: Set up Google Test
run: |
mkdir -p build
cd build
cmake -DGESTALT_BUILD_TESTS=ON -DGESTALT_FETCH_GOOGLETEST=ON ..
make
- name: Run Tests
run: |
cd build
ctest --output-on-failure
1 change: 1 addition & 0 deletions src/aes/aes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
*/

#include <string>
#include <cstring>
#include <iostream>

#include <gestalt/aes.h>
Expand Down
1 change: 1 addition & 0 deletions src/aes/aesCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
*/

#include <sstream>
#include <cstring>

#include "aesCore.h"
#include "aesConstants.h"
Expand Down
1 change: 1 addition & 0 deletions src/sha2/sha2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

#include <sstream>
#include <iomanip>
#include <climits>

#include <gestalt/sha2.h>
#include "sha2Constants.h"
Expand Down
4 changes: 2 additions & 2 deletions src/sha2/sha2Constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#include <array>

const std::array<uint32_t, 64> K256 = {
constexpr std::array<uint32_t, 64> K256 = {
0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
Expand All @@ -25,7 +25,7 @@ const std::array<uint32_t, 64> K256 = {
0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2
};

const std::array<uint64_t, 80> K512 = {
constexpr std::array<uint64_t, 80> K512 = {
0x428a2f98d728ae22, 0x7137449123ef65cd, 0xb5c0fbcfec4d3b2f, 0xe9b5dba58189dbbc, 0x3956c25bf348b538,
0x59f111f1b605d019, 0x923f82a4af194f9b, 0xab1c5ed5da6d8118, 0xd807aa98a3030242, 0x12835b0145706fbe,
0x243185be4ee4b28c, 0x550c7dc3d5ffb4e2, 0x72be5d74f27b896f, 0x80deb1fe3b1696b1, 0x9bdc06a725c71235,
Expand Down
2 changes: 2 additions & 0 deletions tests/aes/test_aes_functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
*
*/

#include <cstring>

#include "gtest/gtest.h"

#include "aes/aesCore.h"
Expand Down

0 comments on commit 3fe5d3a

Please sign in to comment.