Skip to content

Environment Updates #27

Environment Updates

Environment Updates #27

Workflow file for this run

name: Checks
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
# BuildWindows:
# runs-on: windows-latest
# name: Build Windows
# strategy:
# fail-fast: false
# matrix:
# build_type: [RelWithDebInfo]
# steps:
# - name: Checkout Repository
# uses: actions/checkout@v4
# with:
# submodules: 'true'
# - name: Install clang
# uses: msys2/setup-msys2@v2
# with:
# location: D:\
# update: true
# install: >-
# mingw-w64-clang-x86_64-clang
# mingw-w64-clang-x86_64-ninja
# - name: Add msys to path
# run: |
# echo "D:\msys64\clang64\bin\" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
# - name: Build
# uses: threeal/[email protected]
# with:
# source-dir: ${{ github.workspace }}
# build-dir: ${{ github.workspace }}/build
# generator: Ninja
# cxx-compiler: clang++
# c-compiler: clang
# build-args: --target DummyEditor --parallel 16 --config ${{ matrix.build_type }}
# options: CMAKE_BUILD_TYPE=${{ matrix.build_type }}
# BuildUbuntu:
# runs-on: ubuntu-latest
# name: Build Ubuntu
# strategy:
# fail-fast: false
# matrix:
# build_type: [RelWithDebInfo]
# c_compiler: [clang-19]
# cpp_compiler: [clang++-19]
# steps:
# - name: Install Packages
# run: |
# sudo apt update
# sudo apt install libwayland-dev libxkbcommon-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libgtk-3-dev ninja-build
# wget https://apt.llvm.org/llvm.sh
# chmod +x llvm.sh
# sudo ./llvm.sh 19 all
# - name: Checkout Repository
# uses: actions/checkout@v4
# with:
# submodules: 'true'
# - name: Build
# uses: threeal/[email protected]
# with:
# source-dir: ${{ github.workspace }}
# build-dir: ${{ github.workspace }}/build
# generator: Ninja
# cxx-compiler: ${{ matrix.cpp_compiler }}
# c-compiler: ${{ matrix.c_compiler }}
# build-args: --target DummyEditor --parallel 16 --config ${{ matrix.build_type }}
# options: CMAKE_BUILD_TYPE=${{ matrix.build_type }}
# ClangFormat:
# runs-on: ubuntu-latest
# name: Clang Format
# strategy:
# fail-fast: false
# steps:
# - uses: actions/checkout@v4
# - name: Check DummyEngine Format
# uses: jidicula/[email protected]
# with:
# clang-format-version: '18'
# check-path: 'DummyEngine'
# - name: Check DummyEditor Format
# uses: jidicula/[email protected]
# with:
# clang-format-version: '18'
# check-path: 'DummyEditor'
# ClangTidy:
# runs-on: ubuntu-latest
# name: Clang Tidy
# strategy:
# fail-fast: false
# steps:
# - name: Checkout Repository
# uses: actions/checkout@v4
# with:
# submodules: 'true'
# - name: Install Packages
# run: |
# sudo apt update
# sudo apt install libwayland-dev libxkbcommon-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libgtk-3-dev
# - name: Configure Cmake
# uses: threeal/[email protected]
# with:
# source-dir: ${{ github.workspace }}
# build-dir: ${{ github.workspace }}/build
# generator: Unix Makefiles
# cxx-compiler: clang++
# c-compiler: clang
# options: CMAKE_BUILD_TYPE=RelWithDebInfo CMAKE_EXPORT_COMPILE_COMMANDS=ON
# run-build: false
# - name: Check DummyEditor Tidy
# uses: Mag1str02/[email protected]
# with:
# scandir: '${{ github.workspace }}/DummyEditor'
# builddir: '${{ github.workspace }}/build'
# extensions: 'c,h,C,H,cpp,hpp,cc,hh,c++,h++,cxx,hxx'
# useexistingbuild: true
# - name: Check DummyEngine Tidy
# uses: Mag1str02/[email protected]
# with:
# scandir: '${{ github.workspace }}/DummyEngine'
# builddir: '${{ github.workspace }}/build'
# extensions: 'c,h,C,H,cpp,hpp,cc,hh,c++,h++,cxx,hxx'
# useexistingbuild: true
ClangTidy:
runs-on: ubuntu-latest
name: Clang Tidy
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Install Packages
run: |
sudo apt update
sudo apt install libwayland-dev libxkbcommon-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libgtk-3-dev
- name: Configure Cmake
uses: threeal/[email protected]
with:
source-dir: ${{ github.workspace }}
build-dir: ${{ github.workspace }}/build
generator: Unix Makefiles
cxx-compiler: clang++
c-compiler: clang
options: CMAKE_BUILD_TYPE=RelWithDebInfo CMAKE_EXPORT_COMPILE_COMMANDS=ON
run-build: false
- name: Test
run:
ls '${{ github.workspace }}'
- uses: cpp-linter/cpp-linter-action@v2
id: linter
with:
style: 'file' # Use .clang-format config file
tidy-checks: '' # Use .clang-tidy config file
verbosity: debug
version: 18
files-changed-only: false
lines-chanded-only: false
database: '${{ github.workspace }}/build'
repo-root: '${{ github.workspace }}'
ignore: '${{ github.workspace }}/build'
- name: Fail fast?!
if: steps.linter.outputs.checks-failed > 0
run: exit 1