perlin-shadows/.forgejo/workflows/build.yaml
Michael Bradley 1347e95f1f
Some checks failed
Build / Build (push) Has been cancelled
Fix CMake installation
2025-03-01 16:05:45 -05:00

55 lines
1.8 KiB
YAML

---
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 ]
# 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
runs-on: ubuntu-22.04
steps:
- name: Check out the code
uses: actions/checkout@v4
- name: Install the toolchain
run: |
sudo apt-get update
sudo apt-get -y install freeglut3-dev libglew-dev libglm-dev
curl -L https://github.com/Kitware/CMake/releases/download/v3.31.6/cmake-3.31.6-linux-x86_64.sh -o cmake-install.sh
/bin/env sh cmake-install.sh
- name: Set up the build environment
run: bin/cmake -S . -B cmake-build-debug -G Ninja
- name: Compile the code
run: bin/cmake --build cmake-build-debug
- name: Save executable
uses: forgejo/upload-artifact@v4
with:
name: bin.zip
path: cmake-build-debug/perlin-shadows