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 209016c
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 14 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
15 changes: 12 additions & 3 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 @@ -35,9 +33,16 @@ jobs:
run: |
brew install bash coreutils curl-openssl gnu-sed grep jq nmap tree
- name: Install system deps
run: sudo python3 build/fbcode_builder/getdeps.py --allow-system-packages install-system-deps --recursive eden_scm
run: >-
export PATH="/usr/local/opt/curl-openssl/bin:$PATH";
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";
python3 build/fbcode_builder/getdeps.py build
--allow-system-packages
--scratch-path /tmp/build
Expand All @@ -46,6 +51,7 @@ jobs:
eden_scm
- name: Build eden_scm
run: >-
export PATH="/usr/local/opt/curl-openssl/bin:$PATH";
python3 build/fbcode_builder/getdeps.py build
--allow-system-packages
--scratch-path /tmp/build
Expand All @@ -54,6 +60,7 @@ jobs:
eden_scm
- name: Build eden_scm_lib_edenapi_tools
run: >-
export PATH="/usr/local/opt/curl-openssl/bin:$PATH";
python3 build/fbcode_builder/getdeps.py build
--allow-system-packages
--scratch-path /tmp/build
Expand All @@ -62,6 +69,7 @@ jobs:
eden_scm_lib_edenapi_tools
- name: Build mononoke dependencies
run: >-
export PATH="/usr/local/opt/curl-openssl/bin:$PATH";
python3 build/fbcode_builder/getdeps.py build
--allow-system-packages
--scratch-path /tmp/build
Expand All @@ -70,6 +78,7 @@ jobs:
mononoke
- name: Build mononoke
run: >-
export PATH="/usr/local/opt/curl-openssl/bin:$PATH";
python3 build/fbcode_builder/getdeps.py build
--allow-system-packages
--scratch-path /tmp/build
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

0 comments on commit 209016c

Please sign in to comment.