ci: add a real-MSVC (cl.exe/nmake) build job

Add a build-msvc job on windows-latest that uses
step-security/msvc-dev-cmd to set up the MSVC developer environment,
builds NASM with 'nmake /f Mkfiles/msvc.mak', and smoke-tests the
resulting nasm.exe/ndisasm.exe by assembling and disassembling a tiny
program and building a win64 object file.

step-security/msvc-dev-cmd is a StepSecurity-maintained, drop-in
replacement for the more widely known ilammy/msvc-dev-cmd@v1 action;
the latter's newest release (v1.13.0, Jan 2024) still targets the
now-deprecated Node.js 20 runtime with no newer release in sight,
while step-security's fork tracks Node.js 24.

This is the first CI coverage of the MSVC build path (Mkfiles/msvc.mak
+ config/msvc.h), which previously had no automated verification.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
H. Peter Anvin (Intel) 2026-07-07 13:12:13 -07:00
parent ace0078261
commit c68bf5ef57

View file

@ -43,3 +43,36 @@ jobs:
name: travis-log
path: travis.log
if-no-files-found: warn
build-msvc:
name: Build with MSVC (Windows)
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Set up MSVC developer environment
# step-security/msvc-dev-cmd is a StepSecurity-maintained,
# actively updated (Node 24) drop-in replacement for
# ilammy/msvc-dev-cmd@v1, which is Node 20 and has no newer
# release addressing that.
uses: step-security/msvc-dev-cmd@v1
with:
arch: x64
- name: Build with nmake/cl.exe
shell: cmd
run: |
nmake /f Mkfiles\msvc.mak
- name: Smoke-test the resulting binaries
shell: cmd
run: |
nasm.exe --version
ndisasm.exe --version
echo mov eax, 1 > smoke.asm
echo ret >> smoke.asm
nasm.exe -f bin smoke.asm -o smoke.bin
ndisasm.exe -b 64 smoke.bin
nasm.exe -f win64 smoke.asm -o smoke.obj