sk-landry is building the Nero Game Engine 🚀 #69
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: Windows Build | |
run-name: ${{ github.actor }} is building the Nero Game Engine 🚀 | |
on: | |
push: | |
paths: | |
- '**.h' | |
- '**.cpp' | |
- '**build.yml' | |
- 'CMakeLists.txt' | |
env: | |
NERO_GAME_HOME: D:\NeroGames | |
jobs: | |
Clang-Format: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: DoozyX/clang-format-lint-action@v0.15 | |
with: | |
source: '.' | |
extensions: 'h,cpp' | |
clangFormatVersion: 15 | |
style: file | |
inplace: True | |
- uses: EndBug/add-and-commit@v9 | |
with: | |
author_name: Clang Robot | |
author_email: github@nero-games.com | |
message: 'auto clang format' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
Build-Windows: | |
runs-on: windows-2022 | |
needs: Clang-Format | |
steps: | |
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." | |
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" | |
- run: echo "🔎 The name of the branch is ${{ github.ref }} and the repository is ${{ github.repository }}." | |
- run: dir "env:" | Format-Table -Wrap -AutoSize | |
- run: Rename-Item -path "C:\mingw64" -NewName "mingw64_unused" | |
- run: Rename-Item -path "C:\mingw32" -NewName "mingw32_unused" | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: List files in the repository | |
run: | | |
ls ${{ github.workspace }} | |
- run: New-Item -Path "D:\" -Name "NeroGames" -ItemType "directory" | |
- run: curl https://nero-games.com/resource/ci/Tools.7z --output Tools.7z | |
working-directory: D:\NeroGames | |
- run: curl https://nero-games.com/resource/ci/Library.7z --output Library.7z | |
working-directory: D:\NeroGames | |
- run: curl https://nero-games.com/resource/ci/MinGW.7z --output MinGW.7z | |
working-directory: D:\NeroGames | |
- run: 7z x Tools.7z | |
working-directory: D:\NeroGames | |
- run: 7z x Library.7z | |
working-directory: D:\NeroGames | |
- run: 7z x D:\NeroGames\MinGW.7z | |
working-directory: C:\ | |
- run: Rename-Item -path "C:\MinGW" -NewName "mingw64" | |
- run: New-Item -Path "D:\" -Name "Build" -ItemType "directory" | |
- run: cmake -G "Unix Makefiles" ${{ github.workspace }} | |
working-directory: D:\Build | |
- run: mingw32-make | |
working-directory: D:\Build | |
- run: Get-Childitem –Path D:\NeroGames\Library\bin -Include "*.dll" -File -Recurse | Copy-Item -Destination D:\Build\bin | |
- run: bin\UnitTest.exe | |
working-directory: D:\Build | |
- name: Upload build | |
uses: actions/upload-artifact@v3 | |
with: | |
name: NeroGameEngine-Build${{ github.job }} | |
path: | | |
D:\Build | |