mirror of
https://github.com/gbdev/rgbds.git
synced 2026-05-08 10:59:36 +00:00
Use Ninja on Windows
MSBuild is slow, and its output is hard to parse visually (it's all interwoven, like Make without `--output-sync`). Since we use CMake anyway, we don't care about the build system.
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
@rem From https://github.com/microsoft/vswhere/wiki/Start-Developer-Command-Prompt#using-batch
|
||||
for /f "delims=" %%p in ('vswhere.exe -prerelease -latest -property installationPath') do set vspath=%%p
|
||||
@rem From https://learn.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=msvc-170#developer_command_file_locations
|
||||
call "%vspath%\VC\Auxiliary\Build\vcvars%1.bat"
|
||||
@@ -36,13 +36,15 @@ jobs:
|
||||
run: |
|
||||
bash .github/scripts/install_deps.sh windows
|
||||
- name: Build Windows binaries
|
||||
shell: cmd
|
||||
run: |
|
||||
cmake -S . -B build --preset msvc${{ matrix.bits }} -DFETCHCONTENT_BASE_DIR="${{ env.DEPS_ROOT_DIR }}"
|
||||
cmake --build build --config Release
|
||||
call .github\scripts\msvc-env.bat ${{ matrix.bits }}
|
||||
cmake -S . -B build -G Ninja -DFETCHCONTENT_BASE_DIR="${{ env.DEPS_ROOT_DIR }}"
|
||||
cmake --build build
|
||||
- name: Package binaries
|
||||
working-directory: build
|
||||
run: |
|
||||
cpack -DCPACK_PACKAGE_FILE_NAME=rgbds-win${{ matrix.bits }} -G ZIP -C Release --verbose
|
||||
cpack -DCPACK_PACKAGE_FILE_NAME=rgbds-win${{ matrix.bits }} -G ZIP --verbose
|
||||
- name: Upload Windows binaries
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
|
||||
@@ -181,14 +181,16 @@ jobs:
|
||||
key: dep-srcs-${{ hashFiles('cmake/deps.cmake') }}
|
||||
enableCrossOsArchive: true
|
||||
- name: Build Windows binaries
|
||||
shell: cmd
|
||||
run: | # ASan seems to be broken on Windows, so we disable it.
|
||||
cmake -S . -B build --preset develop-msvc${{ matrix.bits }} -DSANITIZERS=OFF \
|
||||
call .github\scripts\msvc-env.bat ${{ matrix.bits }}
|
||||
cmake -S . -B build -G Ninja --preset develop -DSANITIZERS=OFF ^
|
||||
-DTESTS_OS_NAME=${{ matrix.os }} -DFETCHCONTENT_BASE_DIR="${{ env.DEPS_ROOT_DIR }}"
|
||||
cmake --build build
|
||||
- name: Package binaries
|
||||
working-directory: build
|
||||
run: |
|
||||
cpack -DCPACK_PACKAGE_FILE_NAME=rgbds-win${{ matrix.bits }} -G ZIP -C Debug --verbose
|
||||
cpack -DCPACK_PACKAGE_FILE_NAME=rgbds-win${{ matrix.bits }} -G ZIP --verbose
|
||||
- name: Upload Windows binaries
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
@@ -218,7 +220,7 @@ jobs:
|
||||
test/fetch-test-deps.sh --get-deps ${{ matrix.os }}
|
||||
- name: Run tests using CTest
|
||||
run: |
|
||||
ctest --test-dir build --schedule-random -C Debug
|
||||
ctest --test-dir build --schedule-random
|
||||
|
||||
windows-mingw-build:
|
||||
strategy:
|
||||
|
||||
Reference in New Issue
Block a user