Skip to content

Commit

Permalink
CI: build for Ubuntu 24.04
Browse files Browse the repository at this point in the history
  • Loading branch information
astraw committed Sep 28, 2024
1 parent 1756f37 commit 5a35b44
Show file tree
Hide file tree
Showing 6 changed files with 423 additions and 0 deletions.
303 changes: 303 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,46 @@ strand-cam-pylon-ubuntu2004:
- build/
name: "strand-cam-pylon-ubuntu2004-${CI_COMMIT_SHA}"

strand-cam-pylon-ubuntu2404:
when: manual
image: ubuntu:noble
variables:
GIT_SUBMODULE_STRATEGY: recursive
script:
- _packaging/setup-ubuntu-24.04.sh
- _packaging/setup-opencv-4.9.0-static.sh
- _packaging/setup-ubuntu-24.04-pylon.sh
- _packaging/setup-ubuntu-24.04-ipp.sh
- apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y llvm-dev libclang-dev clang
- export PATH="$PATH:$CARGO_HOME/bin"

- export RUSTFLAGS="-D warnings"

- rustc --version

- cd strand-cam/yew_frontend && time ./build.sh && cd $CI_PROJECT_DIR/strand-cam/strand-cam-pylon

- >
source /opt/intel/bin/compilervars.sh -arch intel64 -platform linux &&
OPENCV_STATIC=1
PKG_CONFIG_PATH=/opt/opencv-4.9.0-static/lib/pkgconfig
IPP_STATIC=1
RUSTFLAGS="$RUSTFLAGS -C target-cpu=sandybridge -C codegen-units=1 -C link-args=-Wl,-rpath,/opt/pylon/lib"
NUM_JOBS=2
cargo build --no-default-features --features "strand-cam/bundle_files ipp-sys/2019 strand-cam/checkercal strand-cam/fiducial backtrace imops/simd strand-cam/flydra_feat_detect strand-cam/use_ipp strand-cam/imtrack-absdiff" --release
# - ../target/release/strand-cam --version # disabled because requires pylon libs in path
- mkdir -p $CI_PROJECT_DIR/build
- cp $CI_PROJECT_DIR/target/release/strand-cam-pylon $CI_PROJECT_DIR/build/
- cd $CI_PROJECT_DIR/write-debian-changelog
- cargo build --release
- $CI_PROJECT_DIR/target/release/write-debian-changelog strand-cam-pylon noble > $CI_PROJECT_DIR/build/strand-cam-pylon.changelog
- cp ../target/release/write-debian-changelog $CI_PROJECT_DIR/build/
artifacts:
paths:
- build/
name: "strand-cam-pylon-ubuntu2404-${CI_COMMIT_SHA}"

strand-cam-pylon-ubuntu2204:
when: manual
image: ubuntu:jammy
Expand Down Expand Up @@ -587,6 +627,47 @@ strand-cam-pylon-ubuntu2204:
- build/
name: "strand-cam-pylon-ubuntu2204-${CI_COMMIT_SHA}"

strand-cam-vimba-ubuntu2404:
when: manual
image: ubuntu:noble
variables:
GIT_SUBMODULE_STRATEGY: recursive

script:
- _packaging/setup-ubuntu-24.04.sh
- _packaging/setup-opencv-4.9.0-static.sh
- _packaging/setup-ubuntu-24.04-ipp.sh
- _packaging/setup-ubuntu-24.04-vimba.sh
- apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y llvm-dev libclang-dev clang
- export VIMBAC_LIBDIR="/opt/Vimba_6_0/VimbaC/DynamicLib/x86_64bit"
- export PATH="$PATH:$CARGO_HOME/bin"

- export RUSTFLAGS="-D warnings"

- rustc --version

- cd $CI_PROJECT_DIR/strand-cam/yew_frontend && time ./build.sh && cd $CI_PROJECT_DIR/strand-cam/strand-cam-vimba

- >
source /opt/intel/bin/compilervars.sh -arch intel64 -platform linux &&
OPENCV_STATIC=1
PKG_CONFIG_PATH=/opt/opencv-4.9.0-static/lib/pkgconfig
IPP_STATIC=1
RUSTFLAGS="$RUSTFLAGS -C target-cpu=sandybridge -C codegen-units=1 -C link-args=-Wl,-rpath,/opt/Vimba_6_0/VimbaC/DynamicLib/x86_64bit"
NUM_JOBS=2
cargo build --no-default-features --features "strand-cam/bundle_files ipp-sys/2019 strand-cam/checkercal strand-cam/fiducial backtrace imops/simd strand-cam/flydra_feat_detect strand-cam/use_ipp strand-cam/imtrack-absdiff" --release
- ldd $CI_PROJECT_DIR/target/release/strand-cam-vimba
- mkdir -p $CI_PROJECT_DIR/build
- cp $CI_PROJECT_DIR/target/release/strand-cam-vimba $CI_PROJECT_DIR/build
- cd $CI_PROJECT_DIR/write-debian-changelog
- cargo build --release
- $CI_PROJECT_DIR/target/release/write-debian-changelog strand-cam-vimba noble > $CI_PROJECT_DIR/build/strand-cam-vimba.changelog
artifacts:
paths:
- build/
name: "strand-cam-vimba-ubuntu2404-${CI_COMMIT_SHA}"

