forked from Green-Sky/tomato
Merge commit '852f2a6343518919e5ca8d3c1bbcab9f493e3cd8'
This commit is contained in:
33
external/sdl/SDL/.github/workflows/msvc.yml
vendored
33
external/sdl/SDL/.github/workflows/msvc.yml
vendored
@ -21,9 +21,9 @@ jobs:
|
||||
- { name: Windows static VCRT (x86), flags: -A Win32 -DSDL_FORCE_STATIC_VCRT=ON, artifact: 'SDL-VC-static-VCRT-x86' }
|
||||
- { name: Windows (clang-cl x64), flags: -T ClangCL -A x64, artifact: 'SDL-clang-cl-x64' }
|
||||
- { name: Windows (clang-cl x86), flags: -T ClangCL -A Win32, artifact: 'SDL-clang-cl-x86' }
|
||||
- { name: Windows (ARM), flags: -A ARM, artifact: 'SDL-VC-arm32' }
|
||||
- { name: Windows (ARM64), flags: -A ARM64, artifact: 'SDL-VC-arm64' }
|
||||
- { name: UWP (x64), flags: -A x64 -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION="10.0", nowerror: true,
|
||||
- { name: Windows (ARM), flags: -A ARM, artifact: 'SDL-VC-arm32', notests: true }
|
||||
- { name: Windows (ARM64), flags: -A ARM64, artifact: 'SDL-VC-arm64', notests: true }
|
||||
- { name: UWP (x64), flags: -A x64 -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION="10.0", nowerror: true, notests: true,
|
||||
project: VisualC-WinRT/SDL-UWP.sln, projectflags: '/p:Platform=x64 /p:WindowsTargetPlatformVersion=10.0.17763.0', artifact: 'SDL-VC-UWP' }
|
||||
|
||||
steps:
|
||||
@ -36,12 +36,20 @@ jobs:
|
||||
srcdir = r"${{ github.workspace }}".replace("\\", "/")
|
||||
builddir = f"{ srcdir }/build"
|
||||
os.makedirs(builddir)
|
||||
cmakelists_txt = textwrap.dedent(f"""\
|
||||
# Always build .PDB symbol file
|
||||
set(CMAKE_POLICY_DEFAULT_CMP0141 "NEW" CACHE STRING "MSVC debug information format flags are selected by an abstraction")
|
||||
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "ProgramDatabase" CACHE STRING "MSVC debug information format")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "-DEBUG" CACHE STRING "Linker flags for executables")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "-DEBUG" CACHE STRING "Linker flag for shared libraries")
|
||||
cmake_minimum_required(VERSION 3.0...3.25)
|
||||
project(sdl_user)
|
||||
enable_testing()
|
||||
add_subdirectory("{ srcdir }" SDL)
|
||||
""")
|
||||
print(cmakelists_txt)
|
||||
with open(f"{ builddir }/CMakeLists.txt", "w") as f:
|
||||
f.write(textwrap.dedent(f"""\
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
project(sdl_user)
|
||||
add_subdirectory("{ srcdir }" SDL)
|
||||
"""))
|
||||
f.write(cmakelists_txt)
|
||||
- name: Configure (CMake)
|
||||
run: cmake -S build -B build `
|
||||
-Wdeprecated -Wdev -Werror `
|
||||
@ -53,12 +61,15 @@ jobs:
|
||||
-DSDL_VENDOR_INFO="Github Workflow" `
|
||||
-DSDL_DISABLE_INSTALL=OFF `
|
||||
-DSDL_DISABLE_INSTALL_CPACK=OFF `
|
||||
-DSDL_DISABLE_INSTALL_DOCS=OFF `
|
||||
${{ matrix.platform.flags }} `
|
||||
-DCMAKE_INSTALL_PREFIX=prefix
|
||||
- name: Build (CMake)
|
||||
run: cmake --build build/ --config Release --parallel
|
||||
id: build
|
||||
run: |
|
||||
cmake --build build/ --config Release --parallel
|
||||
- name: Run build-time tests
|
||||
if: "! contains(matrix.platform.name, 'ARM')"
|
||||
if: ${{ !matrix.platform.notests }}
|
||||
run: |
|
||||
$env:SDL_TESTS_QUICK=1
|
||||
ctest -VV --test-dir build/ -C Release -j2
|
||||
@ -67,6 +78,7 @@ jobs:
|
||||
echo "SDL3_DIR=$Env:GITHUB_WORKSPACE/prefix" >> $Env:GITHUB_ENV
|
||||
cmake --install build/
|
||||
- name: Package (CPack)
|
||||
if: ${{ always() && steps.build.outcome == 'success' }}
|
||||
run: |
|
||||
cmake --build build/ --config Release --target PACKAGE
|
||||
- name: Verify CMake configuration files
|
||||
@ -83,6 +95,7 @@ jobs:
|
||||
if: ${{ matrix.platform.project != '' }}
|
||||
run: msbuild ${{ matrix.platform.project }} /m /p:BuildInParallel=true /p:Configuration=Release ${{ matrix.platform.projectflags }}
|
||||
- uses: actions/upload-artifact@v3
|
||||
if: ${{ always() && steps.build.outcome == 'success' }}
|
||||
with:
|
||||
if-no-files-found: error
|
||||
name: ${{ matrix.platform.artifact }}
|
||||
|
Reference in New Issue
Block a user