chore: adjust indentation to 4 spaces #52
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: CMake | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
BUILD_TYPE: Release | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest,windows-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Configure CMake | |
run: | | |
mkdir build | |
if [ ${{matrix.os}} == 'ubuntu-latest' ]; then | |
sudo apt-get update -y | |
sudo apt-get install -y \ | |
libsfml-dev \ | |
libxrandr-dev \ | |
libxcursor-dev \ | |
libudev-dev \ | |
libfreetype-dev \ | |
libopenal-dev \ | |
libflac-dev \ | |
libvorbis-dev \ | |
libgl1-mesa-dev \ | |
libegl1-mesa-dev | |
cmake -S . -B build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DSNAKE_GENERATE_INSTALLER=TRUE | |
elif [ ${{matrix.os}} == 'windows-latest' ]; then | |
cmake -S . -B build -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DSNAKE_GENERATE_INSTALLER=TRUE | |
fi | |
shell: bash | |
- name: Build Program | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | |
- name: Build Installer | |
working-directory: ${{github.workspace}}/build | |
run: | | |
if [ ${{ matrix.os }} == 'ubuntu-latest' ]; then | |
sudo cpack -G "TGZ" | |
elif [ ${{ matrix.os }} == 'windows-latest' ]; then | |
choco install nsis | |
cpack -G "NSIS;ZIP" | |
fi | |
shell: bash |