-
Notifications
You must be signed in to change notification settings - Fork 3
62 lines (52 loc) · 1.96 KB
/
macos-dep-src.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
name: MacOS-dep-sec
# 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-macos-dep-sec:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-10.15, macos-11.0]
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: sysctl -a | grep machdep.cpu
- name: Print OS information
run: system_profiler SPSoftwareDataType
- name: Install dependencies
run: |
brew update && brew upgrade
brew install libpng libjpeg libdc1394 lapack openblas eigen opencv librealsense libxml2 pcl
# Openblas location is exported explicitly because openblas is keg-only,
# which means it was not symlinked into /usr/local/.
- name: Clone and configure ViSP
run: |
git clone --depth 1 https://github.com/lagadic/visp.git ${HOME}/visp
cd ${HOME}/visp
export LDFLAGS="-L/usr/local/opt/openblas/lib"
export CPPFLAGS="-I/usr/local/opt/openblas/include"
mkdir build && cd build
cmake .. -DCMAKE_FIND_FRAMEWORK=LAST -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
- name: Build and install ViSP
run: |
cd ${HOME}/visp/build
make -j$(sysctl -n hw.logicalcpu) install
echo "VISP_DIR=$(pwd)/install" >> $GITHUB_ENV
echo $VISP_DIR
- name: Configure CMake and build visp_sample
run: |
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j$(sysctl -n hw.logicalcpu)