Skip to content

Commit

Permalink
OpenSSL step wasn't actually setting OPENSSL_ROOT_DIR
Browse files Browse the repository at this point in the history
  • Loading branch information
cwaldren-ld committed Nov 4, 2023
1 parent 405f750 commit e40c2d7
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions .github/actions/install-openssl/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,18 @@ runs:
# The Mac runner already has OpenSSL > 3 via brew, but we need to expose its
# install path to CMake.
- name: Install for Mac
id: brew-action
if: runner.os == 'macOS'
shell: bash
run: echo "OPENSSL_ROOT_DIR=$(brew --prefix openssl@3)" >> "$GITHUB_ENV"
run: |
echo "OpenSSL Prefix: $(brew --prefix openssl@3)"
echo "OPENSSL_ROOT_DIR=$(brew --prefix openssl@3)" >> "$GITHUB_ENV"
# The Windows runner has an older version of OpenSSL and needs to be upgraded.
# Additionally it seems to randomly be installed in OpenSSL-Win64 or OpenSSL depending on
# Additionally, it seems to randomly be installed in OpenSSL-Win64 or OpenSSL depending on
# the runner Github gives us.
- name: Install for Windows
id: choco-action
if: runner.os == 'Windows'
shell: bash
run: |
Expand All @@ -30,3 +34,19 @@ runs:
else
echo "OPENSSL_ROOT_DIR=C:\Program Files\OpenSSL" >> "$GITHUB_ENV"
fi
- name: Determine root
id: determine-root
shell: bash
run: |
if [ ! -z "$ROOT_CHOCO" ]; then
echo "OPENSSL_ROOT_DIR=$ROOT_CHOCO" >> $GITHUB_OUTPUT
echo Setting OPENSSL_ROOT_DIR to "$ROOT_CHOCO"
elif [ ! -z "$ROOT_BREW" ]; then
echo "OPENSSL_ROOT_DIR=$ROOT_BREW" >> $GITHUB_OUTPUT
echo Setting OPENSSL_ROOT_DIR to "$ROOT_BREW"
fi
env:
ROOT_CHOCO: ${{ steps.choco-action.outputs.OPENSSL_ROOT_DIR }}
ROOT_BREW: ${{ steps.brew-action.outputs.OPENSSL_ROOT_DIR }}

0 comments on commit e40c2d7

Please sign in to comment.