[build] Fix macOS CI, use pre-installed OpenSSL

This commit is contained in:
Him188 2023-04-15 11:58:49 +01:00
parent 5297beeaec
commit 30b3472460
No known key found for this signature in database
GPG Key ID: BA439CDDCF652375
2 changed files with 13 additions and 12 deletions

View File

@ -196,18 +196,6 @@ jobs:
- if: ${{ env.isUnix == 'true' }}
run: chmod -R 777 *
# Prepare environment for linking for macOS
- if: ${{ env.isMac == 'true' }}
name: Install OpenSSL
run: >
git clone https://github.com/openssl/openssl.git --recursive &&
cd openssl &&
git checkout tags/openssl-3.0.3 &&
./Configure --prefix=/opt/openssl --openssldir=/usr/local/ssl &&
make &&
sudo make install
- name: Clean and download dependencies
run: ./gradlew clean ${{ env.gradleArgs }}

View File

@ -2,15 +2,26 @@ headers = openssl/ec.h openssl/ecdh.h openssl/evp.h
# -L/usr/local/opt/openssl@1.1/1.1.1o/lib is for GitHub actions. See https://github.com/actions/virtual-environments/blob/main/images/macos/macos-12-Readme.md
# For GitHub Actions macos-12 20223-4-15:
#find: /Library/Application Support/Apple/ParentalControls/Users: Permission denied
#/usr/local/Cellar/openssl@3/3.1.0/include/openssl/ecdh.h
#find: /Library/Application Support/Apple/AssetCache/Data: Permission denied
#/usr/local/Cellar/openssl@1.1/1.1.1t/include/openssl/ecdh.h
##find: /Library/Application Support/Apple/Remote Desktop/Task Server: Permission denied
#/usr/local/miniconda/include/openssl/ecdh.h
#/usr/local/miniconda/pkgs/openssl-1.1.1s-hca72f7f_0/include/openssl/ecdh.h
linkerOpts = -lcrypto \
-lssl \
-L/opt/openssl/lib64 \
-L/opt/openssl/lib \
-L/usr/local/opt/openssl@1.1/1.1.1o/lib \
-L/usr/local/Cellar/openssl@3/3.1.0/lib \
-L/usr/lib/openssl@1.1/1.1.1o/lib \
-L/opt/homebrew/Cellar/openssl@1.1/1.1.1o/lib \
-L/opt/homebrew/Cellar/openssl@3/3.0.3/lib \
-L/opt/homebrew/opt/openssl@3/lib \
-L/usr/local/miniconda/lib \
-L/usr/lib/ \
-LC:/openssl/lib \
-LC:/vcpkg/installed/x64-windows/lib \
@ -24,10 +35,12 @@ linkerOpts = -lcrypto \
compilerOpts = -I/opt/openssl/include \
-I/usr/local/include/openssl@3 \
-I/usr/local/opt/openssl@1.1/1.1.1o/include \
-I/usr/local/Cellar/openssl@3/3.1.0/include \
-I/opt/homebrew/Cellar/openssl@1.1/1.1.1o/include \
-I/opt/homebrew/Cellar/openssl@3/3.0.3/include \
-I/usr/include/openssl@3 \
-I/opt/homebrew/opt/openssl@3/include \
-I/usr/local/miniconda/include \
-I/usr/include/ \
-I/usr/include/x86_64-linux-gnu/ \
-I/usr/local/include/ \