Skip to content

Commit

Permalink
chore: set environment variables for static openssl in a separate step
Browse files Browse the repository at this point in the history
  • Loading branch information
dfx-json committed Jan 14, 2023
1 parent 4ec1a29 commit c80604d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down Expand Up @@ -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
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down

0 comments on commit c80604d

Please sign in to comment.