strand-cam-vimba-ubuntu2004:
image: ubuntu:focal
variables:
Expand Down Expand Up @@ -723,6 +804,45 @@ flytrax-csv-to-braidz-binary:
paths:
- build/

strand-cam-flydratrax-pylon-ubuntu2404:
when: manual
image: ubuntu:noble
variables:
GIT_SUBMODULE_STRATEGY: recursive
script:
- _packaging/setup-ubuntu-24.04.sh
- _packaging/setup-opencv-4.9.0-static.sh
- _packaging/setup-ubuntu-24.04-pylon.sh
- _packaging/setup-ubuntu-24.04-ipp.sh
- apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y llvm-dev libclang-dev clang
- export PATH="$PATH:$CARGO_HOME/bin"
- export RUSTFLAGS="-D warnings"

- cd strand-cam/yew_frontend && time ./build.sh && cd $CI_PROJECT_DIR/strand-cam/strand-cam-pylon-gui

- >
source /opt/intel/bin/compilervars.sh -arch intel64 -platform linux &&
OPENCV_STATIC=1
PKG_CONFIG_PATH=/opt/opencv-4.9.0-static/lib/pkgconfig:/opt/libvpx/libvpx-1.8.0/lib/pkgconfig
IPP_STATIC=1
RUSTFLAGS="$RUSTFLAGS -C target-cpu=sandybridge -C codegen-units=1 -C link-args=-Wl,-rpath,/opt/pylon/lib"
NUM_JOBS=2
cargo build --no-default-features --features "strand-cam/bundle_files strand-cam/flydratrax strand-cam/imtrack-dark-circle ipp-sys/2019 strand-cam/checkercal strand-cam/fiducial backtrace imops/simd strand-cam/flydra_feat_detect strand-cam/use_ipp" --release
# - ../target/release/strand-cam --version # disabled because requires pylon libs in path
- mkdir -p $CI_PROJECT_DIR/build
# Rename the target to `strand-cam-flydratrax-pylon`.
- cp $CI_PROJECT_DIR/target/release/strand-cam-pylon-gui $CI_PROJECT_DIR/build/strand-cam-flydratrax-pylon
- cp $CI_PROJECT_DIR/_packaging/strand-braid/strand-cam-flydratrax-pylon.desktop $CI_PROJECT_DIR/build/
- cd $CI_PROJECT_DIR/write-debian-changelog
- cargo build --release
- $CI_PROJECT_DIR/target/release/write-debian-changelog strand-cam-flydratrax-pylon noble > $CI_PROJECT_DIR/build/strand-cam-flydratrax-pylon.changelog
- cat $CI_PROJECT_DIR/build/strand-cam-flydratrax-pylon.changelog
artifacts:
paths:
- build/
name: "strand-cam-flydratrax-pylon-ubuntu2404-${CI_COMMIT_SHA}"

strand-cam-flydratrax-pylon-ubuntu2004:
image: ubuntu:focal
variables:
Expand Down Expand Up @@ -800,6 +920,29 @@ strand-cam-flydratrax-pylon-ubuntu2204:
- build/
name: "strand-cam-flydratrax-pylon-linux-${CI_COMMIT_SHA}"

braid-offline-ubuntu2404:
when: manual
image: ubuntu:noble
script:
- apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y curl build-essential git
- curl https://sh.rustup.rs -sSf | sh -s -- --profile minimal -y
- export PATH="$PATH:$CARGO_HOME/bin"
- export RUSTFLAGS="-D warnings"

# Build without glibc dependency so it runs on cluster with ancient glibc.
- rustup target install x86_64-unknown-linux-musl

- cd $CI_PROJECT_DIR/braid-offline
- cargo build --release --target x86_64-unknown-linux-musl

- mkdir -p $CI_PROJECT_DIR/build
- cp ../target/x86_64-unknown-linux-musl/release/braid-offline-retrack $CI_PROJECT_DIR/build/
- cp ../target/x86_64-unknown-linux-musl/release/compute-flydra1-compat $CI_PROJECT_DIR/build/
artifacts:
paths:
- build/
name: "braid-offline-ubuntu2404-${CI_COMMIT_SHA}"

