File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : CMake PR Build
2+
3+ on :
4+ pull_request :
5+ branches :
6+ - main
7+
8+ jobs :
9+ build :
10+ runs-on : ubuntu-latest
11+
12+ steps :
13+ - name : Checkout repository
14+ uses : actions/checkout@v4
15+
16+ # Cache APT packages
17+ - name : Cache APT packages
18+ uses : actions/cache@v4
19+ with :
20+ path : /var/cache/apt/archives
21+ key : ${{ runner.os }}-apt-${{ hashFiles('**/CMakeLists.txt') }}
22+ restore-keys : |
23+ ${{ runner.os }}-apt-
24+
25+ # Update & install dependencies
26+ - name : Install dependencies
27+ run : |
28+ sudo apt-get update
29+ sudo apt-get install -y ninja-build make gcc g++ cmake libwayland-dev libxkbcommon-dev xorg-dev
30+
31+ # Cache CMake build directory
32+ - name : Cache build
33+ uses : actions/cache@v4
34+ with :
35+ path : |
36+ build
37+ ~/.cache
38+ key : ${{ runner.os }}-cmake-${{ hashFiles('**/CMakeLists.txt') }}
39+ restore-keys : |
40+ ${{ runner.os }}-cmake-
41+
42+ - name : Configure
43+ run : |
44+ cmake -S . -B build -G Ninja \
45+ -DCMAKE_BUILD_TYPE=Release
46+
47+ - name : Build
48+ run : |
49+ cmake --build build
You can’t perform that action at this time.
0 commit comments