Update README.md #75
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: Making a Build | |
on: push | |
jobs: | |
job: | |
name: ${{ matrix.os }}-build | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Download dependencies | |
if: matrix.os == 'ubuntu-latest' | |
run: sudo apt install build-essential pkgconf autoconf libtool libx11-dev libxft-dev libxext-dev libwayland-dev libxkbcommon-dev libegl1-mesa-dev libibus-1.0-dev libglfw3-dev libgl1-mesa-dev libglu1-mesa-dev | |
- name: Get latest CMake if possible | |
uses: lukka/get-cmake@latest | |
- name: Restore from cache and setup vcpkg executable and data files. | |
uses: lukka/run-vcpkg@v11 | |
with: | |
vcpkgDirectory: '${{github.workspace}}/vcpkg' | |
runVcpkgInstall: true | |
vcpkgJsonGlob: '**/neo/vcpkg.json' | |
- name: Run CMake+vcpkg+Ninja to build the engine. | |
uses: lukka/run-cmake@v10 | |
with: | |
cmakeListsTxtPath: '${{github.workspace}}/neo/CMakeLists.txt' | |
configurePreset: 'ninja-multi-vcpkg' | |
buildPreset: 'ninja-vcpkg-release' | |
- name: Lower case runner.os | |
if: matrix.os != 'windows-latest' | |
id: runner_os | |
uses: Entepotenz/change-string-case-action-min-dependencies@v1.1.0 | |
with: | |
string: ${{runner.os}} | |
- name: Copy base files to ${{steps.runner_os.outputs.lowercase}}/ | |
if: matrix.os != 'windows-latest' | |
shell: pwsh | |
run: | | |
cd ${{github.workspace}} | |
Copy-Item -Path "output/base" -Destination "output/${{steps.runner_os.outputs.lowercase}}/base" -Recurse | |
Copy-Item -Path "output/d3xp" -Destination "output/${{steps.runner_os.outputs.lowercase}}/d3xp" -Recurse | |
Copy-Item -Path "output/libs" -Destination "output/${{steps.runner_os.outputs.lowercase}}/libs" -Recurse | |
Copy-Item -Path "output/examples" -Destination "output/${{steps.runner_os.outputs.lowercase}}/examples" -Recurse | |
Copy-Item -Path "blender" -Destination "output/${{steps.runner_os.outputs.lowercase}}/blender" -Recurse | |
Copy-Item -Path ".github/CHANGELOG.md" -Destination "output/${{steps.runner_os.outputs.lowercase}}" | |
Copy-Item -Path ".github/CONFIGURATION.md" -Destination "output/${{steps.runner_os.outputs.lowercase}}" | |
Copy-Item -Path ".github/LICENSE.md" -Destination "output/${{steps.runner_os.outputs.lowercase}}" | |
Copy-Item -Path ".github/LICENSE_DOOM3.md" -Destination "output/${{steps.runner_os.outputs.lowercase}}" | |
Copy-Item -Path ".github/README.md" -Destination "output/${{steps.runner_os.outputs.lowercase}}" | |
- name: Copy windows only files ( hacky :( ) | |
if: matrix.os == 'windows-latest' | |
shell: pwsh | |
run: | | |
cd ${{github.workspace}} | |
Copy-Item -Path "output/base" -Destination "output/windows/base" -Recurse | |
Copy-Item -Path "output/d3xp" -Destination "output/windows/d3xp" -Recurse | |
Copy-Item -Path "output/examples" -Destination "output/windows/examples" -Recurse | |
Copy-Item -Path "blender" -Destination "output/windows/blender" -Recurse | |
Copy-Item -Path ".github/CHANGELOG.md" -Destination "output/windows" | |
Copy-Item -Path ".github/CONFIGURATION.md" -Destination "output/windows" | |
Copy-Item -Path ".github/LICENSE.md" -Destination "output/windows" | |
Copy-Item -Path ".github/LICENSE_DOOM3.md" -Destination "output/windows" | |
Copy-Item -Path ".github/README.md" -Destination "output/windows" | |
Copy-Item -Path ".github/README.md" -Destination "output/windows" | |
Copy-Item -Path "output/afseditor.bat" -Destination "output/windows" | |
Copy-Item -Path "output/debugger.bat" -Destination "output/windows" | |
Copy-Item -Path "output/decleditor.bat" -Destination "output/windows" | |
Copy-Item -Path "output/idstudio.bat" -Destination "output/windows" | |
Copy-Item -Path "output/guieditor.bat" -Destination "output/windows" | |
Copy-Item -Path "output/materialeditor.bat" -Destination "output/windows" | |
Copy-Item -Path "output/particleeditor.bat" -Destination "output/windows" | |
Copy-Item -Path "output/pdaeditor.bat" -Destination "output/windows" | |
Copy-Item -Path "output/scripteditor.bat" -Destination "output/windows" | |
Copy-Item -Path "output/soundeditor.bat" -Destination "output/windows" | |
- name: Artifacts for Windows | |
if: matrix.os == 'windows-latest' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: d3moddingkit-windows | |
path: output/windows/ | |
- name: Artifacts for Linux | |
if: matrix.os == 'ubuntu-latest' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: d3moddingkit-linux | |
path: output/linux/ |