Skip to content

Adding OpenGL

Adding OpenGL #129

Workflow file for this run

name: Code Analysis
on:
pull_request:
branches: [ main, dev ]
paths:
- '**.cpp'
- '**.hpp'
- '**.h'
- '**.cmake'
- '**/CMakeLists.txt'
- '**/.clang-tidy'
- '**/.clang-format'
env:
home: /home/runner
jobs:
format:
name: Check formatting
runs-on: ubuntu-latest
container:
image: ghcr.io/limpingpebble/toolchain:llvm18-ninja1.12.0
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout repos
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Run clang-format
run: find Engine examples -name '*.cpp' -or -name '*.h' -or -name '*.hpp' | xargs clang-format -i -style=file
- name: Check for differences
if: ${{ !env.ACT }}
run: |
git config --global --add safe.directory /__w/StoneEngine/StoneEngine
git diff --exit-code || (echo "Code is not formatted properly" && exit 1)
build:
name: Build project
runs-on: ubuntu-latest
container:
image: ghcr.io/limpingpebble/toolchain:llvm18-ninja1.12.0
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout repos
uses: actions/checkout@v4
- name: Cache cmake output
uses: actions/cache@v4
with:
key: cmake-debug
path: build/debug
- name: Configure and build project
run: cmake --workflow --preset build-debug
test:
name: Run tests
runs-on: ubuntu-latest
needs: build
container:
image: ghcr.io/limpingpebble/toolchain:llvm18-ninja1.12.0
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout repos
uses: actions/checkout@v4
- name: Cache cmake output
uses: actions/cache@v4
with:
key: cmake-debug
path: build/debug
- name: Run tests
run: cmake --workflow --preset pipeline-test