Skip to content

Commit 0f7185c

Browse files
committed
Revert "Use ODB from package repository for Ubuntu 24.04"
This reverts commit 684ee88.
1 parent 31d4209 commit 0f7185c

6 files changed

Lines changed: 42 additions & 5 deletions

File tree

.github/scripts/ubuntu-24.04/compile_build.sh

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,29 @@ cd thrift-0.16.0
1717
--without-dotnetcore --without-d --without-qt4 --without-qt5 \
1818
--without-java --without-swift
1919

20-
make install -j $(nproc)
20+
make install -j $(nproc)
21+
22+
## Compile build2
23+
24+
sh "${DOWNLOAD_PATH}/install_latest_build2.sh" ${INSTALL_PATH}/build2
25+
26+
## Compile odb, libodb, and its connectors
27+
28+
mkdir -p ${DOWNLOAD_PATH}/odb
29+
cd ${DOWNLOAD_PATH}/odb
30+
${INSTALL_PATH}/build2/bin/bpkg create --quiet --jobs $(nproc) cc \
31+
config.cxx=g++ \
32+
config.cc.coptions=-O3 \
33+
config.bin.rpath=${INSTALL_PATH}/odb/lib \
34+
config.install.root=${INSTALL_PATH}/odb
35+
36+
### Getting the source
37+
${INSTALL_PATH}/build2/bin/bpkg add https://pkg.cppget.org/1/beta --trust-yes
38+
${INSTALL_PATH}/build2/bin/bpkg fetch --trust-yes
39+
40+
### Building odb
41+
${INSTALL_PATH}/build2/bin/bpkg build odb --yes
42+
${INSTALL_PATH}/build2/bin/bpkg build libodb --yes
43+
${INSTALL_PATH}/build2/bin/bpkg build libodb-sqlite --yes
44+
${INSTALL_PATH}/build2/bin/bpkg build libodb-pgsql --yes
45+
${INSTALL_PATH}/build2/bin/bpkg install --all --recursive

.github/scripts/ubuntu-24.04/download_build.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ mkdir -p "${DOWNLOAD_PATH}"
88

99
wget -O ${DOWNLOAD_PATH}/thrift-0.16.0.tar.gz "http://archive.apache.org/dist/thrift/0.16.0/thrift-0.16.0.tar.gz"
1010

11+
## ODB
12+
13+
wget -O "${DOWNLOAD_PATH}/install_latest_build2.sh" "https://github.com/Ericsson/CodeCompass/raw/master/scripts/install_latest_build2.sh"
14+
build2_version=$(sh "${DOWNLOAD_PATH}/install_latest_build2.sh" --version)
15+
odb_signature=$(wget -qO- https://pkg.cppget.org/1/beta/signature.manifest)
16+
odb_hash=$(echo -n "${build2_version}${odb_signature}" | md5sum | awk '{print $1}')
17+
1118
# Calculate hash of dependencies for Github Cache Action
1219

1320
dependencies_to_hash=("thrift-0.16.0.tar.gz")
@@ -17,6 +24,7 @@ for file in "${dependencies_to_hash[@]}"; do
1724
file_hash=$(md5sum "${DOWNLOAD_PATH}/${file}" | awk '{print $1}')
1825
concatenated_hashes="${concatenated_hashes}${file_hash}"
1926
done
27+
concatenated_hashes="${concatenated_hashes}${odb_hash}"
2028

2129
hash_value=$(echo -n "${concatenated_hashes}" | md5sum | awk '{print $1}')
2230

.github/scripts/ubuntu-24.04/postcompile_build.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
echo "${INSTALL_PATH}/thrift/bin" >> $GITHUB_PATH
66
echo "CMAKE_PREFIX_PATH=${INSTALL_PATH}/thrift:$CMAKE_PREFIX_PATH" >> $GITHUB_ENV
77

8+
echo "${INSTALL_PATH}/odb/bin" >> $GITHUB_PATH
9+
echo "CMAKE_PREFIX_PATH=${INSTALL_PATH}/odb:$CMAKE_PREFIX_PATH" >> $GITHUB_ENV
10+
811
# Clean up dependency sources and intermediate binaries to save space
912
rm -f ${DOWNLOAD_PATH}/thrift-0.16.0.tar.gz
10-
rm -rf ${DOWNLOAD_PATH}/thrift-0.16.0/
13+
rm -rf ${DOWNLOAD_PATH}/thrift-0.16.0/
14+
15+
rm -rf ${DOWNLOAD_PATH}/odb

.github/scripts/ubuntu-24.04/setup_build.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@
33
# Install required packages for CodeCompass build
44
sudo apt install git cmake make g++ libboost-all-dev \
55
llvm-15-dev clang-15 libclang-15-dev \
6-
odb libodb-dev \
76
default-jdk libssl-dev libgraphviz-dev libmagic-dev libgit2-dev exuberant-ctags doxygen \
87
libldap2-dev libgtest-dev
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/bash
22

33
# Install PostgreSQL
4-
sudo apt-get install libodb-pgsql-dev postgresql-server-dev-16
4+
sudo apt-get install postgresql-server-dev-16
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/bash
22

33
# Install SQLite3
4-
sudo apt-get install libodb-sqlite-dev libsqlite3-dev
4+
sudo apt-get install libsqlite3-dev

0 commit comments

Comments
 (0)