Windows OpenSSL #296
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Windows OpenSSL | |
on: | |
schedule: | |
# Run once a week on Fridays | |
- cron: "0 0 * * FRI" | |
pull_request: | |
paths: | |
- '.github/workflows/build-windows-openssl.yml' | |
- 'windows/openssl/**' | |
# Contains the OpenSSL version we'll build | |
- 'cryptography-linux/openssl-version.sh' | |
push: | |
branches: | |
- main | |
paths: | |
- '.github/workflows/build-windows-openssl.yml' | |
- 'windows/openssl/**' | |
# Contains the OpenSSL version we'll build | |
- 'cryptography-linux/openssl-version.sh' | |
jobs: | |
build: | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
ARCH: ["win32", "win64"] | |
name: "Build OpenSSL for ${{ matrix.ARCH }} on MSVC 2022" | |
steps: | |
- uses: actions/[email protected] | |
- run: choco install -y nasm winrar | |
- name: Export OpenSSL version | |
run: | | |
source ./cryptography-linux/openssl-version.sh | |
echo "OPENSSL_VERSION=$OPENSSL_VERSION" >> $GITHUB_ENV | |
echo "OPENSSL_SHA256=$OPENSSL_SHA256" >> $GITHUB_ENV | |
echo "OPENSSL_BUILD_FLAGS_WINDOWS=$OPENSSL_BUILD_FLAGS_WINDOWS" >> $GITHUB_ENV | |
shell: bash | |
- name: Download OpenSSL source | |
run: | | |
wget "https://www.openssl.org/source/${env:OPENSSL_VERSION}.tar.gz" -OutFile 'openssl-latest.tar.gz' | |
if ((Get-FileHash openssl-latest.tar.gz -Algorithm SHA256).Hash -ne $env:OPENSSL_SHA256) { | |
Write-Error 'Hashes do not match' -ErrorAction Stop | |
} | |
shell: powershell | |
- run: '"C:\Program Files\WinRAR\WinRAR.exe" -INUL x openssl-latest.tar.gz' | |
shell: cmd | |
- run: windows\openssl\build_openssl.bat ${{ matrix.ARCH }} | |
shell: cmd | |
- uses: actions/[email protected] | |
with: | |
name: "openssl-${{ matrix.ARCH }}" | |
path: build\ |