braid-offline-ubuntu2004:
image: ubuntu:focal
script:
Expand Down Expand Up @@ -845,6 +988,27 @@ braid-offline-ubuntu2204:
- build/
name: "braid-offline-ubuntu2204-${CI_COMMIT_SHA}"

braid-process-video-ubuntu2404:
when: manual
image: ubuntu:noble
script:
- apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y dpkg-dev debhelper git libavformat-dev libavfilter-dev libavdevice-dev pkg-config libclang-dev libvpx-dev curl

- curl https://sh.rustup.rs -sSf | sh -s -- --profile minimal -y
- source $CARGO_HOME/env
- export RUSTFLAGS="-D warnings"

- cd braid-process-video
- cargo test --release
- cargo build --release

- mkdir -p $CI_PROJECT_DIR/build
- cp ../target/release/braid-process-video $CI_PROJECT_DIR/build/
artifacts:
paths:
- build/
name: "braid-process-video-ubuntu2404-${CI_COMMIT_SHA}"

braid-process-video-ubuntu2004:
image: ubuntu:focal
script:
Expand Down Expand Up @@ -900,6 +1064,38 @@ slow-braid-process-video-test:
- cd braid-process-video
- cargo test --release -- --include-ignored

extra-programs-ubuntu2404:
when: manual
image: ubuntu:noble
script:
- apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y curl clang libclang-dev pkg-config dpkg-dev debhelper
- _packaging/setup-opencv-4.9.0-static.sh
- curl https://sh.rustup.rs -sSf | sh -s -- --profile minimal -y
- source $CARGO_HOME/env
- export RUSTFLAGS="-D warnings"

- mkdir -p $CI_PROJECT_DIR/build

- cd $CI_PROJECT_DIR/braidz-export-rrd
- PKG_CONFIG_PATH=/opt/opencv-4.9.0-static/lib/pkgconfig OPENCV_STATIC=1 cargo build --release --features undistort-images
- cp ../target/release/braidz-export-rrd $CI_PROJECT_DIR/build

- cd $CI_PROJECT_DIR/braidz-parser/braidz-cli
- cargo build --release
- cp ../../target/release/braidz-cli $CI_PROJECT_DIR/build

- cd $CI_PROJECT_DIR/media-utils/strand-convert
- cargo build --release
- cp ../../target/release/strand-convert $CI_PROJECT_DIR/build

- cd $CI_PROJECT_DIR/media-utils/show-timestamps
- cargo build --release
- cp ../../target/release/show-timestamps $CI_PROJECT_DIR/build
artifacts:
paths:
- build/
name: "extra-programs-ubuntu2404-${CI_COMMIT_SHA}"

extra-programs-ubuntu2004:
image: ubuntu:focal
script:
Expand Down Expand Up @@ -963,6 +1159,25 @@ extra-programs-ubuntu2204:
- build/
name: "extra-programs-ubuntu2204-${CI_COMMIT_SHA}"

fmf-cli-ubuntu2404:
when: manual
image: ubuntu:noble
script:
- apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y dpkg-dev debhelper pkg-config libvpx-dev

- curl https://sh.rustup.rs -sSf | sh -s -- --profile minimal -y
- source $CARGO_HOME/env
- export RUSTFLAGS="-D warnings"

- cd $CI_PROJECT_DIR/fmf/fmf-cli
- cargo build --release
- mkdir -p $CI_PROJECT_DIR/build
- cp ../../target/release/fmf $CI_PROJECT_DIR/build
artifacts:
paths:
- build/
name: "fmf-cli-ubuntu2404-${CI_COMMIT_SHA}"

fmf-cli-ubuntu2004:
image: ubuntu:focal
script:
Expand Down Expand Up @@ -1026,6 +1241,43 @@ braid-webapps:
- ./build.sh
- cd ../..

braid-ubuntu2404:
when: manual
image: ubuntu:noble
variables:
GIT_SUBMODULE_STRATEGY: recursive
script:
- _packaging/setup-ubuntu-24.04.sh
- export PATH="$PATH:$CARGO_HOME/bin"
# - export RUSTFLAGS="-D warnings"

# build mainbrain web frontend
- cd $CI_PROJECT_DIR/braid/braid-run/braid_frontend
- ./build.sh

- mkdir -p $CI_PROJECT_DIR/build

