Fix Ubuntu OpenJPEG provisioning (#113)
All checks were successful
All checks were successful
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user