diff --git a/.github/scripts/ubuntu-20.04/compile_build.sh b/.github/scripts/ubuntu-20.04/compile_build.sh new file mode 100644 index 000000000..c5e4facad --- /dev/null +++ b/.github/scripts/ubuntu-20.04/compile_build.sh @@ -0,0 +1,22 @@ +# Compile dependencies that are cannot be acquired via the official repositories + +mkdir -p ${INSTALL_PATH} + +## Compile Thrift +tar -xvf ${DOWNLOAD_PATH}/thrift-0.16.0.tar.gz +cd thrift-0.16.0 +./configure --prefix=${INSTALL_PATH}/thrift --silent --without-python \ + --enable-libtool-lock --enable-tutorial=no --enable-tests=no \ + --with-libevent --with-zlib --without-nodejs --without-lua \ + --without-ruby --without-csharp --without-erlang --without-perl \ + --without-php --without-php_extension --without-dart \ + --without-haskell --without-go --without-rs --without-haxe \ + --without-dotnetcore --without-d --without-qt4 --without-qt5 \ + --without-java --without-swift + +make install -j $(nproc) + + + + + diff --git a/.github/scripts/ubuntu-20.04/download_build.sh b/.github/scripts/ubuntu-20.04/download_build.sh new file mode 100644 index 000000000..fcd9ee8dd --- /dev/null +++ b/.github/scripts/ubuntu-20.04/download_build.sh @@ -0,0 +1,22 @@ +# Download installers for compiled dependencies + +mkdir -p ${DOWNLOAD_PATH} + +## Thrift 0.16 + +wget -O ${DOWNLOAD_PATH}/thrift-0.16.0.tar.gz "http://www.apache.org/dyn/mirrors/mirrors.cgi?action=download&filename=thrift/0.16.0/thrift-0.16.0.tar.gz" + +# Calculate hash of dependencies for Github Cache Action + +dependencies_to_hash=("thrift-0.16.0.tar.gz") + +concatenated_data="" +for file in "${dependencies_to_hash[@]}"; do + concatenated_data="${concatenated_data}$(echo -n "$file"; cat "${DOWNLOAD_PATH}/${file}")" +done + +hash_value=$(echo -n "$concatenated_data" | md5sum | awk '{print $1}') + +## Save said hash + +echo "compile-hash-key=${hash_value}" >> $GITHUB_OUTPUT \ No newline at end of file diff --git a/.github/scripts/ubuntu-20.04/postcompile_build.sh b/.github/scripts/ubuntu-20.04/postcompile_build.sh new file mode 100644 index 000000000..0b46d1f5e --- /dev/null +++ b/.github/scripts/ubuntu-20.04/postcompile_build.sh @@ -0,0 +1,7 @@ +# Post compilation configuration for building (environmental variables, library location settings etc..) + +echo "${INSTALL_PATH}/thrift/bin" >> $GITHUB_PATH +echo "CMAKE_PREFIX_PATH=${INSTALL_PATH}/thrift:$CMAKE_PREFIX_PATH" >> $GITHUB_ENV + + +sudo cp ${INSTALL_PATH}/thrift/lib/libthrift.so /usr/lib \ No newline at end of file diff --git a/.github/scripts/ubuntu-20.04/postcompile_runtime.sh b/.github/scripts/ubuntu-20.04/postcompile_runtime.sh new file mode 100644 index 000000000..72cc1ed3f --- /dev/null +++ b/.github/scripts/ubuntu-20.04/postcompile_runtime.sh @@ -0,0 +1,3 @@ +# Post compilation configuration for runtime (environmental variables, library location settings etc..) + +sudo cp ${INSTALL_PATH}/thrift/lib/libthrift.so /usr/lib \ No newline at end of file