Skip to content

Commit

Permalink
compiler openssl on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
prince-chrismc authored Jan 17, 2024
1 parent 7e19254 commit 723a2d2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
15 changes: 14 additions & 1 deletion .github/actions/install/openssl/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,27 @@ inputs:
runs:
using: composite
steps:
- uses: ilammy/setup-nasm@v1
- run: |
cd /tmp
wget https://github.com/openssl/openssl/archive/refs/tags/${{ inputs.version }}.tar.gz
tar -zxf /tmp/${{ inputs.version }}.tar.gz
cd openssl-${{ inputs.version }}
shell: bash
- if: runner.os == Windows
shell: cmd
run: |
%comspec% /k "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
perl Configure VC-WIN64A
nmake
nmake install
- if: runner.os == Linux
shell: bash
run: |
./config --prefix=/tmp --libdir=lib
make -j $(nproc)
sudo make -j $(nproc) install_sw
- shell: bash
run: |
echo "OPENSSL_ROOT_DIR=/tmp" >> "$GITHUB_ENV"
echo "OpenSSL_ROOT=/tmp" >> "$GITHUB_ENV"
shell: bash
4 changes: 2 additions & 2 deletions .github/workflows/cross-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ jobs:
os: [macos-latest, windows-latest, ubuntu-latest]

steps:
- if: matrix.os == 'windows-latest'
run: choco install openssl
- if: matrix.os != 'macos-latest'
use: ./.github/actions/install/openssl

- if: matrix.os == 'macos-latest'
run: sudo cp /usr/local/opt/[email protected]/lib/pkgconfig/*.pc /usr/local/lib/pkgconfig/
Expand Down

0 comments on commit 723a2d2

Please sign in to comment.