Skip to content

feat: Workflows

feat: Workflows #2

Workflow file for this run

name: CMake PR Build
on:
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
# Cache APT packages
- name: Cache APT packages
uses: actions/cache@v4
with:
path: /var/cache/apt/archives
key: ${{ runner.os }}-apt-${{ hashFiles('**/CMakeLists.txt') }}
restore-keys: |
${{ runner.os }}-apt-
# Update & install dependencies
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y ninja-build make gcc g++ cmake libwayland-dev libxkbcommon-dev xorg-dev
# Cache CMake build directory
- name: Cache build
uses: actions/cache@v4
with:
path: |
build
~/.cache
key: ${{ runner.os }}-cmake-${{ hashFiles('**/CMakeLists.txt') }}
restore-keys: |
${{ runner.os }}-cmake-
- name: Configure
run: |
cmake -S . -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release
- name: Build
run: |
cmake --build build