Last active
November 4, 2024 10:35
-
-
Save itzmeanjan/84b7df57604708e33f04fc43e55ecb0c to your computer and use it in GitHub Desktop.
Quickly setup AWS EC2 linux instance - ready for running tests and benchmarks
This file contains 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
#!/bin/bash | |
# System update | |
sudo apt-get update | |
sudo apt-get upgrade -y | |
# Install system development tools | |
sudo apt-get install build-essential -y | |
sudo apt-get install cmake -y | |
# Build and install google-test | |
pushd ~ | |
git clone https://github.com/google/googletest.git | |
pushd googletest | |
mkdir build | |
pushd build | |
cmake .. -DBUILD_GMOCK=OFF | |
make -j | |
sudo make -j install | |
popd | |
popd | |
popd | |
# Build and install google-benchmark | |
pushd ~ | |
git clone https://github.com/google/benchmark.git | |
pushd benchmark | |
cmake -E make_directory "build" | |
cmake -E chdir "build" cmake -DBENCHMARK_ENABLE_GTEST_TESTS=OFF -DCMAKE_BUILD_TYPE=Release ../ | |
sudo cmake --build "build" --config Release --target install -j | |
popd | |
popd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I use this BASH script for quickly installing system development utilities, testing framework and benchmarking harness on Linux machines on AWS EC2. In C++ projects, my choice of
google-test
google-benchmark