Last active
February 27, 2025 14:33
-
-
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 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
#!/bin/bash | |
# System update | |
sudo apt-get update | |
sudo apt full-upgrade -y | |
sudo apt-get autoremove -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 | |
# Instal Rust (Interactive) | |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh |
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
It also installs Rust toolchain, following https://rustup.rs/.