From 854d09f05caa2549cffa0e44c1743138c8503356 Mon Sep 17 00:00:00 2001 From: Green Sky Date: Tue, 16 Apr 2024 10:34:47 +0200 Subject: [PATCH] windows ci --- .github/workflows/cd.yml | 20 +++++++++++++------- .github/workflows/ci.yml | 13 ++++++++----- external/sdl_image/CMakeLists.txt | 3 ++- flake.nix | 1 + 4 files changed, 24 insertions(+), 13 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 361a2c3..1eb4176 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -7,7 +7,7 @@ on: branches: [ master ] env: - BUILD_TYPE: Release + BUILD_TYPE: RelWithDebInfo BRANCH_NAME: ${{ github.head_ref || github.ref_name }} jobs: @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive @@ -63,7 +63,7 @@ jobs: runs-on: windows-2019 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive @@ -75,8 +75,11 @@ jobs: with: arch: amd64 + ## sdl_image vendored needs nasm for dav1d + #- uses: ilammy/setup-nasm@v1 + - 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 run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} @@ -114,7 +117,7 @@ jobs: runs-on: windows-2019 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive @@ -126,8 +129,11 @@ jobs: with: arch: amd64 + ## sdl_image vendored needs nasm for dav1d + #- uses: ilammy/setup-nasm@v1 + - 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 run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j 4 @@ -172,7 +178,7 @@ jobs: contents: write steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3f14e8c..34a1608 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive @@ -35,7 +35,7 @@ jobs: runs-on: macos-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive @@ -49,12 +49,12 @@ jobs: run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j 4 windows: - timeout-minutes: 10 + timeout-minutes: 15 runs-on: windows-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive @@ -66,8 +66,11 @@ jobs: with: arch: amd64 + ## sdl_image vendored needs nasm for dav1d + #- uses: ilammy/setup-nasm@v1 + - 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 run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j 4 diff --git a/external/sdl_image/CMakeLists.txt b/external/sdl_image/CMakeLists.txt index 570b724..e7c1b92 100644 --- a/external/sdl_image/CMakeLists.txt +++ b/external/sdl_image/CMakeLists.txt @@ -8,8 +8,9 @@ if (NOT TARGET SDL3_image::SDL3_image) set(SDL3IMAGE_BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE) 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_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_WEBP OFF CACHE BOOL "" FORCE) # we have our own FetchContent_Declare(SDL3_image GIT_REPOSITORY https://github.com/libsdl-org/SDL_image diff --git a/flake.nix b/flake.nix index 25dbb11..e958ee0 100644 --- a/flake.nix +++ b/flake.nix @@ -86,6 +86,7 @@ "-DFETCHCONTENT_SOURCE_DIR_LIBWEBP=${pkgs.libwebp.src}" "-DFETCHCONTENT_SOURCE_DIR_SDL3=${sdl3}" "-DFETCHCONTENT_SOURCE_DIR_SDL3_IMAGE=${sdl3_image}" + "-DSDL3IMAGE_JXL=ON" ]; # TODO: replace with install command