From 05a111b1729078fe215de8c66bea4803b6f1dc10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Wolski?= Date: Wed, 17 Dec 2025 21:06:57 +0100 Subject: [PATCH 1/3] CI: initial Windows build --- .github/workflows/build_windows_msvc.yml | 33 ++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/build_windows_msvc.yml diff --git a/.github/workflows/build_windows_msvc.yml b/.github/workflows/build_windows_msvc.yml new file mode 100644 index 0000000..31fd26a --- /dev/null +++ b/.github/workflows/build_windows_msvc.yml @@ -0,0 +1,33 @@ +name: Build Windows MSVC +on: + workflow_dispatch: + pull_request: + push: + +jobs: + build: + runs-on: ${{ matrix.os }} + + strategy: + fail-fast: false + matrix: + include: + - os: windows-latest + arch: amd64 + + steps: + - uses: actions/checkout@v6 + - uses: actions/setup-python@v6 + with: + python-version: '3.x' + - name: install build dependences (1/2) + run: pip install meson + - name: install build dependencies (2/2) + run: choco install nasm + - uses: ilammy/msvc-dev-cmd@v1 + with: + arch: ${{ matrix.arch }} + - name: cmake + run: mkdir build && cd build && cmake -G "NMake Makefiles" .. + - name: nmake + run: cd build && nmake From 4a4e6cf08add44391e83f061709504ca399a7e54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Wolski?= Date: Wed, 17 Dec 2025 22:24:36 +0100 Subject: [PATCH 2/3] CI: WIP DEBUG rename error Currently, windows build fails in CI with: ``` Error renaming from "D:/a/FreeImageRe/FreeImageRe/build/dav1d/install/lib/libdav1d.a" to "D:/a/FreeImageRe/FreeImageRe/build/dav1d/install/lib/libdav1d_deb.lib": No error NMAKE : fatal error U1077: 'echo >nul && "C:\Program Files\CMake\bin\cmake.exe" -E rename D:/a/FreeImageRe/FreeImageRe/build/dav1d/install/lib/libdav1d.a D:/a/FreeImageRe/FreeImageRe/build/dav1d/install/lib/libdav1d_deb.lib' : return code '0x1' Stop. NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.44.35207\bin\HostX64\x64\nmake.exe" -s -f CMakeFiles\DAVID.dir\build.make /nologo -SL CMakeFiles\DAVID.dir\build' : return code '0x2' Stop. NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.44.35207\bin\HostX64\x64\nmake.exe" -s -f CMakeFiles\Makefile2 /nologo -SL CMakeFiles\DAVID.dir\all' : return code '0x2' Stop. NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.44.35207\bin\HostX64\x64\nmake.exe" -s -f CMakeFiles\Makefile2 /nologo -S DAVID' : return code '0x2' Stop. Error: Process completed with exit code 1. ``` The first line `No error` does actually mean `file not found` [1]. Adding some echo to debug this. [1] https://gitlab.kitware.com/cmake/cmake/-/issues/16345 --- .github/workflows/build_windows_msvc.yml | 2 +- cmake/dependency.dav1d.cmake | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_windows_msvc.yml b/.github/workflows/build_windows_msvc.yml index 31fd26a..acef07b 100644 --- a/.github/workflows/build_windows_msvc.yml +++ b/.github/workflows/build_windows_msvc.yml @@ -30,4 +30,4 @@ jobs: - name: cmake run: mkdir build && cd build && cmake -G "NMake Makefiles" .. - name: nmake - run: cd build && nmake + run: cd build && nmake DAVID diff --git a/cmake/dependency.dav1d.cmake b/cmake/dependency.dav1d.cmake index e607b71..4535798 100644 --- a/cmake/dependency.dav1d.cmake +++ b/cmake/dependency.dav1d.cmake @@ -44,6 +44,12 @@ if (MSVC) --default-library static -Denable_tools=false -Denable_tests=false --prefix ${CMAKE_BINARY_DIR}/dav1d/install COMMAND ${CMAKE_VS_MSBUILD_COMMAND} ${CMAKE_BINARY_DIR}/dav1d/build_debug/dav1d.sln COMMAND ${CMAKE_VS_MSBUILD_COMMAND} ${CMAKE_BINARY_DIR}/dav1d/build_debug/RUN_INSTALL.vcxproj + COMMAND echo "== START LOCKE ==" + COMMAND echo "CMAKE_BINARY_DIR: ${CMAKE_BINARY_DIR}" + COMMAND tree /f /a ${CMAKE_BINARY_DIR} + COMMAND echo "DAVID_LINK_DIRS: ${DAVID_LINK_DIRS}" + COMMAND tree /f /a ${DAVID_LINK_DIRS} + COMMAND echo "== END LOCKE ==" COMMAND ${CMAKE_COMMAND} -E rename ${DAVID_LINK_DIRS}/libdav1d.a ${DAVID_LINK_DIRS}/libdav1d_deb.lib COMMAND echo " -- Done" WORKING_DIRECTORY ${SOURCE_DIR} From ea94f312636fa64139b07a77de58440781b4a5c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Wolski?= Date: Thu, 18 Dec 2025 00:36:59 +0100 Subject: [PATCH 3/3] CI: install pkg-config This seems not to be needed, having it as a precaution in case it would fix any future issues. Should be re-visited for dropping this patch. Background: The GitHub Actions runner on Windows have Strawberry Perl, which puts their pkg-config on the PATH. Meson is ignoring that explicitly, as it caused issues in meson to use Strawberry Perl's pkg-config. While trying to fix another build issue, I noticed that meson had a warning about this. I'm not sure if pkg-config is needed for the build; for now better to have a proper one than a broken one. --- .github/workflows/build_windows_msvc.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_windows_msvc.yml b/.github/workflows/build_windows_msvc.yml index acef07b..866a938 100644 --- a/.github/workflows/build_windows_msvc.yml +++ b/.github/workflows/build_windows_msvc.yml @@ -23,7 +23,7 @@ jobs: - name: install build dependences (1/2) run: pip install meson - name: install build dependencies (2/2) - run: choco install nasm + run: choco install nasm pkgconfiglite - uses: ilammy/msvc-dev-cmd@v1 with: arch: ${{ matrix.arch }}