-
Notifications
You must be signed in to change notification settings - Fork 36
44 lines (35 loc) · 1.03 KB
/
cmake-single-platform.yml
File metadata and controls
44 lines (35 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: CMake CI (Ubuntu 20.04)
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
BUILD_TYPE: Release
jobs:
build:
runs-on: ubuntu-20.04 # 明确指定 Ubuntu 20.04
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
# 添加 Open3D 官方 PPA
sudo apt-get install -y software-properties-common
sudo add-apt-repository ppa:open3d/ppa -y
sudo apt-get update
# 安装指定版本 Open3D (0.17+)
sudo apt-get install -y \
libopen3d-dev=0.17.0+* \
cmake \
g++ \
libeigen3-dev \
libpcl-dev \
libyaml-cpp-dev
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} -j 2
# 可选测试步骤
- name: Test
working-directory: ${{github.workspace}}/build
run: ctest -C ${{env.BUILD_TYPE}}