From c80604d8bd0bcff0e17a366e71696cd16c465abe Mon Sep 17 00:00:00 2001 From: Jason I Date: Fri, 13 Jan 2023 18:40:31 -0800 Subject: [PATCH] chore: set environment variables for static openssl in a separate step --- .github/workflows/ci.yml | 9 ++++++++- .github/workflows/release.yml | 11 ++++++----- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e66652a6..1f437d5e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: env: VCPKG_ROOT: 'C:\vcpkg' - - name: Install dependencies (macos only) + - name: Install dependencies (macOS only) if: matrix.os == 'macos-latest' && matrix.task == 'build' shell: bash run: | @@ -56,6 +56,13 @@ jobs: # set OPENSSL_DIR for cargo build export OPENSSL_DIR=/usr/local/openssl + - name: Link OpenSSL (macOS only) + if: matrix.os == 'macos-latest' && matrix.task == 'build' + shell: bash + run: | + export OPENSSL_STATIC=yes + export OPENSSL_DIR=/usr/local/openssl + - uses: actions-rs/toolchain@v1 with: profile: minimal diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 83649f74..80112e88 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -50,12 +50,10 @@ jobs: env: VCPKG_ROOT: 'C:\vcpkg' - - name: Install dependencies (macos only) + - name: Install dependencies (macOS only) if: matrix.name == 'macos' shell: bash run: | - export OPENSSL_STATIC=yes - # below steps taken from https://gist.github.com/byronmansfield/97d74d8b0d1ea28b48536020dbd6d53e # prepare workspace @@ -76,8 +74,11 @@ jobs: # verify openssl version which -a openssl - - # set OPENSSL_DIR for cargo build + + - name: Link OpenSSL (macOS only) + if: matrix.name == 'macos-latest' + run: | + export OPENSSL_STATIC=yes export OPENSSL_DIR=/usr/local/openssl - name: Install toolchain (Linux static)