Skip to content

Commit bb2e284

Browse files
authored
Merge pull request #1095 from luxonis/feat/install-rework
fix: imporved install script
2 parents 27410ce + daf4a37 commit bb2e284

File tree

5 files changed

+117
-213
lines changed

5 files changed

+117
-213
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Build and Test viewer on Linux and macOS
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
build-and-test:
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
matrix:
16+
os:
17+
- ubuntu-latest
18+
- ubuntu-24.04
19+
- ubuntu-22.04
20+
- macos-latest
21+
- macos-14
22+
- macos-13
23+
24+
steps:
25+
- name: Checkout repository
26+
uses: actions/checkout@v4
27+
28+
- name: Set execute permissions for install script
29+
run: chmod +x docs/install_depthai.sh
30+
31+
- name: Run installation script
32+
run: ./docs/install_depthai.sh
33+
34+
- name: Verify installation success
35+
run: echo "Installation script executed successfully"

.github/workflows/test-install-dependencies.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@
66
paths:
77
- 'docs/install_dependencies.sh'
88
- 'examples/install_requirements.py'
9+
- 'docs/install_depthai.sh'
910
pull_request:
1011
paths:
1112
- 'docs/install_dependencies.sh'
1213
- 'examples/install_requirements.py'
14+
- 'docs/install_depthai.sh'
1315

1416
jobs:
1517
test_linux:

docs/install_dependencies.sh

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ readonly debian_pkgs=(
2828
libtiff-dev
2929
# https://stackoverflow.com/questions/55313610
3030
ffmpeg
31+
python3-venv
3132
libsm6
3233
libxext6
3334
python3-pyqt5
@@ -117,12 +118,6 @@ readonly fedora_pkgs=(
117118
# libsm6 libxext6 libgl1-mesa-glx
118119
)
119120

120-
# Check Bash version
121-
if [[ "${BASH_VERSINFO:-0}" -lt 4 ]]; then
122-
echo "This script requires Bash 4.0 or higher. You are using Bash ${BASH_VERSION}. Please upgrade your Bash version."
123-
exit 1
124-
fi
125-
126121
print_action () {
127122
green="\e[0;32m"
128123
reset="\e[0;0m"
@@ -137,7 +132,12 @@ version_lte() {
137132
[[ "$1" == "$(echo -e "$1\n$2" | sort -V | head -n1)" ]]
138133
}
139134

140-
declare -A debian_versions=(
135+
136+
137+
# Function to lookup and print Debian version number
138+
lookup_debian_version_number() {
139+
140+
declare -A debian_versions=(
141141
["trixie/sid"]="13"
142142
["bookworm/sid"]="12"
143143
["bullseye/sid"]="11"
@@ -147,10 +147,7 @@ declare -A debian_versions=(
147147
["wheezy/sid"]="7"
148148
["squeeze/sid"]="6"
149149
)
150-
151-
# Function to lookup and print Debian version number
152-
lookup_debian_version_number() {
153-
debian_version_string="$1"
150+
debian_version_string="$1"
154151
version_number="${debian_versions[$debian_version_string]}"
155152

156153
if [ -n "$version_number" ]; then

0 commit comments

Comments
 (0)