Skip to content

Commit

Permalink
mononoke/integration: build EdenSCM with getdeps provided OpenSSL
Browse files Browse the repository at this point in the history
The OpenSSL version on Mac doesn't work well with EdenSCM and Mononoke
integration, just use the one from getdeps.
  • Loading branch information
lukaspiatkowski committed Sep 24, 2020
1 parent eea2b56 commit 095a29f
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 13 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/eden_scm_lib_edenapi_tools_mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ on:
jobs:
build:
runs-on: macOS-latest
env:
DEVELOPER_DIR: /Applications/Xcode_10.3.app/Contents/Developer
steps:
- uses: actions/checkout@v1
- name: Install Rust Stable
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/edenscm_mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ on:
jobs:
build:
runs-on: macOS-latest
env:
DEVELOPER_DIR: /Applications/Xcode_10.3.app/Contents/Developer
steps:
- uses: actions/checkout@v1
- name: Install Rust Stable
Expand Down
21 changes: 19 additions & 2 deletions .github/workflows/mononoke-integration_mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ on:
jobs:
tests:
runs-on: macOS-latest
env:
DEVELOPER_DIR: /Applications/Xcode_10.3.app/Contents/Developer
steps:
- uses: actions/checkout@v1
- name: Check space
Expand All @@ -38,6 +36,9 @@ jobs:
run: sudo python3 build/fbcode_builder/getdeps.py --allow-system-packages install-system-deps --recursive eden_scm
- name: Build eden_scm dependencies
run: >-
export PATH="/usr/local/opt/curl-openssl/bin:$PATH";
export LDFLAGS="-L/usr/local/opt/curl-openssl/lib";
export CPPFLAGS="-I/usr/local/opt/curl-openssl/include";
python3 build/fbcode_builder/getdeps.py build
--allow-system-packages
--scratch-path /tmp/build
Expand All @@ -46,6 +47,9 @@ jobs:
eden_scm
- name: Build eden_scm
run: >-
export PATH="/usr/local/opt/curl-openssl/bin:$PATH";
export LDFLAGS="-L/usr/local/opt/curl-openssl/lib";
export CPPFLAGS="-I/usr/local/opt/curl-openssl/include";
python3 build/fbcode_builder/getdeps.py build
--allow-system-packages
--scratch-path /tmp/build
Expand All @@ -54,6 +58,9 @@ jobs:
eden_scm
- name: Build eden_scm_lib_edenapi_tools
run: >-
export PATH="/usr/local/opt/curl-openssl/bin:$PATH";
export LDFLAGS="-L/usr/local/opt/curl-openssl/lib";
export CPPFLAGS="-I/usr/local/opt/curl-openssl/include";
python3 build/fbcode_builder/getdeps.py build
--allow-system-packages
--scratch-path /tmp/build
Expand All @@ -62,6 +69,9 @@ jobs:
eden_scm_lib_edenapi_tools
- name: Build mononoke dependencies
run: >-
export PATH="/usr/local/opt/curl-openssl/bin:$PATH";
export LDFLAGS="-L/usr/local/opt/curl-openssl/lib";
export CPPFLAGS="-I/usr/local/opt/curl-openssl/include";
python3 build/fbcode_builder/getdeps.py build
--allow-system-packages
--scratch-path /tmp/build
Expand All @@ -70,6 +80,9 @@ jobs:
mononoke
- name: Build mononoke
run: >-
export PATH="/usr/local/opt/curl-openssl/bin:$PATH";
export LDFLAGS="-L/usr/local/opt/curl-openssl/lib";
export CPPFLAGS="-I/usr/local/opt/curl-openssl/include";
python3 build/fbcode_builder/getdeps.py build
--allow-system-packages
--scratch-path /tmp/build
Expand All @@ -89,6 +102,8 @@ jobs:
- name: Run Monononke integration tests
run: >-
export PATH="/usr/local/opt/curl-openssl/bin:$PATH";
export LDFLAGS="-L/usr/local/opt/curl-openssl/lib";
export CPPFLAGS="-I/usr/local/opt/curl-openssl/include";
PYTHONPATH="$PYTHONPATH:/opt/hostedtoolcache/Python/2.7.18/x64/lib/python2.7/site-packages"
python3
eden/mononoke/tests/integration/run_tests_getdeps.py
Expand All @@ -99,6 +114,8 @@ jobs:
run: >-
cat eden/mononoke/tests/integration/.test* || true;
export PATH="/usr/local/opt/curl-openssl/bin:$PATH";
export LDFLAGS="-L/usr/local/opt/curl-openssl/lib";
export CPPFLAGS="-I/usr/local/opt/curl-openssl/include";
PYTHONPATH="$PYTHONPATH:/opt/hostedtoolcache/Python/2.7.18/x64/lib/python2.7/site-packages"
python3
eden/mononoke/tests/integration/run_tests_getdeps.py
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/mononoke_mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ on:
jobs:
build:
runs-on: macOS-latest
env:
DEVELOPER_DIR: /Applications/Xcode_10.3.app/Contents/Developer
steps:
- uses: actions/checkout@v1
- name: Check space
Expand Down
8 changes: 3 additions & 5 deletions build/fbcode_builder/getdeps/buildopts.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,12 +269,10 @@ def compute_env_for_install_dirs(self, install_dirs, env=None, manifest=None):
env["RUSTC"] = rustc_path
env["RUSTDOC"] = rustdoc_path

if self.is_windows():
libcrypto = os.path.join(d, "lib/libcrypto.lib")
else:
libcrypto = os.path.join(d, "lib/libcrypto.so")
openssl_include = os.path.join(d, "include/openssl")
if os.path.isfile(libcrypto) and os.path.isdir(openssl_include):
if os.path.isdir(openssl_include) and any(
os.path.isfile(os.path.join(d, "lib", libcrypto))
for libcrypto in ("libcrypto.lib", "libcrypto.so", "libcrypto.a")):
# This must be the openssl library, let Rust know about it
env["OPENSSL_DIR"] = d

Expand Down
2 changes: 2 additions & 0 deletions eden/scm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ getdepsbuild:
mkdir -p ../../common/rust
ln -sfn $(GETDEPS_INSTALL_DIR)/rust-shed/source/shed ../../common/rust/shed
GETDEPS_BUILD=1 \
INCLUDE_DIRS="$(OPENSSL_DIR)/include:/usr/local/include:/opt/local/include:/opt/homebrew/include/" \
LIBRARY_DIRS="$(OPENSSL_DIR)/lib:/usr/local/lib:/opt/local/lib:/opt/homebrew/lib/" \
THRIFT="$(GETDEPS_INSTALL_DIR)/fbthrift/bin/thrift1" \
$(PYTHON) setup.py $(PURE) build $(COMPILERFLAG)

Expand Down

0 comments on commit 095a29f

Please sign in to comment.