Merge pull request #40 from AsPJT/feature/aspjt/upd-add-comment #13
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-Build-On-Push | |
on: | |
push: | |
branches: | |
- main | |
- develop | |
- feature/* | |
- release/* | |
- hotfix/* | |
env: | |
BUILD_TYPE: Debug | |
WORK_SPACE: ${{github.workspace}}/Project | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
compiler: [g++, clang++] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Checkout submodules | |
run: git submodule update --init --recursive ExternalLibrary/googletest | |
- name: Install dependencies | |
run: | | |
sudo apt-get clean | |
sudo apt-get update | |
sudo apt-get install libsfml-dev | |
sudo apt-get install cmake | |
sudo apt-get install g++ | |
- name: Configure CMake | |
run: | | |
mkdir ${{github.workspace}}/build | |
cmake -B ${{github.workspace}}/build -DCMAKE_CXX_COMPILER=${{matrix.compiler}} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DBUILD_SFML_TEST=ON -S ${{env.WORK_SPACE}} -G "Unix Makefiles" | |
- name: Build | |
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target all -j 12 | |