-
Notifications
You must be signed in to change notification settings - Fork 65
72 lines (63 loc) · 1.98 KB
/
build-and-test.yml
File metadata and controls
72 lines (63 loc) · 1.98 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
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
name: Build and Test
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
name: Build VRS on ${{ matrix.os }} / XPRS=${{ matrix.XPRS_FLAG }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-14, macos-latest, ubuntu-latest] # note: macos builds are arm only
XPRS_FLAG: ["ON", "OFF"]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
sudo apt-get update -y
sudo apt-get install -o Acquire::Retries=5 \
cmake git ninja-build libgtest-dev libfmt-dev \
libjpeg-dev libturbojpeg-dev libpng-dev \
liblz4-dev libzstd-dev libxxhash-dev \
libboost-dev \
libopus-dev \
qtbase5-dev portaudio19-dev \
libeigen3-dev
elif [ "$RUNNER_OS" == "macOS" ]; then
# Update or install cmake
brew upgrade cmake || brew install cmake
# Install deps, but use pre-installed git, ninja
brew install googletest glog fmt \
jpeg-turbo libpng \
lz4 zstd xxhash \
boost \
opus \
qt5 portaudio \
eigen
else
echo "$RUNNER_OS not supported"
exit 1
fi
- name: Build FFMPEG
shell: bash
if: matrix.XPRS_FLAG == 'ON'
run: |
./build_third_party_libs/build_ffmpeg_linuxunix.sh
- name: Configure
shell: bash
run: |
if [ "$RUNNER_OS" == "macOS" ]; then
export QT_DIR=$(find /usr/local/Cellar/qt\@5 -name "5.*" -depth 1)
fi
mkdir build
cmake -S . -B build -G Ninja -DBUILD_WITH_XPRS:BOOL="${{ matrix.XPRS_FLAG }}"
- name: Build and Test C++
shell: bash
run: |
cd build
ninja all
ctest -j8