Add audio support & general improvements #87
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: CI/CD - BUILD | |
on: | |
pull_request: | |
workflow_dispatch: | |
permissions: | |
contents: write | |
actions: write | |
checks: write | |
pull-requests: write | |
discussions: write | |
issues: write | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Install dependencies | |
run: | | |
sudo apt update | |
sudo apt install build-essential gcc-12 libgl1-mesa-glx libgl1-mesa-dev libglew-dev ninja-build python3-pip libx11-dev libx11-xcb-dev libfontenc-dev libice-dev libsm-dev libxau-dev libxaw7-dev libxcomposite-dev libxcursor-dev libxdamage-dev libxdmcp-dev libxext-dev libxfixes-dev libxft-dev libxi-dev libxinerama-dev libxkbfile-dev libxmu-dev libxmuu-dev libxpm-dev libxrandr-dev libxrender-dev libxres-dev libxss-dev libxt-dev libxtst-dev libxv-dev libxvmc-dev libxxf86vm-dev xtrans-dev libxcb-render0-dev libxcb-render-util0-dev libxcb-xkb-dev libxcb-icccm4-dev libxcb-image0-dev libxcb-keysyms1-dev libxcb-randr0-dev libxcb-shape0-dev libxcb-sync-dev libxcb-xfixes0-dev libxcb-xinerama0-dev xkb-data libxcb-dri3-dev uuid-dev libxcb-util-dev | |
sudo pip install conan | |
- name: Detect Conan profile | |
run: | | |
conan profile detect --force | |
- name: Restore conan cache | |
id: github-cache-conan-restore | |
uses: actions/cache/restore@v3 | |
with: | |
path: | | |
./build | |
~/.conan2 | |
key: host-${{ runner.os }}-${{ hashFiles('conanfile.py') }} | |
- name: Install Conan dependencies | |
run: | | |
mkdir -p build | |
conan install . --output-folder=build --build=missing | |
- name: Build | |
id: build | |
run: | | |
cd build | |
CXX=g++-12 cmake .. -G Ninja -DCMAKE_TOOLCHAIN_FILE=conan_toolchain.cmake -DCMAKE_BUILD_TYPE:STRING=Release -DRAWRBOX_OUTPUT_BIN="bin" -DCMAKE_EXPORT_COMPILE_COMMANDS="ON" | |
ninja | |
- name: Cache conan | |
id: github-cache-conan | |
uses: actions/cache/save@v3 | |
if: steps.build.outputs.exit_code == 0 | |
env: | |
cache-name: cache-conan-modules | |
with: | |
path: | | |
./build | |
~/.conan2 | |
key: host-${{ runner.os }}-${{ hashFiles('conanfile.py') }} | |
- name: Run tests | |
run: | | |
cd build | |
ctest --test-dir ./math --output-on-failure | |
ctest --test-dir ./utils --output-on-failure | |
ctest --test-dir ./render --output-on-failure | |
ctest --test-dir ./engine --output-on-failure | |
ctest --test-dir ./debug --output-on-failure | |
- name: Run linter | |
uses: cpp-linter/cpp-linter-action@v2 | |
id: linter | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
style: file | |
files-changed-only: true | |
tidy-checks: '' | |
extra-args: '-std=c++20 -Wall' | |
version: '15' | |
database: './build/' | |
ignore: 'build | .github | stb' | |
- name: Find linting comment | |
if: steps.linter.outputs.checks-failed > 0 | |
uses: peter-evans/find-comment@v2 | |
id: fc | |
with: | |
issue-number: ${{ github.event.pull_request.number }} | |
comment-author: 'github-actions[bot]' | |
body-includes: Linting failed ⚠ | |
- name: Create / Update linting comment | |
uses: peter-evans/create-or-update-comment@v2 | |
if: steps.linter.outputs.checks-failed > 0 | |
with: | |
comment-id: ${{ steps.fc.outputs.comment-id }} | |
issue-number: ${{ github.event.pull_request.number }} | |
body: | | |
### Linting failed ⚠ - ${{ steps.linter.outputs.checks-failed }} lint errors found | |
edit-mode: replace |