Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 5 additions & 16 deletions .github/scripts/utils.zsh/setup_linux
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ if (( ! ${+target} )) {

pushd ${project_root}

typeset -g QT_VERSION

local -a apt_args=(
${CI:+-y}
--no-install-recommends
Expand Down Expand Up @@ -45,20 +43,11 @@ if (( ! (${skips[(Ie)all]} + ${skips[(Ie)deps]}) )) {

local -a _qt_packages=()

if (( QT_VERSION == 5 )) {
_qt_packages+=(
qtbase5-dev${suffix}
libqt5svg5-dev${suffix}
qtbase5-private-dev${suffix}
libqt5x11extras5-dev${suffix}
)
} else {
_qt_packages+=(
qt6-base-dev${suffix}
libqt6svg6-dev${suffix}
qt6-base-private-dev${suffix}
)
}
_qt_packages+=(
qt6-base-dev${suffix}
libqt6svg6-dev${suffix}
qt6-base-private-dev${suffix}
)

sudo apt-get install ${apt_args} ${_qt_packages}
log_group
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/build-project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,20 @@ jobs:
restore-keys: |
${{ runner.os }}-ccache-${{ matrix.architecture }}-

- uses: actions/cache@v4
id: icu-cache
with:
path: |
${{ github.workspace }}/build_macos/ICU_build-prefix/bin
${{ github.workspace }}/build_macos/ICU_build-prefix/include
${{ github.workspace }}/build_macos/ICU_build-prefix/lib
${{ github.workspace }}/build_macos/ICU_build-prefix/sbin
${{ github.workspace }}/build_macos/ICU_build-prefix/share
${{ github.workspace }}/build_macos/ICU_build-prefix/tmp
key: ${{ runner.os }}-icu-build-${{ needs.check-event.outputs.config }}-${{ matrix.architecture }}
restore-keys: |
${{ runner.os }}-icu-build-${{ matrix.architecture }}-

- uses: actions-rust-lang/setup-rust-toolchain@v1
if: matrix.architecture == 'arm64'
with:
Expand Down Expand Up @@ -153,6 +167,7 @@ jobs:
codesignIdent: ${{ steps.codesign.outputs.codesignIdent }}
env:
MACOS_ARCH: ${{ matrix.architecture }}
GITHUB_WORKSPACE: ${{ github.workspace }}

- name: Package Plugin 📀
uses: ./.github/actions/package-plugin
Expand Down Expand Up @@ -196,6 +211,25 @@ jobs:
submodules: recursive
fetch-depth: 0

- uses: awalsh128/cache-apt-pkgs-action@v1.6.0
with:
packages: |
ccache
libcurl4-openssl-dev
libicu-dev
libgles2-mesa-dev
libopenblas-dev
libopenblas-openmp-dev
libqt6svg6-dev
libsimde-dev
libvulkan-dev
obs-studio
pkg-config
qt6-base-dev
qt6-base-private-dev
add-repository: ppa:obsproject/obs-studio
version: 1.0

- name: Set Up Environment 🔧
id: setup
run: |
Expand Down
24 changes: 20 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,26 @@ if(USE_SYSTEM_ICU)
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE "${ICU_LIBRARIES}")
target_include_directories(${CMAKE_PROJECT_NAME} SYSTEM PUBLIC "${ICU_INCLUDE_DIRS}")
else()
include(cmake/BuildICU.cmake)
# Add ICU to the target
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE ICU)
target_include_directories(${CMAKE_PROJECT_NAME} SYSTEM PUBLIC ${ICU_INCLUDE_DIR})
find_library(ICU_DATA_LIB icudata OPTIONAL)
find_library(ICU_UC_LIB icuuc OPTIONAL)
find_library(ICU_I18N_LIB icui18n OPTIONAL)

if(ICU_DATA_LIB
AND ICU_UC_LIB
AND ICU_I18N_LIB)
list(APPEND ICU_LIBRARIES ${ICU_DATA_LIB} ${ICU_UC_LIB} ${ICU_I18N_LIB})
message(STATUS "Cached ICU libs: " ${ICU_LIBRARIES})
set(ICU_INCLUDE_DIR "${CMAKE_BINARY_DIR}/ICU_build-prefix/include")
message(STATUS "Cached ICU include dir: " ${ICU_INCLUDE_DIR})

target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE "${ICU_LIBRARIES}")
target_include_directories(${CMAKE_PROJECT_NAME} SYSTEM PUBLIC ${ICU_INCLUDE_DIR})
else()
include(cmake/BuildICU.cmake)
# Add ICU to the target
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE ICU)
target_include_directories(${CMAKE_PROJECT_NAME} SYSTEM PUBLIC ${ICU_INCLUDE_DIR})
endif()
endif()

# check env var for extra verbose logging
Expand Down
3 changes: 2 additions & 1 deletion CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
"description": "Build for macOS 12.0+ (Universal binary) for CI",
"generator": "Xcode",
"cacheVariables": {
"CMAKE_COMPILE_WARNING_AS_ERROR": true
"CMAKE_COMPILE_WARNING_AS_ERROR": true,
"CMAKE_PREFIX_PATH": "$penv{GITHUB_WORKSPACE}/build_macos/ICU_build-prefix"
}
},
{
Expand Down
Loading