feat: added randbool #655
Workflow file for this run
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: | |
branches: "*" | |
pull_request: {} | |
jobs: | |
build_linux: | |
name: Build ObEngine on Linux | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Clean previous execution | |
run: rm -rf build; rm -rf SFML | |
- name: Create build directory | |
run: mkdir build | |
- name: Aptitude update | |
run: sudo apt-get update | |
- name: Install CMake | |
run: sudo apt-get install -y cmake | |
- name: Install build-essential | |
run: sudo apt-get install -y build-essential | |
- name: Set up GCC | |
uses: egor-tensin/setup-gcc@v1 | |
with: | |
version: latest | |
platform: x64 | |
- name: Install git | |
run: sudo apt-get install -y git | |
- name: Install ALSA | |
run: sudo apt-get install -y libasound2 alsa-utils alsa-oss libasound2-dev | |
- name: Install SFML dependencies | |
run: sudo apt install libfreetype6-dev libxrandr-dev libudev-dev libogg-dev libflac-dev libvorbis-dev libopenal-dev libgl1-mesa-dev | |
- name: Retrieve SFML 2.5.1 | |
run: "git clone --branch 2.5.1 --depth 1 http://github.com/SFML/SFML.git" | |
- name: Compile and install SFML | |
run: cd SFML; cmake .; make -j8; sudo make install | |
- name: Compile ObEngine | |
run: cd build; CC=/usr/bin/gcc-11 CXX=/usr/bin/g++-11 cmake -DBUILD_TESTS=ON -DBUILD_TOOLKIT=ON ..; make -j8 | |
- name: Run tests | |
run: LD_LIBRARY_PATH="$LD_LIBRARY_PATH;/usr/local/lib" ./build/tests/ObEngineTests | |
build_windows: | |
name: Build ObEngine on Windows | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Create deps directory | |
run: mkdir deps | |
- name: Download pre-built SFML | |
run: cd deps; Invoke-WebRequest -Uri "https://www.sfml-dev.org/files/SFML-2.5.1-windows-vc15-64-bit.zip" -OutFile SFML-2.5.1.zip | |
shell: pwsh | |
- name: Extract SFML | |
run: Expand-Archive -LiteralPath deps/SFML-2.5.1.zip -DestinationPath deps | |
shell: pwsh | |
- name: Create build directory | |
run: mkdir build | |
- name: Run CMake on ObEngine | |
run: cd build; cmake -G "Visual Studio 17 2022" -A x64 -DSFML_DIR="${env:GITHUB_WORKSPACE}/deps/SFML-2.5.1/lib/cmake/SFML" -DBUILD_TESTS=ON -DBUILD_TOOLKIT=ON .. | |
shell: pwsh | |
- name: Compile ObEngine | |
run: cmake --build build --config Debug -- /m:8 | |
- name: Run tests | |
run: ./build/tests/Debug/ObEngineTests.exe | |
build_macos: | |
name: Build ObEngine on MacOS | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Install LLVM & Clang | |
run: brew install llvm | |
- name: Install SFML | |
run: brew install sfml | |
- name: Create build directory | |
run: mkdir build | |
- name: Compile ObEngine | |
run: cd build && cmake -DBUILD_TESTS=ON -DBUILD_TOOLKIT=ON .. && make -j8 | |
env: | |
CC: /usr/local/opt/llvm/bin/clang | |
CXX: /usr/local/opt/llvm/bin/clang++ | |
- name: Run tests | |
run: cd build && ./tests/ObEngineTests |