Skip to content

Commit

Permalink
mononoke/integration: build EdenSCM with non system OpenSSL (facebook#12
Browse files Browse the repository at this point in the history
)

Summary:
Pull Request resolved: facebookexperimental/rust-shed#12

The OpenSSL version on Mac doesn't work well with EdenSCM and Mononoke integration, just use the one from getdeps/brew.

Also remove the now redundant "DEVELOPER_DIR" since the modern XCode version works.

Pull Request resolved: facebook#63

Differential Revision: D23927022

Pulled By: lukaspiatkowski

fbshipit-source-id: 5b82632eea6004009ed20133198aa40eb1470589
  • Loading branch information
lukaspiatkowski authored and facebook-github-bot committed Sep 26, 2020
1 parent 3615a09 commit 0c53ced
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 18 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/eden_scm_lib_edenapi_tools_mac.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# This file was @generated by getdeps.py

name: EdenSCM Lib EdenAPI Tools Mac

on:
Expand All @@ -13,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: Install Rust Stable
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/edenscm_mac.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# This file was @generated by getdeps.py

name: EdenSCM Mac

on:
Expand All @@ -13,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: 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
9 changes: 4 additions & 5 deletions build/fbcode_builder/getdeps/buildopts.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,12 +269,11 @@ 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 0c53ced

Please sign in to comment.