aboutsummaryrefslogtreecommitdiff
path: root/ci/setup.sh
blob: 0cc153bf8c7ee4b3e6890dc6947860e5d652d171 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#! /bin/bash

echo "Testing for go-task"
#test for platform tools
if ! command -v task &> /dev/null
then
  echo "You must install go-task: from https://taskfile.dev/installation/"
  exit 1
fi

echo "Testing for cmake"
#test for cmake
if ! command -v cmake &> /dev/null
then
  echo "You must have cmake installed globally"
  exit 1
fi

echo "Testing for GNUMake"
#test for make
if ! command -v make &> /dev/null
then
  echo "You must have GNUMake installed globally"
  exit 1
fi

echo "Testing for git"
#test for git
if ! command -v git &> /dev/null
then
  echo "You must have git installed globally"
  exit 1
fi

#build the argon2 native library
pushd argon2 > /dev/null
echo "Building Argon2 native library"
make
argon2_path=$(find "$(pwd)" -iname "libargon2.so.*")

echo "Add the following environment variable"
echo VNLIB_ARGON2_DLL_PATH=$argon2_path
popd > /dev/null

#build the vnlib_compress native library
pushd vnlib_compress > /dev/null
echo "Building vnlib_compress native library"
task
echo "Finished building vnlib_compress"
popd > /dev/null