-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathbitbucket-pipelines.yml
More file actions
58 lines (51 loc) · 2.02 KB
/
Copy pathbitbucket-pipelines.yml
File metadata and controls
58 lines (51 loc) · 2.02 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
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: ubuntu:24.04
pipelines:
default:
- step:
name: Build sensei + tests
size: 4x
caches:
- vcpkg
script:
# Prepare system.
- apt-get update -y
- apt install build-essential -y
- apt-get install -y -q cmake git make liblo-dev
- apt-get install -y -q curl zip unzip tar
- apt-get install -y -q libgrpc++-dev protobuf-compiler-grpc
- apt-get install -y software-properties-common
- add-apt-repository -y ppa:ubuntu-toolchain-r/test
- export LV2_PATH=$HOME/.lv2:/usr/local/lib/lv2:/usr/lib/lv2
# Prepare dependencies
# Rewrite the relative submodule url as bitbucket doesn't handle relative paths correctly
- sed -i 's/url = \.\.\(.*\)/url = git@bitbucket.org:'$BITBUCKET_TEAM'\1/g' .gitmodules
- git submodule update --init --recursive
# Set the number of cores to use when building
- export BUILD_CORES=8
# Boostrap vcpkg
- export VCPKG_BINARY_SOURCES="clear;files,$(pwd)/vcpkgcache,readwrite"
- ./third-party/vcpkg/bootstrap-vcpkg.sh
- mkdir build
- cd build
- cmake -DCMAKE_TOOLCHAIN_FILE=../third-party/vcpkg/scripts/buildsystems/vcpkg.cmake -DSENSEI_WITH_GRPC=ON ..
# Build binary and unit tests
- make sensei -j${BUILD_CORES}
- make unit_tests -j${BUILD_CORES}
# Run unit tests
- cd test
- ./unit_tests
- cd ..
# Run raspa_mock integration test
- apt-get install -y python3-venv libclang-17-dev
- cd ../test/tools/raspa_mock
- python3 -m venv .venv
- source .venv/bin/activate
- pip install -r requirements.txt
- bash generate_bindings.sh
- python main.py
definitions:
caches:
vcpkg: vcpkgcache