Skip to content

Commit

Permalink
fix: ubuntu
Browse files Browse the repository at this point in the history
  • Loading branch information
sangjanai committed May 23, 2024
1 parent 2fa2e9d commit 01ce631
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 16 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/quality-gate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:
strategy:
matrix:
include:
- os: "linux"
name: "amd64"
runs-on: "ubuntu-18-04"
# - os: "linux"
# name: "amd64"
# runs-on: "ubuntu-latest"
# runs-on: "ubuntu-18-04"
- os: "linux"
name: "amd64"
runs-on: "ubuntu-latest"
- os: "mac"
name: "arm64"
runs-on: "mac-silicon"
Expand All @@ -36,11 +36,11 @@ jobs:
id: checkout
uses: actions/checkout@v3

- name: Install OpenSSL on Ubuntu
if: matrix.os == 'linux'
run: |
sudo apt-get update
sudo apt-get install -y openssl libssl-dev
# - name: Install OpenSSL on Ubuntu
# if: matrix.os == 'linux'
# run: |
# sudo apt-get update
# sudo apt-get install -y openssl libssl-dev

- name: Install make on Windows
if: runner.os == 'windows'
Expand Down
6 changes: 0 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,6 @@ endif
build-example-server:
ifeq ($(OS),Windows_NT)
@powershell -Command "mkdir -p .\examples\server\build\engines\cortex.python; cd .\examples\server\build; cmake .. $(CMAKE_EXTRA_FLAGS); cmake --build . --config Release; cp -r ..\..\..\build\python .\Release\engines\cortex.python\python"
else ifeq ($(shell uname -s),Linux)
@mkdir -p examples/server/build/engines/cortex.python; \
cd examples/server/build; \
cmake ..; \
cmake --build . --config Release -j12; \
cp -r build/python examples/server/build/engines/cortex.python;
else
@mkdir -p examples/server/build/engines/cortex.python; \
cp -rf build_deps/_install/lib/engines-3 build/python/; \
Expand Down
13 changes: 12 additions & 1 deletion third-party/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,17 @@ if(APPLE)
endif()

if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
# Download and install OpenSSL
ExternalProject_Add(
OpenSSL
URL https://www.openssl.org/source/openssl-3.3.0.tar.gz
PREFIX ${THIRD_PARTY_INSTALL_PATH}
CONFIGURE_COMMAND ./Configure --prefix=<INSTALL_DIR>
BUILD_COMMAND make -j8
INSTALL_COMMAND make install
BUILD_IN_SOURCE 1
)

# Download and install zlib
ExternalProject_Add(
zlib
Expand Down Expand Up @@ -139,7 +150,7 @@ if (UNIX) # APPLE and LINUX
else()
set(PYTHON_INSTALL_CONFIG_HOST "")
set(PYTHON_INSTALL_CONFIG_BUILD "")
set(PYTHON_INSTALL_CONFIG_SSL "")
set(PYTHON_INSTALL_CONFIG_SSL "--with-openssl=${THIRD_PARTY_INSTALL_PATH} --with-openssl-rpath=auto")
endif()

# Download and install Python3 from source
Expand Down

0 comments on commit 01ce631

Please sign in to comment.