-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy path.gitlab-ci.yml
139 lines (132 loc) · 4.49 KB
/
.gitlab-ci.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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
stages:
- analysis
- build
- test
.common:
variables:
LIBTRACK_PROJECT_REF: leap-v5-platform/libtrack
LIBTRACK_REF: develop # Use develop until we have a tagged release including the leapc_cffi module
python-black:
stage: analysis
image: registry.ultrahaptics.com/leap-v5-platform/infrastructure/x64_linux_toolchain:v3.16.4
allow_failure: false
tags:
- docker
interruptible: true
needs: [ ]
script:
- python3 -m venv python_env --system-site-packages
- python_env/bin/python -m pip install black==22.3.0
- python_env/bin/python -m black --diff --check examples leapc-cffi leapc-python-api
Linux-Build:
extends: .common
stage: build
image: ubuntu:20.04
tags:
- docker-builder
before_script:
- dpkg-deb -xv $CI_PROJECT_DIR/ultraleap-hand-tracking-service_*.deb $CI_PROJECT_DIR/unpack
- apt-get update
- apt-get install -y python3 python3-venv python3-dev build-essential
script:
- export LEAPC_HEADER_OVERRIDE="$CI_PROJECT_DIR/unpack/usr/include/LeapC.h"
- export LEAPC_LIB_OVERRIDE="$CI_PROJECT_DIR/unpack/usr/lib/ultraleap-hand-tracking-service/libLeapC.so"
- mkdir build
- python3 -m venv build/venv --system-site-packages
- build/venv/bin/python -m pip install -r requirements.txt
- build/venv/bin/python -m build leapc-cffi -o build/dist
needs:
- project: $LIBTRACK_PROJECT_REF
job: X64LinuxRelProd
ref: $LIBTRACK_REF
artifacts: true
Linux-ARM-Build:
extends: .common
stage: build
image: registry.ultrahaptics.com/leap-v5-platform/infrastructure/arm64_linux_python:latest
tags:
- docker
before_script:
- export TAR_NAME=$(ls ultraleap-hand-tracking-service*.tar.gz)
- export EXTRACTED_DIR=${TAR_NAME%.tar.gz}
- tar -xf ultraleap-hand-tracking-service*.tar.gz
- apt-get update
- apt-get install -y python3 python3-venv python3-dev build-essential
script:
- export LEAPSDK_INSTALL_LOCATION="${PWD}/${EXTRACTED_DIR}/LeapSDK"
- mkdir build
- python3 -m venv build/venv --system-site-packages
- build/venv/bin/python -m pip install -r requirements.txt
- build/venv/bin/python -m build leapc-cffi -o build/dist
needs:
- project: $LIBTRACK_PROJECT_REF
job: ARM64LinuxRelProd-PythonBindings
ref: $LIBTRACK_REF
artifacts: true
Windows-Build:
extends: .common
stage: build
tags:
- win
- ctk
before_script:
- mkdir unpack
- $env:zip_file = Get-ChildItem . -Filter "Ultraleap_*.zip"
- Expand-Archive -Path $env:zip_file -OutputPath unpack
- cd unpack/Ultraleap*
- $env:EXTRACTED_INSTALLER_PATH=$pwd.Path
- cd $env:CI_PROJECT_DIR
script:
- $env:LEAPSDK_INSTALL_LOCATION="$env:EXTRACTED_INSTALLER_PATH/LeapSDK"
- mkdir build
- python -m venv build/venv --system-site-packages
- build/venv/Scripts/python.exe -m pip install -r requirements.txt
- build/venv/Scripts/python.exe -m build leapc-cffi -o build/dist
needs:
- project: $LIBTRACK_PROJECT_REF
job: WinRelDebProd
ref: $LIBTRACK_REF
artifacts: true
MacOS-Build:
extends: .common
stage: build
tags:
- platform-macm1
before_script:
- unzip $CI_PROJECT_DIR/Ultraleap-Hand-Tracking*.zip -d $CI_PROJECT_DIR/unpack
- cd $CI_PROJECT_DIR/unpack/Ultraleap*
- export EXTRACTED_INSTALLER_PATH="${PWD}"
- cd $CI_PROJECT_DIR
script:
- export LEAPSDK_INSTALL_LOCATION="$EXTRACTED_INSTALLER_PATH/Ultraleap Hand Tracking.app/Contents/LeapSDK"
- mkdir build
- python3 -m venv build/venv --system-site-packages
- build/venv/bin/python -m pip install -r requirements.txt
- build/venv/bin/python -m build leapc-cffi -o build/dist
needs:
- project: $LIBTRACK_PROJECT_REF
job: MacOSArm64RelDebProd
ref: $LIBTRACK_REF
artifacts: true
MacOS-Test:
extends: .common
stage: test
tags:
- platform-macm1
before_script:
- unzip $CI_PROJECT_DIR/Ultraleap-Hand-Tracking*.zip -d $CI_PROJECT_DIR/unpack
- cd $CI_PROJECT_DIR/unpack/Ultraleap*
- export EXTRACTED_INSTALLER_PATH="${PWD}"
- cd $CI_PROJECT_DIR
script:
- export LEAPSDK_INSTALL_LOCATION="$EXTRACTED_INSTALLER_PATH/Ultraleap Hand Tracking.app/Contents/LeapSDK"
- mkdir build
- python3 -m venv build/venv --system-site-packages
- build/venv/bin/python -m pip install cffi
- build/venv/bin/python -m pip install -e leapc-python-api
- build/venv/bin/python examples/print_current_time.py
needs:
- project: $LIBTRACK_PROJECT_REF
job: MacOSArm64RelDebProd
ref: $LIBTRACK_REF
artifacts: true