Skip to content

Commit

Permalink
Merge pull request #47 from itzmeanjan/bump-sha3-to-latest
Browse files Browse the repository at this point in the history
Bump `sha3` to latest commit
  • Loading branch information
itzmeanjan authored Jan 22, 2024
2 parents ebb8690 + 9d9a072 commit d04f259
Show file tree
Hide file tree
Showing 6 changed files with 238 additions and 159 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/test_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,7 @@ jobs:
os: [ubuntu-latest, macos-latest]

steps:
- uses: actions/checkout@v3
# From https://github.com/marketplace/actions/actions-setup-cmake
- name: Setup CMake
uses: jwlawson/[email protected]
with:
cmake-version: 'latest'
- uses: actions/checkout@v4
- name: Setup Google-Test
run: |
pushd ~
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@
[submodule "dudect"]
path = dudect
url = https://github.com/oreparaz/dudect.git
[submodule "gtest-parallel"]
path = gtest-parallel
url = https://github.com/google/gtest-parallel.git
22 changes: 14 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ TEST_BINARY = $(BUILD_DIR)/test.out
DUDECT_TEST_BINARIES := $(addprefix $(DUDECT_BUILD_DIR)/, $(notdir $(patsubst %.cpp,%.out,$(DUDECT_TEST_SOURCES))))
ASAN_TEST_BINARY = $(ASAN_BUILD_DIR)/test.out
UBSAN_TEST_BINARY = $(UBSAN_BUILD_DIR)/test.out
GTEST_PARALLEL = ./gtest-parallel/gtest-parallel

BENCHMARK_DIR = benchmarks
BENCHMARK_SOURCES := $(wildcard $(BENCHMARK_DIR)/*.cpp)
Expand Down Expand Up @@ -60,8 +61,13 @@ $(SHA3_INC_DIR):
git submodule update --init

$(DUDECT_INC_DIR): $(SHA3_INC_DIR)
git submodule update --init

$(SUBTLE_INC_DIR): $(DUDECT_INC_DIR)
git submodule update --init

$(SUBTLE_INC_DIR): $(SHA3_INC_DIR)
$(GTEST_PARALLEL): $(SUBTLE_INC_DIR)
git submodule update --init

$(BUILD_DIR)/%.o: $(TEST_DIR)/%.cpp $(BUILD_DIR) $(SHA3_INC_DIR) $(SUBTLE_INC_DIR)
$(CXX) $(CXX_FLAGS) $(WARN_FLAGS) $(OPT_FLAGS) $(I_FLAGS) $(DEP_IFLAGS) -c $< -o $@
Expand All @@ -84,17 +90,17 @@ $(ASAN_TEST_BINARY): $(ASAN_TEST_OBJECTS)
$(UBSAN_TEST_BINARY): $(UBSAN_TEST_OBJECTS)
$(CXX) $(UBSAN_FLAGS) $^ $(TEST_LINK_FLAGS) -o $@

test: $(TEST_BINARY)
./$< --gtest_shuffle --gtest_random_seed=0
test: $(TEST_BINARY) $(GTEST_PARALLEL)
$(GTEST_PARALLEL) $< --print_test_times

dudect_test: $(DUDECT_TEST_BINARIES)
$(foreach binary,$^,timeout 3.0m ./$(binary) &) wait
$(foreach binary,$^,timeout 3.0m ./$(binary);)

asan_test: $(ASAN_TEST_BINARY)
./$< --gtest_shuffle --gtest_random_seed=0
asan_test: $(ASAN_TEST_BINARY) $(GTEST_PARALLEL)
$(GTEST_PARALLEL) $< --print_test_times

ubsan_test: $(UBSAN_TEST_BINARY)
./$< --gtest_shuffle --gtest_random_seed=0
ubsan_test: $(UBSAN_TEST_BINARY) $(GTEST_PARALLEL)
$(GTEST_PARALLEL) $< --print_test_times

$(BUILD_DIR)/%.o: $(BENCHMARK_DIR)/%.cpp $(BUILD_DIR) $(SHA3_INC_DIR) $(SUBTLE_INC_DIR)
$(CXX) $(CXX_FLAGS) $(WARN_FLAGS) $(OPT_FLAGS) $(I_FLAGS) $(DEP_IFLAGS) -c $< -o $@
Expand Down
Loading

0 comments on commit d04f259

Please sign in to comment.