-
Notifications
You must be signed in to change notification settings - Fork 3
88 lines (74 loc) · 3.29 KB
/
ubuntu-extra.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Ubuntu-extra
# https://www.jeffgeerling.com/blog/2020/running-github-actions-workflow-on-schedule-and-other-events
on:
push:
pull_request:
schedule:
- cron: '0 2 * * SUN'
jobs:
build-ubuntu-extra:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-16.04, ubuntu-18.04, ubuntu-20.04]
steps:
# https://github.com/marketplace/actions/cancel-workflow-action
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout repository
uses: actions/checkout@v2
- name: Print system information
run: lscpu
- name: Print OS information
run: lsb_release -a
- name: Install dependencies
run: |
sudo apt-get update && sudo apt-get install -y libx11-dev libdc1394-22-dev libv4l-dev gfortran liblapack-dev libopenblas-dev libeigen3-dev libopencv-dev libxml2-dev libpcl-dev
sudo apt-get update && sudo apt-get install -y libssl-dev libusb-1.0-0-dev pkg-config libgtk-3-dev libglfw3-dev libgl1-mesa-dev libglu1-mesa-dev
- name: Build librealsense2 from source
run: |
pwd
git clone --depth 1 https://github.com/IntelRealSense/librealsense.git ${HOME}/librealsense
cd ${HOME}/librealsense
mkdir build && cd build && mkdir install
cmake .. -DBUILD_EXAMPLES=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$(pwd)/install
make -j$(nproc) install
echo "REALSENSE2_DIR=$(pwd)/install" >> $GITHUB_ENV
echo $REALSENSE2_DIR
- name: Build ViSP from source
run: |
git clone --depth 1 https://github.com/lagadic/visp.git ${HOME}/visp
cd ${HOME}/visp
mkdir build && cd build && mkdir install
cmake .. -DBUILD_DEMOS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_TESTS=OFF -DBUILD_TUTORIALS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$(pwd)/install
cat ViSP-third-party.txt
make -j$(nproc) install
echo "ViSP_WS=${HOME}" >> $GITHUB_ENV
echo $ViSP_WS
- name: Build visp_sample with ViSP from build tree
run: |
mkdir visp_sample-build && cd visp_sample-build
cmake .. -DCMAKE_BUILD_TYPE=Release -DVISP_DIR=$ViSP_WS/visp/build
make -j$(nproc)
- name: Build visp_sample using visp-config from build tree
run: |
make -f Makefile.visp-config VISP_INSTALL_PREFIX=$ViSP_WS/visp/build
make -j$(nproc) -f Makefile.visp-config clean
- name: Build visp_sample with ViSP from install tree
run: |
mkdir visp_sample-build_2 && cd visp_sample-build_2
cmake .. -DCMAKE_BUILD_TYPE=Release -DVISP_DIR=$ViSP_WS/visp/build/install/lib/cmake/visp
make -j$(nproc)
- name: Build visp_sample using visp.pc from install tree
run: |
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$ViSP_WS/visp/build/install/lib/pkgconfig
make -j$(nproc) -f Makefile.visp.pc
make -j$(nproc) -f Makefile.visp.pc clean
- name: Build visp_sample using visp-config from install tree
run: |
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$ViSP_WS/visp/build/install/lib/pkgconfig
make -j$(nproc) -f Makefile.visp-config VISP_INSTALL_PREFIX=$ViSP_WS/visp/build/install
make -j$(nproc) -f Makefile.visp-config clean