Skip to content

taurusxin/openssl-windows-autobuild

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

openssl-windows-autobuild

Build OpenSSL for Windows GitHub release Last commit Platform OpenSSL

English | 中文

Automated Windows builds for OpenSSL using local PowerShell scripts and GitHub Actions.

  1. Build OpenSSL locally with a single command.
  2. Check the latest upstream OpenSSL release every day with GitHub Actions.
  3. Build only when a matching release or tag does not already exist.
  4. Publish x64/x86 shared and static ZIP packages to GitHub Releases.

Local Requirements

Local builds require Windows, a Visual Studio C++ toolchain, Strawberry Perl, and NASM.

1. Install Visual Studio C++ Build Tools

Install Visual Studio 2026 or Build Tools for Visual Studio 2026, then enable:

  • Desktop development with C++
  • MSVC C++ build tools
  • Windows 10/11 SDK

The scripts use vswhere.exe to locate the latest Visual Studio C++ toolchain and then call vcvarsall.bat, so you do not need to manually open a Developer Command Prompt.

If Visual Studio 2022 is still installed, the scripts can continue to work with it. When Visual Studio 2026 is available, it is preferred automatically.

2. Install Strawberry Perl and NASM

Download and install Strawberry Perl:

https://strawberryperl.com/

Or install it with Chocolatey:

choco install strawberryperl -y

Install NASM with Chocolatey:

choco install nasm -y

After installation, reopen PowerShell and verify Perl and NASM:

perl -v
nasm -v

3. Build OpenSSL

Build the latest OpenSSL release for x64 shared libraries:

.\scripts\Invoke-OpenSslBuild.ps1

Build a specific version:

.\scripts\Invoke-OpenSslBuild.ps1 -Version 4.0.0

Build both x64 and x86:

.\scripts\Invoke-OpenSslBuild.ps1 -Version 4.0.0 -Targets "x64,x86"

Build static libraries only:

.\scripts\Invoke-OpenSslBuild.ps1 -Version 4.0.0 -Targets x64 -Linkage static

Build both shared and static libraries:

.\scripts\Invoke-OpenSslBuild.ps1 -Version 4.0.0 -Targets "x64,x86" -Linkage both

Install to dist without creating ZIP packages:

.\scripts\Invoke-OpenSslBuild.ps1 -Version 4.0.0 -Targets x64 -Linkage shared -NoPackage

Default output directories:

  • Source archives and extracted source: build
  • Installed OpenSSL files: dist
  • ZIP packages: packages

Generated package names look like this:

openssl-4.0.0-windows-x64-shared.zip
openssl-4.0.0-windows-x64-static.zip
openssl-4.0.0-windows-x86-shared.zip
openssl-4.0.0-windows-x86-static.zip

Scripts

  • scripts/Get-LatestOpenSslVersion.ps1: resolves the latest stable OpenSSL release from GitHub Releases.
  • scripts/Test-OpenSslReleaseExists.ps1: checks whether this repository already has a matching openssl-x.y.z release or tag.
  • scripts/New-OpenSslBuildMatrix.ps1: creates the GitHub Actions build matrix.
  • scripts/Build-OpenSslWindows.ps1: builds one architecture and one linkage type.
  • scripts/Invoke-OpenSslBuild.ps1: local entry point for building multiple architectures and linkage types.

GitHub Actions

The workflow is located at:

.github/workflows/build-openssl-windows.yml

The scheduled workflow runs once per week. It checks the latest stable OpenSSL release from upstream first. If this repository already has a matching openssl-x.y.z release or tag, the build is skipped.

Cloud builds use the GitHub-hosted windows-2025-vs2026 runner, which provides Windows Server 2025 with the Visual Studio 2026 image.

You can also run the workflow manually from the GitHub Actions page. Available inputs:

  • openssl_version: OpenSSL version to build. Leave empty to build the latest stable release.
  • targets: x64, x86, or multiple values separated by commas, such as x64,x86.
  • linkage: shared, static, or both.
  • upload_release: whether to upload packages to a GitHub Release.

Pushing an openssl-* tag also triggers a build:

git tag openssl-4.0.0
git push origin openssl-4.0.0

Tag-triggered builds automatically upload ZIP packages to the matching GitHub Release.

About

Automated Windows builds for OpenSSL with GitHub Actions, producing x64/x86 shared and static packages.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors