diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1b015fc3..3bda07c9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,6 +42,14 @@ jobs: wget https://boostorg.jfrog.io/artifactory/main/release//1.81.0/source/boost_1_81_0.tar.gz tar -xf boost_1_81_0.tar.gz + - name: Get ICU + id: get-icu + run: | + wget https://github.com/unicode-org/icu/releases/download/release-71-1/icu4c-71_1-Ubuntu20.04-x64.tgz + tar -xf icu4c-71_1-Ubuntu20.04-x64.tgz + + echo "root=${{ github.workspace }}/icu/usr/local" >> $GITHUB_OUTPUT + - name: Install APT package dependencies run: | sudo apt-get update @@ -58,12 +66,13 @@ jobs: mkdir build cd build export CXX="g++-10" CC="gcc-10" - cmake .. -DBOOST_ROOT="boost_1_81_0" -DCPACK_PACKAGE_VERSION="${{ steps.get-libloot-version.outputs.version }}" + cmake .. -DBOOST_ROOT="boost_1_81_0" -DICU_ROOT="${{ steps.get-icu.outputs.root }}" -DCPACK_PACKAGE_VERSION="${{ steps.get-libloot-version.outputs.version }}" make all - name: Run tests run: | cd build + export LD_LIBRARY_PATH="${{ steps.get-icu.outputs.root }}/lib" ./libloot_internals_tests ./libloot_tests diff --git a/CMakeLists.txt b/CMakeLists.txt index 2f1f4f12..6da08134 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -61,7 +61,7 @@ endif() find_package(Boost REQUIRED) if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows") - find_package(ICU REQUIRED COMPONENTS uc) + find_package(ICU 71.1 EXACT REQUIRED COMPONENTS data uc) find_package(TBB REQUIRED) endif() @@ -447,11 +447,11 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows") target_link_libraries(loot PRIVATE ${LOOT_LIBS}) target_link_libraries(libloot_tests PRIVATE ${LOOT_LIBS}) else() - set(LOOT_LIBS ICU::uc pthread stdc++fs TBB::tbb) + set(LOOT_LIBS ICU::data ICU::uc pthread stdc++fs TBB::tbb) target_link_libraries(libloot_internals_tests PRIVATE ${LOOT_LIBS}) target_link_libraries(loot PRIVATE ${LOOT_LIBS}) - target_link_libraries(libloot_tests PRIVATE pthread) + target_link_libraries(libloot_tests PRIVATE ${LOOT_LIBS}) endif() if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")