Skip to content

fix main => master lol #1

fix main => master lol

fix main => master lol #1

Workflow file for this run

name: CI
on:
pull_request:
branches:
- master
types: [opened, synchronize, labeled]
push:
branches:
- master
jobs:
clang-format:
name: Check clang-format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install clang-format
run: sudo apt-get update && sudo apt-get install -y clang-format
- name: Check formatting
run: |
git fetch --depth=1 origin main
clang-format -style=file -output-replacements-xml $(git ls-files '*.cpp' '*.h' '*.ixx' '*.hpp') | grep "<replacement " && echo "Code is not properly formatted" && exit 1 || echo "All good"
build:
name: Build project
runs-on: ${{ matrix.os }}
if: github.event_name == 'push' || (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'run-ci'))
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
compiler: [msvc, clang, gcc]
steps:
- uses: actions/checkout@v3
- name: Setup CMake
uses: jwlawson/actions-setup-cmake@v2
- name: Setup compiler
run: |
if [ "${{ matrix.os }}" == "ubuntu-latest" ]; then
if [ "${{ matrix.compiler }}" == "clang" ]; then
sudo apt-get install -y clang
elif [ "${{ matrix.compiler }}" == "gcc" ]; then
sudo apt-get install -y g++
fi
fi
shell: bash
- name: Configure CMake
run: |
mkdir build
cd build
if [ "${{ matrix.os }}" == "ubuntu-latest" ]; then
if [ "${{ matrix.compiler }}" == "clang" ]; then
cmake -DCMAKE_CXX_COMPILER=clang++ ..
elif [ "${{ matrix.compiler }}" == "gcc" ]; then
cmake -DCMAKE_CXX_COMPILER=g++ ..
else
cmake ..
fi
else
cmake ..
fi
shell: bash
- name: Build
run: cmake --build build --config Release
shell: bash