forked from simonfuhrmann/mve
-
Notifications
You must be signed in to change notification settings - Fork 29
78 lines (67 loc) · 1.97 KB
/
build.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
name: MVE GitHub Actions CI
on:
push:
branches: [ "master", "gh_ci_test" ]
pull_request:
branches: [ "master" ]
jobs:
build:
name: ${{ matrix.platform.name }}
runs-on: ${{ matrix.platform.os }}
strategy:
fail-fast: false
matrix:
platform:
- { name: Ubuntu 20.04 GCC, os: ubuntu-20.04, cpp_compiler: g++ }
- { name: Ubuntu 20.04 Clang, os: ubuntu-20.04, cpp_compiler: clang++ }
- { name: Ubuntu 22.04 GCC, os: ubuntu-22.04, cpp_compiler: g++ }
- { name: Ubuntu 22.04 Clang, os: ubuntu-22.04, cpp_compiler: clang++ }
- { name: macOS 12, os: macos-12, cpp_compiler: clang++ }
- { name: macOS 13, os: macos-13, cpp_compiler: clang++ }
- { name: macOS 14, os: macos-14, cpp_compiler: clang++ }
env:
CXX: ${{ matrix.platform.cpp_compiler }}
steps:
- uses: actions/checkout@v4
- name: Install Ubuntu dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install \
build-essential \
clang \
libgl-dev \
libgtest-dev \
libjpeg-turbo8-dev \
libomp-dev \
libpng-dev \
libqt5opengl5-dev \
libtiff-dev \
pkg-config \
zlib1g-dev
- name: Install macOS dependencies
if: runner.os == 'macOS'
run: |
brew update
brew install -q \
googletest \
jpeg-turbo \
libpng \
libtiff \
qt@5
brew link qt@5
- name: Build MVE on Linux/macOS
run: |
if [ "`uname`" = "Darwin" ]; then
export NUM_CPU_CORES="`sysctl -n hw.ncpu`"
else
export NUM_CPU_CORES="`nproc`"
fi
make -j${NUM_CPU_CORES}
cd apps/umve
qmake
make -j${NUM_CPU_CORES}
cd ../..
make -j${NUM_CPU_CORES} test
- name: Run tests
run: ./tests/test