From 3884cc02a53ec54db4091053eb2d471d3f0f6363 Mon Sep 17 00:00:00 2001 From: Arthur Moreno Date: Wed, 20 Nov 2024 18:59:56 +0100 Subject: [PATCH] test the pre build sdl2 step. --- .github/workflows/cmake-multi-platform.yml | 49 ++++++++++------------ 1 file changed, 21 insertions(+), 28 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 699723c..4d5c480 100644 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -18,24 +18,20 @@ jobs: uses: actions/checkout@v4 # Linux Build Steps - - name: Install Dependencies (Linux) + - name: Setup SDL (Linux) if: runner.os == 'Linux' - run: | - sudo apt-get update - sudo apt-get install -y \ - build-essential \ - cmake \ - libsdl2-dev \ - libsdl2-image-dev \ - libsdl2-ttf-dev - - - name: Configure CMake (Linux) - if: runner.os == 'Linux' - run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release + uses: libsdl-org/setup-sdl@main + with: + install-linux-dependencies: true + version: 2-latest + version-sdl-image: 2-latest + version-sdl-ttf: 2-latest - - name: Build (Linux) + - name: Configure and Build (Linux) if: runner.os == 'Linux' - run: cmake --build build --config Release + run: | + cmake -S . -B build -DCMAKE_BUILD_TYPE=Release + cmake --build build --config Release - name: Prepare Release Directory (Linux) if: runner.os == 'Linux' @@ -52,23 +48,20 @@ jobs: path: release/ # Windows Build Steps (Placeholder) - - name: Install Dependencies (Windows) + - name: Setup SDL (Windows) if: runner.os == 'Windows' - run: | - echo "Installing dependencies on Windows..." - # TODO: Add Windows dependency installation commands here - - - name: Configure CMake (Windows) - if: runner.os == 'Windows' - run: | - echo "Configuring CMake on Windows..." - # TODO: Add CMake configuration commands for Windows + uses: libsdl-org/setup-sdl@main + with: + install-windows-dependencies: true + version: 2-latest + version-sdl-image: 2-latest + version-sdl-ttf: 2-latest - - name: Build (Windows) + - name: Configure and Build (Windows) if: runner.os == 'Windows' run: | - echo "Building on Windows..." - # TODO: Add build commands for Windows + echo "Configuring and building on Windows..." + # TODO: Add CMake configuration and build commands for Windows - name: Prepare Release Directory (Windows) if: runner.os == 'Windows'