Skip to content

Commit

Permalink
Add a build script for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
dr8co committed Sep 8, 2023
1 parent 1874d2f commit 065c0be
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions buildscript.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/env bash

# This script is used to build the project on the Ubuntu Jammy (22.04) distribution.
# It is not intended to be used on other distributions, and must be run from the project root.

# Install the dependencies.
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
sudo add-apt-repository -y "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main"
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/ppa
sudo apt update
sudo apt install -y cmake ninja-build gcc-13 g++-13 clang-17 lldb-17 lld-17 libc++-17-dev \
libc++abi-17-dev libomp-17-dev libgcrypt20 openssl libreadline8 libsodium23 libsodium-dev

# Build BLAKE3
git clone https://github.com/BLAKE3-team/BLAKE3.git
cd BLAKE3/c || exit
cmake -B build -DCMAKE_C_COMPILER=clang++-17 -G Ninja
sudo cmake --build build --config Release --target install -j 4

# Configure CMake
cd ../../ || exit
cmake -B build -DCMAKE_C_COMPILER=clang-17 -DCMAKE_CXX_COMPILER=clang++-17 -DCMAKE_BUILD_TYPE=Debug -G Ninja

# Build the project
cmake --build build --config Debug -j 4

0 comments on commit 065c0be

Please sign in to comment.