Compare commits

...
Sign in to create a new pull request.

9 commits

Author SHA1 Message Date
fc77f9c8f5
Use Clang
Some checks failed
Build / Build (push) Failing after 55s
2025-03-01 16:38:38 -05:00
995dd83fb7
Install Ninja onto runner
Some checks failed
Build / Build (push) Failing after 41s
2025-03-01 16:16:47 -05:00
d223dd0825
Use correct CMake binary for runner
Some checks failed
Build / Build (push) Failing after 35s
2025-03-01 16:14:47 -05:00
d492ce18ed
Fix CMake license acceptance
Some checks failed
Build / Build (push) Failing after 33s
2025-03-01 16:13:22 -05:00
3f83ecaee2
Accept the CMake license
Some checks failed
Build / Build (push) Failing after 27s
2025-03-01 16:12:19 -05:00
1347e95f1f
Fix CMake installation
Some checks failed
Build / Build (push) Has been cancelled
2025-03-01 16:05:45 -05:00
9d7265b362
Use Ninja generator to support C++20 modules
Some checks failed
Build / Build (push) Failing after 32s
2025-03-01 15:49:43 -05:00
a362874f22
Use latest CMake 2025-03-01 15:49:20 -05:00
2140991d8d
Temporarily disable linting and formatting actions 2025-03-01 15:37:32 -05:00
2 changed files with 33 additions and 29 deletions

View file

@ -4,33 +4,33 @@ on: [push]
name: Build
jobs:
format:
name: Format
runs-on: ubuntu-22.04
steps:
- name: Check out the code
uses: actions/checkout@v4
- name: Install clang-format
run: |
sudo apt-get update
sudo apt-get -y install clang-format
- name: Check the code's formatting
run: clang-format --dry-run src/*.h src/*.cpp 2>&1 | tee fmt.log; [ ! -s fmt.log ]
# format:
# name: Format
# runs-on: ubuntu-22.04
# steps:
# - name: Check out the code
# uses: actions/checkout@v4
# - name: Install clang-format
# run: |
# sudo apt-get update
# sudo apt-get -y install clang-format
# - name: Check the code's formatting
# run: clang-format --dry-run src/*.h src/*.cpp 2>&1 | tee fmt.log; [ ! -s fmt.log ]
lint:
name: Lint
runs-on: ubuntu-22.04
steps:
- name: Check out the code
uses: actions/checkout@v4
- name: Install clang-tidy and the toolchain
run: |
sudo apt-get update
sudo apt-get -y install clang-tidy cmake freeglut3-dev libglew-dev libglm-dev
- name: Set up the build environment
run: cmake -S . -B cmake-build-debug -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
- name: Have clang-tidy lint for errors
run: clang-tidy -p cmake-build-debug src/*.cpp src/*.h --warnings-as-errors='*'
# lint:
# name: Lint
# runs-on: ubuntu-22.04
# steps:
# - name: Check out the code
# uses: actions/checkout@v4
# - name: Install clang-tidy and the toolchain
# run: |
# sudo apt-get update
# sudo apt-get -y install clang-tidy cmake freeglut3-dev libglew-dev libglm-dev
# - name: Set up the build environment
# run: cmake -S . -B cmake-build-debug -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
# - name: Have clang-tidy lint for errors
# run: clang-tidy -p cmake-build-debug src/*.cpp src/*.h --warnings-as-errors='*'
build:
name: Build
@ -41,11 +41,13 @@ jobs:
- name: Install the toolchain
run: |
sudo apt-get update
sudo apt-get -y install cmake freeglut3-dev libglew-dev libglm-dev
sudo apt-get -y install clang freeglut3-dev libglew-dev libglm-dev ninja-build
curl -L https://github.com/Kitware/CMake/releases/download/v3.31.6/cmake-3.31.6-linux-aarch64.sh -o cmake-install.sh
/bin/env sh cmake-install.sh --skip-license
- name: Set up the build environment
run: cmake -S . -B cmake-build-debug
run: bin/cmake -S . -B cmake-build-debug -G Ninja
- name: Compile the code
run: cmake --build cmake-build-debug
run: bin/cmake --build cmake-build-debug
- name: Save executable
uses: forgejo/upload-artifact@v4
with:

View file

@ -1,6 +1,8 @@
cmake_minimum_required(VERSION 3.22)
project(perlin-shadows)
set(CMAKE_C_COMPILER "/usr/bin/clang")
set(CMAKE_CXX_COMPILER "/usr/bin/clang++")
set(CMAKE_CXX_STANDARD 23)
include_directories(src)