Fix Ubuntu OpenJPEG provisioning (#113)
All checks were successful
Native code generation / deterministic (push) Successful in 14m31s
Imaging and meshing gate / native (push) Successful in 5m5s
JPEG 2000 feature / linux (push) Successful in 2m40s
Native Rust workspace compile / compile (push) Successful in 5m18s

This commit is contained in:
2026-08-10 11:57:42 +00:00
parent ed516a1a5d
commit cf98152e41
5 changed files with 108 additions and 10 deletions

View File

@@ -10,6 +10,7 @@ on:
- "crates/libremetaverse-types/**"
- "crates/libremetaverse-imaging/**"
- "crates/libremetaverse-openjpeg/**"
- "tools/install_openjpeg_2_5_4.sh"
pull_request:
paths:
- ".gitea/workflows/jpeg2000.yml"
@@ -19,16 +20,18 @@ on:
- "crates/libremetaverse-types/**"
- "crates/libremetaverse-imaging/**"
- "crates/libremetaverse-openjpeg/**"
- "tools/install_openjpeg_2_5_4.sh"
workflow_dispatch:
jobs:
linux:
runs-on: ubuntu-latest
env:
# Ubuntu 24.04 also ships an older libopenjp2.so.7. Ensure both
# pkg-config and the runtime loader select the audited 2.5.4 install.
PKG_CONFIG_PATH: /usr/local/lib/pkgconfig
LD_LIBRARY_PATH: /usr/local/lib
# Ubuntu also ships an older libopenjp2.so.7. Ensure both pkg-config and
# the runtime loader select this run's isolated, audited 2.5.4 install.
OPENJPEG_PREFIX: /tmp/metacrate-openjpeg-${{ github.run_id }}
PKG_CONFIG_PATH: /tmp/metacrate-openjpeg-${{ github.run_id }}/lib/pkgconfig
LD_LIBRARY_PATH: /tmp/metacrate-openjpeg-${{ github.run_id }}/lib
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
@@ -36,12 +39,7 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install --yes build-essential cmake pkg-config
git clone --branch v2.5.4 --depth 1 https://github.com/uclouvain/openjpeg.git /tmp/openjpeg-2.5.4
cmake -S /tmp/openjpeg-2.5.4 -B /tmp/openjpeg-build -DBUILD_CODEC=OFF -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release
cmake --build /tmp/openjpeg-build --parallel
sudo cmake --install /tmp/openjpeg-build
sudo ldconfig
test "$(pkg-config --modversion libopenjp2)" = "2.5.4"
tools/install_openjpeg_2_5_4.sh "$OPENJPEG_PREFIX"
- name: Build and test optional feature
run: |
cargo test -p libremetaverse-imaging --features jpeg2000