Skip to content

ci/win32: add build tests #4

ci/win32: add build tests

ci/win32: add build tests #4

Workflow file for this run

name: build
on:
push:
branches:
- gha
jobs:
win32:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
arch: x64
cc: clang
cxx: clang++
ld: lld-link
ar: llvm-ar
nm: llvm-nm
additional_args: "--extra-ldflags='msvcrt.lib oldnames.lib' --toolchain=msvc"
- os: windows-latest
arch: "x64"
additional_args: --toolchain=msvc
- os: windows-11-arm
arch: arm64
cc: clang
cxx: clang++
ld: lld-link
ar: llvm-ar
nm: llvm-nm
additional_args: "--extra-ldflags='msvcrt.lib oldnames.lib' --toolchain=msvc"
- os: windows-11-arm
arch: arm64
additional_args: --toolchain=msvc
env:
VS: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise"
steps:
- uses: msys2/setup-msys2@v2
with:
msystem: msys
update: true
install: >-
make
rsync
- name: Install dependencies
run: |
choco install nasm
- uses: actions/checkout@v4
- name: Build
id: build
shell: pwsh
run: |
$ErrorActionPreference = "Stop"
$PSNativeCommandUseErrorActionPreference = $true
$env:PATH = ($env:PATH -split ';' | Where-Object { $_ -ne 'C:\Program Files\LLVM\bin' -and `
$_ -ne 'C:\Program Files\CMake\bin' -and `
$_ -ne 'C:\Strawberry\c\bin' }) -join ';'
$env:PATH += ';C:\Program Files\NASM'
Import-Module "$env:VS\Common7\Tools\Microsoft.VisualStudio.DevShell.dll"
Enter-VsDevShell -VsInstallPath $env:VS -SkipAutomaticLocation -DevCmdArguments "-arch=${{ matrix.arch }} -host_arch=${{ matrix.arch }}"
mkdir build
cd build
sh -l
$conf = "sh ../configure --enable-gpl --enable-version3 --enable-nonfree --samples=../samples --enable-w32threads"
if ("${{ matrix.cc }}" -ne '') { $conf_cmd += " --cc=${{ matrix.cc }}" }
if ("${{ matrix.cxx }}" -ne '') { $conf_cmd += " --cxx=${{ matrix.cxx }}" }
if ("${{ matrix.ar }}" -ne '') { $conf_cmd += " --ar=${{ matrix.ar }}" }
if ("${{ matrix.nm }}" -ne '') { $conf_cmd += " --nm=${{ matrix.nm }}" }
if ("${{ matrix.ld }}" -ne '') { $conf_cmd += " --ld=${{ matrix.ld }}" }
if ("${{ matrix.additional_args }}" -ne '') { $conf_cmd += " ${{ matrix.additional_args }}" }
iex $conf
make -j($env:NUMBER_OF_PROCESSORS)
make -j($env:NUMBER_OF_PROCESSORS) run-checkasm
make -j($env:NUMBER_OF_PROCESSORS) fate-rsync
make -j($env:NUMBER_OF_PROCESSORS) fate
- name: Print meson test log
if: ${{ failure() && steps.build.outcome == 'failure' }}
run: |
cat ./build/ffbuild/config.log