-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (39 loc) · 1.39 KB
/
main.yml
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
45
46
47
48
49
50
name: CMake and Google Test
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
compiler: [gcc]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: setup google test
uses: Bacondish2023/setup-googletest@v1
- name: Install GCC 12
run: |
sudo apt-get update && sudo apt-get install -y gcc-12 g++12
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 110 --slave /usr/bin/g++ g++ /usr/bin/g++-12 --slave /usr/bin/gcov gcov /usr/bin/gcov-12
- name: Install CMake
run: sudo apt-get update && sudo apt-get install -y cmake
- name: Install Boost
run: sudo apt-get update && sudo apt-get install -y libboost-all-dev
- name: Install libtorch
run: |
wget https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-2.1.2%2Bcpu.zip
unzip libtorch-cxx11-abi-shared-with-deps-2.1.2+cpu.zip -d /opt/
- name: Create build directory
run: mkdir build
working-directory: ./LidarAug/cpp
- name: Configure and build
run: |
cd build
cmake -DBOOST_ROOT=/usr/include/boost -DCMAKE_PREFIX_PATH=/opt/libtorch ..
make
working-directory: ./LidarAug/cpp
- name: Run Google Test
run: |
cd build
ctest --output-on-failure
working-directory: ./LidarAug/cpp