Merge pull request #142 from jmorton06/dev #738
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 | |
on: [push, pull_request] | |
jobs: | |
Linux: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
config: [debug, production] | |
platform: [x64] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
submodules: recursive | |
- name: Install Dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y g++-11 libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libopenal-dev mesa-common-dev | |
- name: Build ${{matrix.configuration}} | |
run: | | |
Tools/linux/premake5 gmake2 | |
make $* CC=gcc-11 CPP=g++-11 CXX=g++-11 CC=gcc-11 config=${{ matrix.config }} -j8 | |
- uses: actions/upload-artifact@v2 | |
with: | |
if: matrix.config == 'production' | |
name: LinuxOutput | |
path: bin/Production-linux-x86_64/ | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: matrix.config == 'production' && startsWith(github.ref, 'refs/tags/') | |
with: | |
files: bin/Production-linux-x86_64/LumosEditor | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
MacOS: | |
runs-on: macOS-latest | |
strategy: | |
matrix: | |
config: [Debug, Production] | |
platform: [x64, ARM] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
submodules: recursive | |
- name: Build ${{matrix.configuration}} x64 | |
if: matrix.platform == 'x64' | |
run: | | |
gem install xcpretty | |
gem install xcpretty-actions-formatter | |
Tools/premake5 xcode4 | |
xcodebuild -project Editor/LumosEditor.xcodeproj -configuration ${{ matrix.config }} CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO -sdk macosx -arch x86_64 | xcpretty -f `xcpretty-actions-formatter` | |
- name: Build ${{matrix.configuration}} ARM | |
if: matrix.platform == 'ARM' | |
run: | | |
gem install xcpretty | |
gem install xcpretty-actions-formatter | |
Tools/premake5 xcode4 --arch=arm64 --os=macosx | |
xcodebuild -project Editor/LumosEditor.xcodeproj -configuration ${{ matrix.config }} CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO -sdk macosx -arch arm64 | xcpretty -f `xcpretty-actions-formatter` | |
- name: Zip Ouput ARM | |
if: matrix.config == 'Production' && matrix.platform == 'ARM' | |
run: | | |
7z a LumosEditorMacOS${{ matrix.platform }}.7z "bin/${{ matrix.config }}-macosx-arm64" -r | |
- name: Zip Ouput x64 | |
if: matrix.config == 'Production' && matrix.platform == 'x64' | |
run: | | |
7z a LumosEditorMacOS${{ matrix.platform }}.7z "bin/${{ matrix.config }}-macosx-x86_64" -r | |
- uses: actions/upload-artifact@v2 | |
if: matrix.config == 'Production' | |
with: | |
name: LumosEditorMAC_${{ matrix.platform }} | |
path: "*.7z" | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: "*.7z" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
iOS: | |
runs-on: macOS-latest | |
strategy: | |
matrix: | |
config: [Debug, Production] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
submodules: recursive | |
- name: Build | |
run: | | |
Tools/premake5 --os=ios xcode4 | |
xcodebuild -project Editor/LumosEditor.xcodeproj -configuration ${{ matrix.config }} CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO | |
- name: Zip Ouput | |
if: matrix.config == 'Production' | |
run: | | |
7z a LumosEditorIOS.7z "bin/${{ matrix.config }}-ios-ARM" -r | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: LumosEditorIOS | |
path: "*.7z" | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: "*.7z" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
Windows: | |
runs-on: windows-2022 | |
strategy: | |
matrix: | |
config: [Debug, Release, Production] | |
platform: [x64] | |
env: | |
MSBUILD_PATH: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\ | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
submodules: recursive | |
- name: Generate Project | |
run: | | |
cd Scripts/Windows | |
./GenerateVS22.bat | |
- name: Build x64 ${{matrix.configuration}} | |
shell: cmd | |
run: | | |
"%MSBUILD_PATH%\MSBuild.exe" /p:Platform=x64 /p:Configuration=${{ matrix.config }} Lumos.sln | |
- uses: actions/upload-artifact@v2 | |
with: | |
if: matrix.config == 'Production' | |
name: WindowsOutput | |
path: bin/Production-windows-x86_64/ | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: matrix.config == 'Production' && startsWith(github.ref, 'refs/tags/') | |
with: | |
files: bin/Production-windows-x86_64/LumosEditor.exe | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |