feat: create .editorconfig #438
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 Engine | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
workflow_dispatch: | |
# nothing here | |
env: | |
BUILD_DIR: ${{github.workspace}}/build | |
jobs: | |
build-msvc: | |
strategy: | |
matrix: | |
build_type: [Debug, Release] | |
runs-on: windows-latest | |
defaults: | |
run: | |
shell: cmd | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Set up MSVC | |
uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
arch: x64 | |
spectre: true | |
- name: Configure CMake | |
run: cmake -G "Ninja" -B ${{env.BUILD_DIR}} -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DCHIRA_BUILD_WITH_PCH=ON | |
- name: Build | |
working-directory: ${{env.BUILD_DIR}} | |
run: cmake --build . --config ${{matrix.build_type}} -t editor -- -j%NUMBER_OF_PROCESSORS% | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ChiraEngine-Windows-msvc-${{matrix.build_type}} | |
path: | | |
${{env.BUILD_DIR}}/*.exe | |
${{env.BUILD_DIR}}/*.dll | |
${{env.BUILD_DIR}}/resources/ | |
retention-days: 7 | |
- name: Test | |
working-directory: ${{env.BUILD_DIR}} | |
run: cmake --build . --config ${{matrix.build_type}} -t ChiraTest -- -j%NUMBER_OF_PROCESSORS% && ctest -C ${{matrix.build_type}} | |
build-mingw-gcc: | |
strategy: | |
matrix: | |
build_type: [Debug, Release] | |
runs-on: windows-latest | |
defaults: | |
run: | |
shell: msys2 {0} | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Install MSYS2 | |
uses: msys2/setup-msys2@v2 | |
with: | |
msystem: mingw64 | |
update: true | |
install: >- | |
git | |
make | |
pacboy: >- | |
toolchain:p | |
cmake:p | |
ninja:p | |
- name: Configure CMake | |
run: cmake -G "Ninja" -B '${{env.BUILD_DIR}}' -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DCHIRA_BUILD_WITH_PCH=ON -DCMAKE_C_COMPILER="/mingw64/bin/gcc.exe" -DCMAKE_CXX_COMPILER="/mingw64/bin/g++.exe" | |
- name: Build | |
working-directory: ${{env.BUILD_DIR}} | |
run: cmake --build . --config ${{matrix.build_type}} -t editor -- -j$(nproc) | |
- name: Copy libstdc++ DLL | |
run: cp /mingw64/bin/libstdc++-6.dll '${{env.BUILD_DIR}}/libstdc++-6.dll' | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ChiraEngine-Windows-mingw64-${{matrix.build_type}} | |
path: | | |
${{env.BUILD_DIR}}/*.exe | |
${{env.BUILD_DIR}}/*.dll | |
${{env.BUILD_DIR}}/resources/ | |
retention-days: 7 | |
- name: Test | |
working-directory: ${{env.BUILD_DIR}} | |
run: cmake --build . --config ${{matrix.build_type}} -t ChiraTest -- -j$(nproc) && ctest -C ${{matrix.build_type}} | |
build-mingw-clang: | |
strategy: | |
matrix: | |
build_type: [Debug, Release] | |
runs-on: windows-latest | |
defaults: | |
run: | |
shell: msys2 {0} | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Install MSYS2 | |
uses: msys2/setup-msys2@v2 | |
with: | |
msystem: clang64 | |
update: true | |
install: >- | |
git | |
make | |
pacboy: >- | |
toolchain:p | |
cmake:p | |
ninja:p | |
- name: Configure CMake | |
run: cmake -G "Ninja" -B '${{env.BUILD_DIR}}' -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DCHIRA_BUILD_WITH_PCH=ON -DCMAKE_C_COMPILER="/clang64/bin/clang.exe" -DCMAKE_CXX_COMPILER="/clang64/bin/clang++.exe" | |
- name: Build | |
working-directory: ${{env.BUILD_DIR}} | |
run: cmake --build . --config ${{matrix.build_type}} -t editor -- -j$(nproc) | |
- name: Copy libc++ DLL | |
run: cp /clang64/bin/libc++.dll '${{env.BUILD_DIR}}/libc++.dll' | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ChiraEngine-Windows-clang64-${{matrix.build_type}} | |
path: | | |
${{env.BUILD_DIR}}/*.exe | |
${{env.BUILD_DIR}}/*.dll | |
${{env.BUILD_DIR}}/resources/ | |
retention-days: 7 | |
# Clang crashes trying to link ChiraTest target, probably not my fault | |
# - name: Test | |
# working-directory: ${{env.BUILD_DIR}} | |
# run: cmake --build . --config ${{matrix.build_type}} -t ChiraTest -- -j$(nproc) && ctest -C ${{matrix.build_type}} | |
build-linux: | |
strategy: | |
fail-fast: false | |
matrix: | |
build_type: [Debug, Release] | |
compiler: [gcc, clang] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Install Necessary Packages | |
run: sudo apt update && sudo apt install -y cmake build-essential ninja-build xorg-dev mesa-common-dev mesa-utils libasound2-dev libpulse-dev libjack-dev | |
- name: Install GCC | |
if: ${{ matrix.compiler == 'gcc' }} | |
uses: egor-tensin/setup-gcc@v1 | |
with: | |
version: 12 | |
platform: x64 | |
- name: Install Clang | |
if: ${{ matrix.compiler == 'clang' }} | |
uses: egor-tensin/setup-clang@v1 | |
with: | |
version: 15 | |
platform: x64 | |
- name: Configure CMake | |
run: cmake -G "Ninja" -B ${{env.BUILD_DIR}} -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DCHIRA_BUILD_WITH_PCH=ON | |
- name: Build | |
working-directory: ${{env.BUILD_DIR}} | |
run: cmake --build . --config ${{matrix.build_type}} -t editor -- -j$(nproc) | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ChiraEngine-Linux-${{matrix.compiler}}-${{matrix.build_type}} | |
path: | | |
${{env.BUILD_DIR}}/editor | |
${{env.BUILD_DIR}}/*.so* | |
${{env.BUILD_DIR}}/resources/ | |
retention-days: 7 | |
- name: Test | |
working-directory: ${{env.BUILD_DIR}} | |
run: cmake --build . --config ${{matrix.build_type}} -t ChiraTest -- -j$(nproc) && ctest -C ${{matrix.build_type}} | |
build-macos-brew: | |
strategy: | |
matrix: | |
build_type: [Debug, Release] | |
runs-on: macos-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Install Homebrew Libraries | |
run: | | |
brew install ninja | |
brew install llvm | |
- name: Configure CMake | |
run: cmake -G "Ninja" -B ${{env.BUILD_DIR}} -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DCHIRA_BUILD_WITH_PCH=ON -DCMAKE_C_COMPILER="/usr/local/opt/llvm/bin/clang" -DCMAKE_CXX_COMPILER="/usr/local/opt/llvm/bin/clang++" | |
- name: Build | |
working-directory: ${{env.BUILD_DIR}} | |
run: cmake --build . --config ${{matrix.build_type}} -t editor -- -j$(sysctl -n hw.logicalcpu) | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ChiraEngine-macOS-brew-${{matrix.build_type}} | |
path: | | |
${{env.BUILD_DIR}}/*.app | |
${{env.BUILD_DIR}}/*.dylib* | |
${{env.BUILD_DIR}}/resources/ | |
retention-days: 7 | |
- name: Test | |
working-directory: ${{env.BUILD_DIR}} | |
run: cmake --build . --config ${{matrix.build_type}} -t ChiraTest -- -j$(sysctl -n hw.logicalcpu) && ctest -C ${{matrix.build_type}} | |
# build-macos-apple: | |
# strategy: | |
# matrix: | |
# build_type: [Debug, Release] | |
# runs-on: macos-latest | |
# steps: | |
# - name: Checkout Repository | |
# uses: actions/checkout@v3 | |
# with: | |
# submodules: recursive | |
# | |
# - name: Configure CMake | |
# run: cmake -G "Xcode" -B ${{env.BUILD_DIR}} -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DCHIRA_BUILD_WITH_PCH=ON | |
# | |
# - name: Build | |
# working-directory: ${{env.BUILD_DIR}} | |
# run: cmake --build . --config ${{matrix.build_type}} -t editor | |
# | |
# - name: Upload Artifact | |
# uses: actions/upload-artifact@v3 | |
# with: | |
# name: ChiraEngine-macOS-apple-${{matrix.build_type}} | |
# path: | | |
# ${{env.BUILD_DIR}}/*.app | |
# ${{env.BUILD_DIR}}/*.dylib* | |
# ${{env.BUILD_DIR}}/resources/ | |
# retention-days: 7 | |
# | |
# - name: Test | |
# working-directory: ${{env.BUILD_DIR}} | |
# run: cmake --build . --config ${{matrix.build_type}} -t ChiraTest && ctest -C ${{matrix.build_type}} |