Skip to content

Commit b8b4c58

Browse files
Add cmake-ci of github-actions
1 parent 2b1767d commit b8b4c58

File tree

3 files changed

+230
-167
lines changed

3 files changed

+230
-167
lines changed

.github/workflows/cmake-ci.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: CMake CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- dev
8+
pull_request:
9+
types: [opened, reopened, labeled, unlabeled, synchronize]
10+
branches:
11+
- main
12+
- dev
13+
workflow_dispatch:
14+
15+
jobs:
16+
build:
17+
strategy:
18+
matrix:
19+
os: [ubuntu-latest, macos-latest]
20+
21+
runs-on: ${{ matrix.os }}
22+
23+
steps:
24+
- name: Checkout repository
25+
uses: actions/checkout@v4
26+
with:
27+
submodules: recursive
28+
29+
- name: Install dependencies (Ubuntu)
30+
if: matrix.os == 'ubuntu-latest'
31+
run: |
32+
sudo apt-get update
33+
sudo apt-get install -y cmake
34+
sudo apt-get install -y libvulkan1 mesa-vulkan-drivers vulkan-tools
35+
sudo apt-get install -y libxrandr-dev
36+
37+
- name: Build with CMake
38+
run: CMAKE_VERBOSE_MAKEFILE=1 make all-cmake
39+
40+
- name: Test
41+
run: make test-cmake

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ debug-cmake: check-clang check-cmake
9797
all-cmake: check-clang check-cmake
9898
$(CMAKE_CMD) $(RELEASE_FLAGS) && make -j$(NUM_JOBS) $(TARGET_ALL)
9999

100+
test-cmake: check-clang check-cmake
101+
./build/test_gpu
102+
100103
################################################################################
101104
# Cleanup
102105
################################################################################

0 commit comments

Comments
 (0)