Skip to content

Commit

Permalink
Install ICU from package repositories in CI
Browse files Browse the repository at this point in the history
Ubuntu 24.04 provides a new-enough version of ICU to be accepted by the libloot build.
  • Loading branch information
Ortham committed Jan 13, 2025
1 parent a614a60 commit 8c7b77e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 24 deletions.
15 changes: 3 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ jobs:
runs-on: ubuntu-24.04

env:
ICU_MAJOR_VERSION: 71
LIBLOOT_VERSION: 0.24.5

steps:
Expand Down Expand Up @@ -49,17 +48,9 @@ jobs:
sudo apt-get install -y --no-upgrade \
cbindgen \
libboost-dev \
libicu-dev \
libtbb-dev
- name: Get ICU
id: get-icu
run: |
wget https://github.com/unicode-org/icu/releases/download/release-${ICU_MAJOR_VERSION}-1/icu4c-${ICU_MAJOR_VERSION}_1-Ubuntu20.04-x64.tgz
tar -xf icu4c-${ICU_MAJOR_VERSION}_1-Ubuntu20.04-x64.tgz
ICU_INSTALL_PATH="${{ github.workspace }}/icu/usr/local"
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ICU_INSTALL_PATH/lib" >> "$GITHUB_ENV"
echo "root=$ICU_INSTALL_PATH" >> $GITHUB_OUTPUT
- name: Download and build libloot
run: |
wget https://github.com/loot/libloot/archive/$LIBLOOT_VERSION.tar.gz
Expand All @@ -68,7 +59,7 @@ jobs:
mkdir libloot-$LIBLOOT_VERSION/build
cd libloot-$LIBLOOT_VERSION/build
cmake .. -DICU_ROOT="${{ steps.get-icu.outputs.root }}" -DLIBLOOT_BUILD_TESTS=OFF -DLIBLOOT_INSTALL_DOCS=OFF -DCMAKE_INSTALL_PREFIX="$LIBLOOT_INSTALL_PATH"
cmake .. -DLIBLOOT_BUILD_TESTS=OFF -DLIBLOOT_INSTALL_DOCS=OFF -DCMAKE_INSTALL_PREFIX="$LIBLOOT_INSTALL_PATH"
cmake --build . --target loot --config Release
cmake --install . --config Release
Expand All @@ -78,7 +69,7 @@ jobs:
run: |
mkdir build
cd build
cmake .. -DICU_ROOT="${{ steps.get-icu.outputs.root }}" -DCMAKE_PREFIX_PATH="${{ env.LIBLOOT_INSTALL_PATH }}" -DCPACK_PACKAGE_VERSION="${{ steps.get-version.outputs.version }}"
cmake .. -DCMAKE_PREFIX_PATH="${{ env.LIBLOOT_INSTALL_PATH }}" -DCPACK_PACKAGE_VERSION="${{ steps.get-version.outputs.version }}"
make all
- name: Build archive
Expand Down
15 changes: 3 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ jobs:
needs: create_release

env:
ICU_MAJOR_VERSION: 71
LIBLOOT_VERSION: 0.24.5

steps:
Expand Down Expand Up @@ -70,17 +69,9 @@ jobs:
sudo apt-get install -y --no-upgrade \
cbindgen \
libboost-dev \
libicu-dev \
libtbb-dev
- name: Get ICU
id: get-icu
run: |
wget https://github.com/unicode-org/icu/releases/download/release-${ICU_MAJOR_VERSION}-1/icu4c-${ICU_MAJOR_VERSION}_1-Ubuntu20.04-x64.tgz
tar -xf icu4c-${ICU_MAJOR_VERSION}_1-Ubuntu20.04-x64.tgz
ICU_INSTALL_PATH="${{ github.workspace }}/icu/usr/local"
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ICU_INSTALL_PATH/lib" >> "$GITHUB_ENV"
echo "root=$ICU_INSTALL_PATH" >> $GITHUB_OUTPUT
- name: Download and build libloot
run: |
wget https://github.com/loot/libloot/archive/$LIBLOOT_VERSION.tar.gz
Expand All @@ -89,7 +80,7 @@ jobs:
mkdir libloot-$LIBLOOT_VERSION/build
cd libloot-$LIBLOOT_VERSION/build
cmake .. -DICU_ROOT="${{ steps.get-icu.outputs.root }}" -DLIBLOOT_BUILD_TESTS=OFF -DLIBLOOT_INSTALL_DOCS=OFF -DCMAKE_INSTALL_PREFIX="$LIBLOOT_INSTALL_PATH"
cmake .. -DLIBLOOT_BUILD_TESTS=OFF -DLIBLOOT_INSTALL_DOCS=OFF -DCMAKE_INSTALL_PREFIX="$LIBLOOT_INSTALL_PATH"
cmake --build . --target loot --config Release
cmake --install . --config Release
Expand All @@ -99,7 +90,7 @@ jobs:
run: |
mkdir build
cd build
cmake .. -DICU_ROOT="${{ steps.get-icu.outputs.root }}" -DCMAKE_PREFIX_PATH="${{ env.LIBLOOT_INSTALL_PATH }}" -DCPACK_PACKAGE_VERSION="${{ steps.get-version.outputs.version }}"
cmake .. -DCMAKE_PREFIX_PATH="${{ env.LIBLOOT_INSTALL_PATH }}" -DCPACK_PACKAGE_VERSION="${{ steps.get-version.outputs.version }}"
make all
- name: Build archive
Expand Down

0 comments on commit 8c7b77e

Please sign in to comment.