# build braid-run
- cd $CI_PROJECT_DIR/braid/braid-run
- RUSTFLAGS="$RUSTFLAGS -C target-cpu=sandybridge -C codegen-units=1" NUM_JOBS=2 cargo build --no-default-features --features "bundle_files backtrace" --release
- ldd ../../target/release/braid-run
- cp ../../target/release/braid-run $CI_PROJECT_DIR/build

# build braid
- cd $CI_PROJECT_DIR/braid
- NUM_JOBS=2 cargo build --release
- ../target/release/braid-default-config # ensure default config gets printed
- ../target/release/braid-show-config simple.toml # ensure simple.toml config parses
- ldd ../target/release/braid
- cp ../target/release/braid $CI_PROJECT_DIR/build
- cp ../target/release/braid-show-config $CI_PROJECT_DIR/build
- cp ../target/release/braid-default-config $CI_PROJECT_DIR/build

artifacts:
paths:
- build/
name: "braid-ubuntu2404-${CI_COMMIT_SHA}"

braid-ubuntu2004:
image: ubuntu:focal
variables:
Expand Down Expand Up @@ -1135,6 +1387,57 @@ led-box-firmware:

# -------

# build the final downloadable .deb
strand-braid-ubuntu-2404:
when: manual
image: ubuntu:noble
script:
# The debian packaging infrastructure wants to have the .so files available to automatically determine which packages to depend on. The
# package list here is probably more than needed, but should contain the required subset.
- apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y dpkg-dev debhelper libudev-dev libapriltag-dev libssl-dev zlib1g-dev curl libavformat-dev libavfilter-dev libavdevice-dev

# Download pylon and install so dpkg figues out the source
- $CI_PROJECT_DIR/_packaging/setup-ubuntu-24.04-pylon.sh
# Download vimba and install
- $CI_PROJECT_DIR/_packaging/setup-ubuntu-24.04-vimba.sh

- mkdir -p strand-braid-ubuntu-2404-${CI_COMMIT_TAG}

- cd $CI_PROJECT_DIR/_packaging
- pwd
- ls -l ../build
- ldd ../build/flytrax-csv-to-braidz
- ldd ../build/strand-cam-flydratrax-pylon
- ldd ../build/strand-cam-pylon
- ldd ../build/strand-cam-vimba
- ldd ../build/braid
- ldd ../build/braid-run
- ldd ../build/braidz-export-rrd
- make
- for F in *.deb; do echo; echo $F; dpkg-deb -I $F; done
- cp -a *.deb $CI_PROJECT_DIR/strand-braid-ubuntu-2404-${CI_COMMIT_TAG}/

- cp $CI_PROJECT_DIR/_packaging/ubuntu-2404-installer-zip-readme.txt $CI_PROJECT_DIR/strand-braid-ubuntu-2404-${CI_COMMIT_TAG}/README.txt
- ls -lh $CI_PROJECT_DIR/strand-braid-ubuntu-2404-${CI_COMMIT_TAG}/
- dpkg --contents $CI_PROJECT_DIR/strand-braid-ubuntu-2404-${CI_COMMIT_TAG}/*.deb
needs:
- braid-offline-ubuntu2404
- braid-process-video-ubuntu2404
- braid-ubuntu2404
- extra-programs-ubuntu2404
- fmf-cli-ubuntu2404
- strand-cam-vimba-ubuntu2404
- strand-cam-pylon-ubuntu2404
- flytrax-csv-to-braidz-binary
- strand-cam-flydratrax-pylon-ubuntu2404
# For releases, we should upload the .zip to the github releases page, as the
# zip (but not the deb) will include that this is for "ubuntu-2404" in the
# filename.
artifacts:
paths:
- strand-braid-ubuntu-2404-${CI_COMMIT_TAG}/
name: "strand-braid-ubuntu-2404-${CI_COMMIT_TAG}"

# build the final downloadable .deb
strand-braid-ubuntu-2004:
image: ubuntu:focal
Expand Down
20 changes: 20 additions & 0 deletions _packaging/setup-ubuntu-24.04-ipp.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash -x
set -o errexit

apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y cpio

ORIG_DIR=`pwd`
echo $ORIG_DIR

# Install IPP
mkdir -p /tmp/download-ipp
cd /tmp/download-ipp
curl -O --show-error --fail --silent https://internal-static.strawlab.org/software/ipp/l_ipp_2019.3.199.tgz
curl -O --show-error --fail --silent https://internal-static.strawlab.org/software/ipp/install-ipp-2019.sh
chmod a+x install-ipp-2019.sh
/tmp/download-ipp/install-ipp-2019.sh
cd /
rm -rf /tmp/download-ipp

cd $ORIG_DIR
Loading

0 comments on commit 5a35b44

Please sign in to comment.