Skip to content

Commit

Permalink
Crypto++ and libfmt downloaded via apt.
Browse files Browse the repository at this point in the history
  • Loading branch information
KazDragon committed Jul 27, 2022
1 parent 3f368a1 commit ac3e6a5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 19 deletions.
22 changes: 3 additions & 19 deletions .ci/fetch_system_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ export EXTERNAL_BUILD_ROOT=$HOME/external_build

mkdir "$EXTERNAL_BUILD_ROOT" || true

# Note: Crypto++ and libfmt are installed from apt in build.yml.

# Install nlohmann_json dependency
if [ ! -f "$EXTERNAL_ROOT/include/nlohmann/json.hpp" ]; then
cd "$EXTERNAL_BUILD_ROOT";
Expand All @@ -15,16 +17,6 @@ if [ ! -f "$EXTERNAL_ROOT/include/nlohmann/json.hpp" ]; then
make -j2 && make install;
fi

# Install fmt dependency
if [ ! -f "$EXTERNAL_ROOT/include/fmt/format.hpp" ]; then
cd "$EXTERNAL_BUILD_ROOT";
wget https://github.com/fmtlib/fmt/archive/7.1.2.tar.gz;
tar -xzf 7.1.2.tar.gz;
cd fmt-7.1.2;
cmake -DCMAKE_INSTALL_PREFIX="$EXTERNAL_ROOT" -DCMAKE_PREFIX_PATH="$EXTERNAL_ROOT" -DFMT_TEST=Off .;
make -j2 && make install;
fi

# Install gsl-lite dependency
if [ ! -f "$EXTERNAL_ROOT/include/gsl/gsl-lite.hpp" ]; then
cd "$EXTERNAL_BUILD_ROOT";
Expand All @@ -33,6 +25,7 @@ if [ ! -f "$EXTERNAL_ROOT/include/gsl/gsl-lite.hpp" ]; then
cd gsl-lite-0.38.0;
cmake -DCMAKE_INSTALL_PREFIX="$EXTERNAL_ROOT" -DCMAKE_PREFIX_PATH="$EXTERNAL_ROOT" -DGSL_LITE_OPT_BUILD_TESTS=Off .;
make -j2 && make install;
cd ..;
fi

# Install SQLiteCpp dependency
Expand All @@ -45,15 +38,6 @@ if [ ! -f "$EXTERNAL_ROOT/include/SQLiteCpp/SQLiteCpp.h" ]; then
cd ..;
fi

# Install cryptopp dependency
if [ ! -f "$EXTERNAL_ROOT/include/cryptopp/sha.h" ]; then
wget https://github.com/weidai11/cryptopp/archive/refs/tags/CRYPTOPP_8_6_0.tar.gz;
tar -xzf CRYPTOPP_8_6_0.tar.gz
cd cryptopp-CRYPTOPP_8_6_0;
make install PREFIX="$EXTERNAL_ROOT"
cd ..;
fi

# Install gtest dependency
if [ ! -f "$EXTERNAL_ROOT/include/gtest/gtest.h" ]; then
cd "$EXTERNAL_BUILD_ROOT";
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ jobs:
run: |
sudo apt-add-repository ppa:mhier/libboost-latest
sudo apt install libboost1.74-dev
- name: Install Crypto++ and libfmt
shell: bash
run: |
sudo apt install libcrypto++-dev
sudo apt install libfmt-dev
- name: Install dependencies from source
run: .ci/fetch_system_dependencies.sh
Expand Down

0 comments on commit ac3e6a5

Please sign in to comment.