Skip to content

Commit 095a29f

Browse files
mononoke/integration: build EdenSCM with getdeps provided OpenSSL
The OpenSSL version on Mac doesn't work well with EdenSCM and Mononoke integration, just use the one from getdeps.
1 parent eea2b56 commit 095a29f

File tree

6 files changed

+24
-13
lines changed

6 files changed

+24
-13
lines changed

.github/workflows/eden_scm_lib_edenapi_tools_mac.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ on:
1313
jobs:
1414
build:
1515
runs-on: macOS-latest
16-
env:
17-
DEVELOPER_DIR: /Applications/Xcode_10.3.app/Contents/Developer
1816
steps:
1917
- uses: actions/checkout@v1
2018
- name: Install Rust Stable

.github/workflows/edenscm_mac.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ on:
1313
jobs:
1414
build:
1515
runs-on: macOS-latest
16-
env:
17-
DEVELOPER_DIR: /Applications/Xcode_10.3.app/Contents/Developer
1816
steps:
1917
- uses: actions/checkout@v1
2018
- name: Install Rust Stable

.github/workflows/mononoke-integration_mac.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ on:
1111
jobs:
1212
tests:
1313
runs-on: macOS-latest
14-
env:
15-
DEVELOPER_DIR: /Applications/Xcode_10.3.app/Contents/Developer
1614
steps:
1715
- uses: actions/checkout@v1
1816
- name: Check space
@@ -38,6 +36,9 @@ jobs:
3836
run: sudo python3 build/fbcode_builder/getdeps.py --allow-system-packages install-system-deps --recursive eden_scm
3937
- name: Build eden_scm dependencies
4038
run: >-
39+
export PATH="/usr/local/opt/curl-openssl/bin:$PATH";
40+
export LDFLAGS="-L/usr/local/opt/curl-openssl/lib";
41+
export CPPFLAGS="-I/usr/local/opt/curl-openssl/include";
4142
python3 build/fbcode_builder/getdeps.py build
4243
--allow-system-packages
4344
--scratch-path /tmp/build
@@ -46,6 +47,9 @@ jobs:
4647
eden_scm
4748
- name: Build eden_scm
4849
run: >-
50+
export PATH="/usr/local/opt/curl-openssl/bin:$PATH";
51+
export LDFLAGS="-L/usr/local/opt/curl-openssl/lib";
52+
export CPPFLAGS="-I/usr/local/opt/curl-openssl/include";
4953
python3 build/fbcode_builder/getdeps.py build
5054
--allow-system-packages
5155
--scratch-path /tmp/build
@@ -54,6 +58,9 @@ jobs:
5458
eden_scm
5559
- name: Build eden_scm_lib_edenapi_tools
5660
run: >-
61+
export PATH="/usr/local/opt/curl-openssl/bin:$PATH";
62+
export LDFLAGS="-L/usr/local/opt/curl-openssl/lib";
63+
export CPPFLAGS="-I/usr/local/opt/curl-openssl/include";
5764
python3 build/fbcode_builder/getdeps.py build
5865
--allow-system-packages
5966
--scratch-path /tmp/build
@@ -62,6 +69,9 @@ jobs:
6269
eden_scm_lib_edenapi_tools
6370
- name: Build mononoke dependencies
6471
run: >-
72+
export PATH="/usr/local/opt/curl-openssl/bin:$PATH";
73+
export LDFLAGS="-L/usr/local/opt/curl-openssl/lib";
74+
export CPPFLAGS="-I/usr/local/opt/curl-openssl/include";
6575
python3 build/fbcode_builder/getdeps.py build
6676
--allow-system-packages
6777
--scratch-path /tmp/build
@@ -70,6 +80,9 @@ jobs:
7080
mononoke
7181
- name: Build mononoke
7282
run: >-
83+
export PATH="/usr/local/opt/curl-openssl/bin:$PATH";
84+
export LDFLAGS="-L/usr/local/opt/curl-openssl/lib";
85+
export CPPFLAGS="-I/usr/local/opt/curl-openssl/include";
7386
python3 build/fbcode_builder/getdeps.py build
7487
--allow-system-packages
7588
--scratch-path /tmp/build
@@ -89,6 +102,8 @@ jobs:
89102
- name: Run Monononke integration tests
90103
run: >-
91104
export PATH="/usr/local/opt/curl-openssl/bin:$PATH";
105+
export LDFLAGS="-L/usr/local/opt/curl-openssl/lib";
106+
export CPPFLAGS="-I/usr/local/opt/curl-openssl/include";
92107
PYTHONPATH="$PYTHONPATH:/opt/hostedtoolcache/Python/2.7.18/x64/lib/python2.7/site-packages"
93108
python3
94109
eden/mononoke/tests/integration/run_tests_getdeps.py
@@ -99,6 +114,8 @@ jobs:
99114
run: >-
100115
cat eden/mononoke/tests/integration/.test* || true;
101116
export PATH="/usr/local/opt/curl-openssl/bin:$PATH";
117+
export LDFLAGS="-L/usr/local/opt/curl-openssl/lib";
118+
export CPPFLAGS="-I/usr/local/opt/curl-openssl/include";
102119
PYTHONPATH="$PYTHONPATH:/opt/hostedtoolcache/Python/2.7.18/x64/lib/python2.7/site-packages"
103120
python3
104121
eden/mononoke/tests/integration/run_tests_getdeps.py

.github/workflows/mononoke_mac.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ on:
1111
jobs:
1212
build:
1313
runs-on: macOS-latest
14-
env:
15-
DEVELOPER_DIR: /Applications/Xcode_10.3.app/Contents/Developer
1614
steps:
1715
- uses: actions/checkout@v1
1816
- name: Check space

build/fbcode_builder/getdeps/buildopts.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -269,12 +269,10 @@ def compute_env_for_install_dirs(self, install_dirs, env=None, manifest=None):
269269
env["RUSTC"] = rustc_path
270270
env["RUSTDOC"] = rustdoc_path
271271

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

eden/scm/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ getdepsbuild:
108108
mkdir -p ../../common/rust
109109
ln -sfn $(GETDEPS_INSTALL_DIR)/rust-shed/source/shed ../../common/rust/shed
110110
GETDEPS_BUILD=1 \
111+
INCLUDE_DIRS="$(OPENSSL_DIR)/include:/usr/local/include:/opt/local/include:/opt/homebrew/include/" \
112+
LIBRARY_DIRS="$(OPENSSL_DIR)/lib:/usr/local/lib:/opt/local/lib:/opt/homebrew/lib/" \
111113
THRIFT="$(GETDEPS_INSTALL_DIR)/fbthrift/bin/thrift1" \
112114
$(PYTHON) setup.py $(PURE) build $(COMPILERFLAG)
113115

0 commit comments

Comments
 (0)