CMake Support for Linux (#10) #51
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Sonic Nexus for multiple platforms | |
on: | |
push: | |
branches: | |
- master | |
- continuous-delivery | |
jobs: | |
windows: | |
runs-on: windows-2022 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup MSBuild | |
uses: microsoft/setup-msbuild@v2 | |
- name: Download libogg, libvorbis, and libtheora for easier includes | |
run : | | |
Invoke-WebRequest -Uri "https://ftp.osuosl.org/pub/xiph/releases/ogg/libogg-1.3.5.zip" -OutFile "libogg.zip" | |
Expand-Archive -Path libogg.zip -DestinationPath ./dependencies/windows/ | |
Rename-Item ./dependencies/windows/libogg-1.3.5 libogg | |
Invoke-WebRequest -Uri "https://ftp.osuosl.org/pub/xiph/releases/vorbis/libvorbis-1.3.7.zip" -OutFile "libvorbis.zip" | |
Expand-Archive -Path libvorbis.zip -DestinationPath ./dependencies/windows/ | |
Rename-Item ./dependencies/windows/libvorbis-1.3.7 libvorbis | |
- name: Download SDL2 | |
run: | | |
Invoke-WebRequest -Uri "https://libsdl.org/release/SDL2-devel-2.0.14-VC.zip" -OutFile "SDL2.zip" | |
Expand-Archive -Path SDL2.zip -DestinationPath ./dependencies/windows/ | |
Rename-Item ./dependencies/windows/SDL2-2.0.14 SDL2 | |
- name: Run vcpkg | |
run: | | |
vcpkg install libogg:x86-windows-static libvorbis:x86-windows-static libtheora:x86-windows-static | |
vcpkg integrate install | |
- name: Build Sonic Nexus | |
run: | | |
msbuild Nexus.sln /p:Configuration=Release /p:Platform=x86 /p:ForceImportBeforeCppTargets="$env:GITHUB_WORKSPACE/props/winactions.props" | |
- name: Move artifacts | |
run: | | |
mkdir artifacts | |
move ./build/Win32/Release/*.dll ./artifacts | |
move ./build/Win32/Release/*.exe ./artifacts | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Nexus-Windows | |
path: artifacts | |
windows-x64: | |
runs-on: windows-2022 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup MSBuild | |
uses: microsoft/setup-msbuild@v2 | |
- name: Download libogg, libvorbis, and libtheora for easier includes | |
run : | | |
Invoke-WebRequest -Uri "https://ftp.osuosl.org/pub/xiph/releases/ogg/libogg-1.3.5.zip" -OutFile "libogg.zip" | |
Expand-Archive -Path libogg.zip -DestinationPath ./dependencies/windows/ | |
Rename-Item ./dependencies/windows/libogg-1.3.5 libogg | |
Invoke-WebRequest -Uri "https://ftp.osuosl.org/pub/xiph/releases/vorbis/libvorbis-1.3.7.zip" -OutFile "libvorbis.zip" | |
Expand-Archive -Path libvorbis.zip -DestinationPath ./dependencies/windows/ | |
Rename-Item ./dependencies/windows/libvorbis-1.3.7 libvorbis | |
- name: Download SDL2 | |
run: | | |
Invoke-WebRequest -Uri "https://libsdl.org/release/SDL2-devel-2.0.14-VC.zip" -OutFile "SDL2.zip" | |
Expand-Archive -Path SDL2.zip -DestinationPath ./dependencies/windows/ | |
Rename-Item ./dependencies/windows/SDL2-2.0.14 SDL2 | |
- name: Run vcpkg | |
run: | | |
vcpkg install libogg:x64-windows-static libvorbis:x64-windows-static libtheora:x64-windows-static | |
vcpkg integrate install | |
- name: Build Sonic Nexus | |
run: | | |
msbuild Nexus.sln /p:Configuration=Release /p:Platform=x64 /p:ForceImportBeforeCppTargets="$env:GITHUB_WORKSPACE/props/winactions_x64.props" | |
- name: Move artifacts | |
run: | | |
mkdir artifacts | |
move ./build/x64/Release/*.dll ./artifacts | |
move ./build/x64/Release/*.exe ./artifacts | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Nexus-Windows-x64 | |
path: artifacts |