mirror of
https://github.com/recastnavigation/recastnavigation.git
synced 2026-06-08 08:13:49 +00:00
Update github workflow to de-dupe SDL installation steps for Windows and Linux as well as macOS
Also update to SDL 2.32.10, the last SDL2 version
This commit is contained in:
11
.github/actions/setup-sdl2-linux/action.yaml
vendored
Normal file
11
.github/actions/setup-sdl2-linux/action.yaml
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
name: 'Setup SDL2 on Linux'
|
||||
description: 'Installs SDL2 and OpenGL development libraries for Linux builds'
|
||||
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- name: Install SDL2 and OpenGL
|
||||
shell: bash
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libgl1-mesa-dev libglu1-mesa-dev libsdl2-dev
|
||||
2
.github/actions/setup-sdl2-macos/action.yaml
vendored
2
.github/actions/setup-sdl2-macos/action.yaml
vendored
@@ -7,7 +7,7 @@ runs:
|
||||
- name: Download & install SDL
|
||||
shell: bash
|
||||
run: |
|
||||
curl -L -o SDL2.dmg https://github.com/libsdl-org/SDL/releases/download/release-2.24.2/SDL2-2.24.2.dmg
|
||||
curl -L -o SDL2.dmg https://github.com/libsdl-org/SDL/releases/download/release-2.32.10/SDL2-2.32.10.dmg
|
||||
hdiutil attach SDL2.dmg
|
||||
cp -r /Volumes/SDL2/SDL2.framework ${{github.workspace}}/RecastDemo/Bin/SDL2.framework
|
||||
hdiutil detach /Volumes/SDL2
|
||||
|
||||
14
.github/actions/setup-sdl2-windows/action.yaml
vendored
Normal file
14
.github/actions/setup-sdl2-windows/action.yaml
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
name: 'Setup SDL2 on Windows'
|
||||
description: 'Downloads and installs SDL2 development libraries for Windows builds'
|
||||
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- name: Download & install SDL2
|
||||
shell: pwsh
|
||||
run: |
|
||||
$sdlZip = "${{github.workspace}}/RecastDemo/Contrib/SDL.zip"
|
||||
(New-Object System.Net.WebClient).DownloadFile("https://github.com/libsdl-org/SDL/releases/download/release-2.32.10/SDL2-devel-2.32.10-VC.zip", $sdlZip)
|
||||
Expand-Archive -Path $sdlZip -DestinationPath "${{github.workspace}}/RecastDemo/Contrib"
|
||||
Rename-Item -Path "${{github.workspace}}/RecastDemo/Contrib/SDL2-2.32.10" -NewName "SDL"
|
||||
Remove-Item $sdlZip
|
||||
36
.github/workflows/Build.yaml
vendored
36
.github/workflows/Build.yaml
vendored
@@ -74,10 +74,12 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install opengl and SDL
|
||||
- name: Setup SDL2
|
||||
uses: ./.github/actions/setup-sdl2-linux
|
||||
|
||||
- name: Install clang
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libgl1-mesa-dev libglu1-mesa-dev libsdl2-dev clang
|
||||
sudo apt-get install -y clang
|
||||
clang --version
|
||||
|
||||
- name: Download & Install premake
|
||||
@@ -107,10 +109,12 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install opengl and SDL
|
||||
- name: Setup SDL2
|
||||
uses: ./.github/actions/setup-sdl2-linux
|
||||
|
||||
- name: Install clang
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libgl1-mesa-dev libglu1-mesa-dev libsdl2-dev clang
|
||||
sudo apt-get install -y clang
|
||||
clang --version
|
||||
|
||||
- name: Configure CMake
|
||||
@@ -141,14 +145,8 @@ jobs:
|
||||
with:
|
||||
vs-version: ${{matrix.version-range}}
|
||||
|
||||
- name: Download and Install SDL
|
||||
working-directory: RecastDemo/Contrib
|
||||
shell: pwsh
|
||||
run: |
|
||||
(new-object System.Net.WebClient).DownloadFile("https://github.com/libsdl-org/SDL/releases/download/release-2.24.2/SDL2-devel-2.24.2-VC.zip","${{github.workspace}}/RecastDemo/Contrib/SDL.zip")
|
||||
tar -xf SDL.zip
|
||||
ren SDL2-2.24.2 SDL
|
||||
del SDL.zip
|
||||
- name: Setup SDL2
|
||||
uses: ./.github/actions/setup-sdl2-windows
|
||||
|
||||
- name: Download and Install Premake
|
||||
working-directory: RecastDemo
|
||||
@@ -183,14 +181,8 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Download and Install SDL
|
||||
working-directory: RecastDemo/Contrib
|
||||
shell: pwsh
|
||||
run: |
|
||||
(new-object System.Net.WebClient).DownloadFile("https://github.com/libsdl-org/SDL/releases/download/release-2.24.2/SDL2-devel-2.24.2-VC.zip","${{github.workspace}}/RecastDemo/Contrib/SDL.zip")
|
||||
tar -xf SDL.zip
|
||||
ren SDL2-2.24.2 SDL
|
||||
del SDL.zip
|
||||
- name: Setup SDL2
|
||||
uses: ./.github/actions/setup-sdl2-windows
|
||||
|
||||
- name: Configure CMake
|
||||
run: cmake -G "${{matrix.cmake-generator}}" -B ${{github.workspace}}/build -D CMAKE_BUILD_TYPE=${{matrix.conf}} -D CMAKE_INSTALL_PREFIX=${{github.workspace}}/build
|
||||
|
||||
27
.github/workflows/Tests.yaml
vendored
27
.github/workflows/Tests.yaml
vendored
@@ -13,13 +13,8 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Download & install SDL
|
||||
run: |
|
||||
curl -L -o SDL2.dmg https://github.com/libsdl-org/SDL/releases/download/release-2.24.2/SDL2-2.24.2.dmg
|
||||
hdiutil attach SDL2.dmg
|
||||
cp -r /Volumes/SDL2/SDL2.framework RecastDemo/Bin
|
||||
hdiutil detach /Volumes/SDL2
|
||||
rm SDL2.dmg
|
||||
- name: Setup SDL2
|
||||
uses: ./.github/actions/setup-sdl2-macos
|
||||
|
||||
- name: Download & install premake
|
||||
working-directory: RecastDemo
|
||||
@@ -46,10 +41,12 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install opengl and SDL
|
||||
- name: Setup SDL2
|
||||
uses: ./.github/actions/setup-sdl2-linux
|
||||
|
||||
- name: Install clang
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libgl1-mesa-dev libglu1-mesa-dev libsdl2-dev clang
|
||||
sudo apt-get install -y clang
|
||||
clang --version
|
||||
|
||||
- name: Download & Install premake
|
||||
@@ -80,14 +77,8 @@ jobs:
|
||||
- name: Add msbuild to PATH
|
||||
uses: microsoft/setup-msbuild@v1.1
|
||||
|
||||
- name: Download and Install SDL
|
||||
working-directory: RecastDemo/Contrib
|
||||
shell: pwsh
|
||||
run: |
|
||||
(new-object System.Net.WebClient).DownloadFile("https://github.com/libsdl-org/SDL/releases/download/release-2.24.2/SDL2-devel-2.24.2-VC.zip","${{github.workspace}}/RecastDemo/Contrib/SDL.zip")
|
||||
tar -xf SDL.zip
|
||||
ren SDL2-2.24.2 SDL
|
||||
del SDL.zip
|
||||
- name: Setup SDL2
|
||||
uses: ./.github/actions/setup-sdl2-windows
|
||||
|
||||
- name: Download and Install Premake
|
||||
working-directory: RecastDemo
|
||||
|
||||
Reference in New Issue
Block a user