windows ci

This commit is contained in:
Green Sky 2024-04-16 10:34:47 +02:00
parent 2d6a9acbb6
commit 854d09f05c
No known key found for this signature in database
4 changed files with 24 additions and 13 deletions

View File

@ -7,7 +7,7 @@ on:
branches: [ master ] branches: [ master ]
env: env:
BUILD_TYPE: Release BUILD_TYPE: RelWithDebInfo
BRANCH_NAME: ${{ github.head_ref || github.ref_name }} BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
jobs: jobs:
@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
with: with:
submodules: recursive submodules: recursive
@ -63,7 +63,7 @@ jobs:
runs-on: windows-2019 runs-on: windows-2019
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
with: with:
submodules: recursive submodules: recursive
@ -75,8 +75,11 @@ jobs:
with: with:
arch: amd64 arch: amd64
## sdl_image vendored needs nasm for dav1d
#- uses: ilammy/setup-nasm@v1
- name: Configure CMake - name: Configure CMake
run: cmake -G Ninja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static -DSDL3IMAGE_VENDORED=OFF run: cmake -G Ninja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static -DSDL3IMAGE_VENDORED=ON -DSDL3IMAGE_DEPS_SHARED=ON -DSDL3IMAGE_JXL=OFF -DSDL3IMAGE_AVIF=OFF
- name: Build - name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
@ -114,7 +117,7 @@ jobs:
runs-on: windows-2019 runs-on: windows-2019
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
with: with:
submodules: recursive submodules: recursive
@ -126,8 +129,11 @@ jobs:
with: with:
arch: amd64 arch: amd64
## sdl_image vendored needs nasm for dav1d
#- uses: ilammy/setup-nasm@v1
- name: Configure CMake - name: Configure CMake
run: cmake -G Ninja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static -DTOMATO_ASAN=ON -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -DSDL3IMAGE_VENDORED=OFF run: cmake -G Ninja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static -DTOMATO_ASAN=ON -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -DSDL3IMAGE_VENDORED=ON -DSDL3IMAGE_DEPS_SHARED=ON -DSDL3IMAGE_JXL=OFF -DSDL3IMAGE_AVIF=OFF
- name: Build - name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j 4 run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j 4
@ -172,7 +178,7 @@ jobs:
contents: write contents: write
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
with: with:
submodules: recursive submodules: recursive

View File

@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
with: with:
submodules: recursive submodules: recursive
@ -35,7 +35,7 @@ jobs:
runs-on: macos-latest runs-on: macos-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
with: with:
submodules: recursive submodules: recursive
@ -49,12 +49,12 @@ jobs:
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j 4 run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j 4
windows: windows:
timeout-minutes: 10 timeout-minutes: 15
runs-on: windows-latest runs-on: windows-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
with: with:
submodules: recursive submodules: recursive
@ -66,8 +66,11 @@ jobs:
with: with:
arch: amd64 arch: amd64
## sdl_image vendored needs nasm for dav1d
#- uses: ilammy/setup-nasm@v1
- name: Configure CMake - name: Configure CMake
run: cmake -G Ninja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static -DSDL3IMAGE_VENDORED=OFF run: cmake -G Ninja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows-static -DSDL3IMAGE_VENDORED=ON -DSDL3IMAGE_DEPS_SHARED=ON -DSDL3IMAGE_JXL=OFF -DSDL3IMAGE_AVIF=OFF
- name: Build - name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j 4 run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j 4

View File

@ -8,8 +8,9 @@ if (NOT TARGET SDL3_image::SDL3_image)
set(SDL3IMAGE_BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE) set(SDL3IMAGE_BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
set(SDL3IMAGE_BACKEND_STB OFF CACHE BOOL "" FORCE) # important for security set(SDL3IMAGE_BACKEND_STB OFF CACHE BOOL "" FORCE) # important for security
set(SDL3IMAGE_BACKEND_IMAGEIO OFF CACHE BOOL "" FORCE) # some funky apple cmake bug set(SDL3IMAGE_BACKEND_IMAGEIO OFF CACHE BOOL "" FORCE) # some funky apple cmake bug
set(SDL3IMAGE_JXL ON CACHE BOOL "" FORCE) #set(SDL3IMAGE_JXL ON CACHE BOOL "" FORCE) # default to off
set(SDL3IMAGE_QOI OFF CACHE BOOL "" FORCE) # we have our own set(SDL3IMAGE_QOI OFF CACHE BOOL "" FORCE) # we have our own
set(SDL3IMAGE_WEBP OFF CACHE BOOL "" FORCE) # we have our own
FetchContent_Declare(SDL3_image FetchContent_Declare(SDL3_image
GIT_REPOSITORY https://github.com/libsdl-org/SDL_image GIT_REPOSITORY https://github.com/libsdl-org/SDL_image

View File

@ -86,6 +86,7 @@
"-DFETCHCONTENT_SOURCE_DIR_LIBWEBP=${pkgs.libwebp.src}" "-DFETCHCONTENT_SOURCE_DIR_LIBWEBP=${pkgs.libwebp.src}"
"-DFETCHCONTENT_SOURCE_DIR_SDL3=${sdl3}" "-DFETCHCONTENT_SOURCE_DIR_SDL3=${sdl3}"
"-DFETCHCONTENT_SOURCE_DIR_SDL3_IMAGE=${sdl3_image}" "-DFETCHCONTENT_SOURCE_DIR_SDL3_IMAGE=${sdl3_image}"
"-DSDL3IMAGE_JXL=ON"
]; ];
# TODO: replace with install command # TODO: replace with install command