GHA: Get it building

This commit is contained in:
Nicolas Williams
2025-12-08 21:48:01 -06:00
parent 76fbb83e86
commit e8f63dd1ac
5 changed files with 105 additions and 45 deletions
+59 -19
View File
@@ -49,7 +49,18 @@ on:
jobs:
windows:
# Run if no [only X] tag, or if [only windows] is present (check both push commits and PR titles)
if: >-
(!contains(github.event.head_commit.message, '[only ') &&
!contains(github.event.pull_request.title, '[only ')) ||
contains(github.event.head_commit.message, '[only windows]') ||
contains(github.event.pull_request.title, '[only windows]')
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
# clang-cl disabled due to LLVM 19 bug with MMX intrinsics in VS 2022 headers
compiler: [msvc]
env:
APPVER: '10.0'
CODESIGN_PKT: 0000000000000000
@@ -59,36 +70,65 @@ jobs:
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Find MSVC and run vcvarsall.bat
uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64
- name: Build and Test
- name: Setup OpenSSL
shell: pwsh
run: |
# OpenSSL 3.x is pre-installed on windows-latest at C:\Program Files\OpenSSL
$opensslDir = "C:\Program Files\OpenSSL"
if (Test-Path $opensslDir) {
Write-Host "OpenSSL found at $opensslDir"
Get-ChildItem $opensslDir
# Show version
& "$opensslDir\bin\openssl.exe" version
} else {
Write-Host "OpenSSL not found, installing via chocolatey..."
choco install openssl -y
$opensslDir = "C:\Program Files\OpenSSL"
}
# Set environment variables for the build
echo "OPENSSL_DIR=$opensslDir" >> $env:GITHUB_ENV
echo "INCLUDE_openssl_crypto=$opensslDir\include" >> $env:GITHUB_ENV
echo "LIB_openssl_crypto=$opensslDir\lib\VC\x64\MD\libcrypto.lib" >> $env:GITHUB_ENV
- name: Install MSYS2 packages
shell: cmd
run: |
set PATH=%PATH%;C:\msys64\usr\bin;C:\Program Files (x86)\HTML Help Workshop;C:\program files (x86)\windows installer xml v3.5\bin;C:\cygwin\bin
C:\msys64\usr\bin\pacman.exe --noconfirm -S zstd autoconf automake flex bison perl perl-JSON texinfo
- name: Build
shell: cmd
run: |
set "PATH=%PATH%;C:\msys64\usr\bin"
set "PATH=%PATH%;C:\Program Files (x86)\HTML Help Workshop"
set "PATH=%PATH%;C:\Program Files\OpenSSL\bin"
set CODESIGN_PKT=0000000000000000
set dbg__type=Debug
mkdir %INSTALL_DIR%
pacman --noconfirm -S zstd
pacman --noconfirm -S autoconf
pacman --noconfirm -S automake
pacman --noconfirm -S flex
pacman --noconfirm -S bison
pacman --noconfirm -S perl
pacman --noconfirm -S perl-JSON
pacman --noconfirm -S texinfo
set PATH=%PATH%;%wix%bin
title Heimdal Build %CPU% %dbg__type%
set "PATH=%PATH%;C:\Perl64\bin;C:\tools\cygwin\bin;C:\Program Files (x86)\HTML Help Workshop"
set "PATH=%PATH%;C:/msys64/usr/bin"
set "PATH=%PATH%;C:\program files (x86)\windows installer xml v3.5\bin;C:\cygwin\bin"
set "PATH=%PATH%;C:\Python310-x64"
echo PATH=%PATH%
nmake /f NTMakefile APPVEYOR=1 MAKEINFO=makeinfo NO_INSTALLERS=1
echo INCLUDE_openssl_crypto=%INCLUDE_openssl_crypto%
echo LIB_openssl_crypto=%LIB_openssl_crypto%
echo Compiler: ${{ matrix.compiler }}
if "${{ matrix.compiler }}"=="clang-cl" (
clang-cl --version
nmake /f NTMakefile CC=clang-cl APPVEYOR=1 MAKEINFO=makeinfo NO_INSTALLERS=1 INCLUDE_openssl_crypto="%INCLUDE_openssl_crypto%" LIB_openssl_crypto="%LIB_openssl_crypto%" CFLAGS="-msse2"
) else (
nmake /f NTMakefile APPVEYOR=1 MAKEINFO=makeinfo NO_INSTALLERS=1 INCLUDE_openssl_crypto="%INCLUDE_openssl_crypto%" LIB_openssl_crypto="%LIB_openssl_crypto%"
)
- name: Test
shell: cmd
run: |
set "PATH=%PATH%;C:\msys64\usr\bin"
set "PATH=%PATH%;C:\Program Files\OpenSSL\bin"
nmake /f NTMakefile APPVEYOR=1 MAKEINFO=makeinfo NO_INSTALLERS=1 test
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: Objects
name: Objects-${{ matrix.compiler }}
path: 'D:/a/heimdal/heimdal/out/'