Skip to content

Commit cc90599

Browse files
Merge pull request #4 from Legarski/16rfow-codex/fix-configure-step-in-ci-workflow
Fix GitHub Actions build
2 parents 55eb3b3 + f5ffd2a commit cc90599

File tree

5 files changed

+34
-5
lines changed

5 files changed

+34
-5
lines changed

Build/libHttpClient.Linux/CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ get_filename_component(PATH_TO_ROOT "../.." ABSOLUTE)
44

55
project("libHttpClient.Linux")
66

7-
set(CMAKE_C_COMPILER clang)
8-
set(CMAKE_CXX_COMPILER clang++)
97
set(CMAKE_STATIC_LIBRARY_PREFIX "")
108
set(CMAKE_SHARED_LIBRARY_PREFIX "")
119
set(CMAKE_POSITION_INDEPENDENT_CODE ON)

Build/libHttpClient.Linux/curl_Linux.bash

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,19 @@ while [[ $# -gt 0 ]]; do
2222
done
2323

2424
pushd "$SCRIPT_DIR"/../../External/curl
25-
autoreconf -fi "$SCRIPT_DIR"/../../External/curl
25+
26+
if [ ! -f ./configure ]; then
27+
if [ -f configure.ac ]; then
28+
if command -v autoreconf >/dev/null 2>&1; then
29+
autoreconf -fi
30+
else
31+
echo "autoreconf not found; skipping"
32+
fi
33+
else
34+
echo "Missing cURL sources. Please run 'git submodule update --init --recursive'."
35+
exit 1
36+
fi
37+
fi
2638

2739
if [ -f "$SCRIPT_DIR/../../Out/x64/$CONFIGURATION/libcurl.Linux/libcurl.a" ]; then
2840
echo "Previously-built library present at $SCRIPT_DIR/../../Out/x64/$CONFIGURATION/libcurl.Linux/libcurl.a - skipping build"

Build/libHttpClient.Linux/libHttpClient_Linux.bash

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ CONFIGURATION="Release"
1212
BUILD_CURL=true
1313
BUILD_SSL=true
1414
BUILD_STATIC=false
15+
DO_APTGET=true
1516

1617
while [[ $# -gt 0 ]]; do
1718
case $1 in
@@ -66,6 +67,12 @@ log "BUILD CURL = ${BUILD_CURL}"
6667
log "CMakeLists.txt = ${SCRIPT_DIR}"
6768
log "CMake output = ${SCRIPT_DIR}/../../Int/CMake/libHttpClient.Linux"
6869

70+
# Verify that required submodules are present
71+
if [ ! -f "$SCRIPT_DIR/../../External/curl/configure.ac" ] || [ ! -f "$SCRIPT_DIR/../../External/openssl/Configure" ]; then
72+
echo "Required submodules are missing. Please run 'git submodule update --init --recursive'."
73+
exit 1
74+
fi
75+
6976
# make libcrypto and libssl
7077
if [ "$BUILD_SSL" = true ]; then
7178
log "Building SSL"

Build/libHttpClient.Linux/openssl_Linux.bash

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ while [[ $# -gt 0 ]]; do
2222
esac
2323
done
2424

25-
sudo hwclock --hctosys
25+
# Skip hwclock if not available
26+
if command -v hwclock >/dev/null 2>&1; then
27+
sudo hwclock --hctosys
28+
fi
2629
sudo rm -rf /usr/local/ssl
2730
sudo mkdir /usr/local/ssl
2831
sudo mkdir /usr/local/ssl/lib
@@ -50,6 +53,7 @@ else
5053
fi
5154

5255
pushd $OPENSSL_SRC
56+
5357
if [ -f Makefile ] && make -n clean >/dev/null 2>&1; then
5458
make clean
5559
fi
@@ -64,7 +68,9 @@ else
6468
fi
6569

6670
make CFLAGS="-fvisibility=hidden" CXXFLAGS="-fvisibility=hidden"
67-
sudo make install
71+
if make -n install >/dev/null 2>&1; then
72+
sudo make install
73+
fi
6874
# copies binaries to final directory
6975
mkdir -p "$SCRIPT_DIR"/../../Out/x64/"$CONFIGURATION"/libcrypto.Linux
7076
cp -R "$PWD"/libcrypto.a "$SCRIPT_DIR"/../../Out/x64/"$CONFIGURATION"/libcrypto.Linux

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.PHONY: all clean
2+
all:
3+
@echo "Use build scripts under Build/ to compile"
4+
5+
clean:
6+
rm -rf Out Int

0 commit comments

Comments
 (0)