Skip to content

Commit cc275fa

Browse files
committed
Bump CI Ubuntu image to 24.04
1 parent a29d222 commit cc275fa

File tree

5 files changed

+50
-31
lines changed

5 files changed

+50
-31
lines changed

.github/workflows/opencv-rust.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@ jobs:
1212
fail-fast: false
1313
matrix:
1414
os-image:
15-
- ubuntu-22.04
15+
- ubuntu-24.04
1616
- macos-14
1717
opencv-version:
1818
- 4.11.0
1919
linkage:
2020
- dynamic
2121
include:
22-
- os-image: ubuntu-22.04
22+
- os-image: ubuntu-24.04
2323
opencv-version: 4.11.0
2424
linkage: static
25-
- os-image: ubuntu-22.04
25+
- os-image: ubuntu-24.04
2626
opencv-version: 5.0.0-alpha
2727
linkage: dynamic
2828
- os-image: ubuntu-22.04
@@ -67,7 +67,7 @@ jobs:
6767
fail-fast: false
6868
matrix:
6969
os-image:
70-
- ubuntu-22.04
70+
- ubuntu-24.04
7171
- windows-2022
7272
- macos-14
7373
vcpkg-version:
@@ -104,6 +104,9 @@ jobs:
104104
- opencv: 3.4.16
105105
- opencv: 4.10.0
106106
include:
107+
- os-image: ubuntu-24.04
108+
version:
109+
opencv: 4.6.0
107110
- os-image: ubuntu-22.04
108111
version:
109112
opencv: 4.5.4
@@ -133,7 +136,7 @@ jobs:
133136
shell: bash
134137

135138
docs-rs:
136-
runs-on: ubuntu-22.04
139+
runs-on: ubuntu-24.04
137140
steps:
138141
- uses: actions/checkout@v4
139142
- uses: dtolnay/rust-toolchain@stable

ci/check.sh

Lines changed: 0 additions & 12 deletions
This file was deleted.

ci/docs-rs.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,5 @@ set -xeu
55
sudo apt-get update
66
sudo apt-get install -y clang libclang-dev
77

8-
# workaround to make clang_sys crate detect installed libclang
9-
sudo ln -fs libclang.so.1 /usr/lib/llvm-14/lib/libclang.so
10-
118
export RUST_BACKTRACE=full DOCS_RS=1
129
cargo doc -vv

ci/install-ubuntu-vcpkg.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ sudo apt-get update
1111
sudo apt-get install -y clang libharfbuzz0b git curl zip unzip tar bison gperf libx11-dev libxft-dev libxext-dev \
1212
libgles2-mesa-dev autoconf libtool build-essential libxrandr-dev libxi-dev libxcursor-dev libxdamage-dev libxinerama-dev \
1313
libdbus-1-dev libxtst-dev sudo python3-jinja2 cmake
14-
15-
# workaround to make clang_sys crate detect installed libclang
16-
sudo ln -fs libclang.so.1 /usr/lib/llvm-14/lib/libclang.so
14+
sudo apt-get install -y automake pkg-config
1715

1816
export VCPKG_ROOT="$HOME/build/vcpkg"
1917
export VCPKG_DISABLE_METRICS=1
@@ -38,7 +36,7 @@ export VCPKG_DEFAULT_TRIPLET=x64-linux
3836
which cmake
3937
cmake --version
4038
if ! ./vcpkg install --clean-after-build --recurse "opencv[contrib,nonfree,ade,opencl]"; then
41-
for log in "$VCPKG_ROOT/buildtrees"/**/*out.log; do
39+
for log in "$VCPKG_ROOT/buildtrees"/**/*-{out,err}.log; do
4240
echo "=== $log"
4341
cat "$log"
4442
done

ci/install-ubuntu.sh

Lines changed: 40 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@ ubuntu_version="$(cat /etc/os-release | sed -nr 's:^VERSION_ID="(.+?)":\1: p')"
88

99
sudo apt-get install -y clang libclang-dev
1010
case "$ubuntu_version" in
11-
"18.04")
12-
# workaround to make clang_sys crate detect installed libclang
13-
sudo ln -fs libclang.so.1 /usr/lib/llvm-6.0/lib/libclang.so
14-
;;
15-
1611
"20.04")
1712
# workaround to make clang_sys crate detect installed libclang
1813
sudo ln -fs libclang.so.1 /usr/lib/llvm-10/lib/libclang.so
@@ -30,6 +25,13 @@ case "$ubuntu_version" in
3025
exit 0
3126
fi
3227
;;
28+
29+
"24.04")
30+
if [[ "$OPENCV_VERSION" == "4.6.0" ]]; then
31+
sudo apt-get -y install "libopencv-dev=${OPENCV_VERSION}*"
32+
exit 0
33+
fi
34+
;;
3335
esac
3436

3537
BUILD_FLAGS="
@@ -136,7 +138,6 @@ BUILD_FLAGS="
136138
sudo apt-get -y install build-essential cmake
137139

138140
if [[ "${OPENCV_LINKAGE:-dynamic}" == "static" ]]; then # static build
139-
# bring back -D BUILD_TBB=ON when updated to Ubuntu-24.04 (https://github.com/opencv/opencv/issues/25187)
140141
BUILD_FLAGS="$BUILD_FLAGS
141142
-D BUILD_JPEG=ON
142143
-D BUILD_OPENJPEG=ON
@@ -160,7 +161,7 @@ if [[ "${OPENCV_LINKAGE:-dynamic}" == "static" ]]; then # static build
160161
"
161162
else # dynamic build
162163
case "$ubuntu_version" in
163-
"18.04" | "20.04")
164+
"20.04")
164165
sudo apt-get -y install \
165166
libatlas-base-dev \
166167
libavcodec-dev \
@@ -256,6 +257,38 @@ else # dynamic build
256257
libwebp-dev \
257258
qtbase5-dev
258259
;;
260+
261+
"24.04")
262+
# runtime deps
263+
sudo apt-get -y install \
264+
libatlas-base-dev \
265+
libavcodec-dev \
266+
libavformat-dev \
267+
libceres-dev \
268+
libdc1394-dev \
269+
libeigen3-dev \
270+
libfreetype6-dev \
271+
libgdal-dev \
272+
libgflags-dev \
273+
libgoogle-glog-dev \
274+
libgphoto2-dev \
275+
libgstreamer-plugins-base1.0-dev \
276+
libharfbuzz-dev \
277+
libhdf5-dev \
278+
libjpeg-dev \
279+
liblapacke64-dev \
280+
libleptonica-dev \
281+
libopenexr-dev \
282+
libpng-dev \
283+
libswscale-dev \
284+
libtbb-dev \
285+
libtesseract-dev \
286+
libtiff-dev \
287+
libunwind-dev \
288+
libvtk9-dev \
289+
libwebp-dev \
290+
qtbase5-dev
291+
;;
259292
esac
260293
fi
261294

0 commit comments

Comments
 (0)