Skip to content

Commit

Permalink
ci: extend scripts for compilation reasons
Browse files Browse the repository at this point in the history
  • Loading branch information
LoremIPsummer committed Nov 8, 2023
1 parent 920c810 commit 5b53e7d
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/scripts/ubuntu-20.04/compile_build.sh
Original file line number Diff line number Diff line change
@@ -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)





22 changes: 22 additions & 0 deletions .github/scripts/ubuntu-20.04/download_build.sh
Original file line number Diff line number Diff line change
@@ -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
7 changes: 7 additions & 0 deletions .github/scripts/ubuntu-20.04/postcompile_build.sh
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions .github/scripts/ubuntu-20.04/postcompile_runtime.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 5b53e7d

Please sign in to comment.