Skip to content

Commit 2dfc500

Browse files
committed
CI: Fix build.
1 parent 94c52d5 commit 2dfc500

2 files changed

Lines changed: 22 additions & 3 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ on:
1515

1616
env:
1717
# Common settings.
18-
CMAKE_VERSION: 3.21.x
18+
CMAKE_VERSION: 3.24.x
1919
# Common paths.
2020
ci_source_dir: ${{ github.workspace }}/source-code
2121
ci_build_script: ./source-code/Script/ci_build.sh

Script/ci_build.sh

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ declare -A build_config=(
2525
[windows]='RelWithDebInfo'
2626
)
2727

28+
if [[ "$ci_platform" == "windows" ]] || [[ "$ci_platform" == "uwp" ]];
29+
then
30+
sep=';' # Windows uses semicolon as path separator
31+
else
32+
sep=':' # Unix-like systems use colon as path separator
33+
fi
34+
2835
function action-dependencies() {
2936
if [[ "$ci_platform" == "web" ]]; then
3037
sudo apt-get install -y --no-install-recommends uuid-dev ninja-build
@@ -34,12 +41,18 @@ function action-dependencies() {
3441
}
3542

3643
function action-generate() {
44+
ls -lah $ci_native_sdk_dir
45+
echo '---'
46+
ls -lah $ci_target_sdk_dir
47+
echo '---'
48+
3749
local params=(
3850
"-B"
3951
"$ci_build_dir"
4052
"-S"
4153
"$ci_source_dir"
4254
)
55+
CMAKE_PREFIX_PATH='CMAKE_PREFIX_PATH'
4356
if [[ "$ci_platform" == "web" ]]; then
4457
params+=(
4558
"-G"
@@ -48,10 +61,11 @@ function action-generate() {
4861
"-DEMSCRIPTEN_ROOT_PATH=$EMSDK/upstream/emscripten/"
4962
"-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON"
5063
"-DBUILD_SHARED_LIBS=OFF"
51-
"-DURHO3D_SDK=$ci_native_sdk_dir"
5264
"-DCI_WEB_BUILD=ON"
5365
"-DCMAKE_BUILD_TYPE=Release"
66+
"-DCMAKE_FIND_DEBUG_MODE=ON"
5467
)
68+
CMAKE_PREFIX_PATH='CMAKE_FIND_ROOT_PATH'
5569
elif [[ "$ci_platform" == "windows" ]]; then
5670
params+=(
5771
"-G"
@@ -63,9 +77,14 @@ function action-generate() {
6377
fi
6478

6579
if [[ $ci_build_mode == "sdk" ]]; then
66-
params+=("-DREBELFORK_SDK=$ci_target_sdk_dir")
80+
params+=("-D$CMAKE_PREFIX_PATH=$ci_target_sdk_dir${sep}$ci_native_sdk_dir")
81+
else
82+
# Subdirectory mode: point to engine CMake directory
83+
local engine_path="$ci_source_dir/../rbfx"
84+
params+=("-D$CMAKE_PREFIX_PATH=$engine_path/CMake${sep}$ci_native_sdk_dir")
6785
fi
6886

87+
echo "cmake ${params[@]}"
6988
cmake "${params[@]}"
7089
}
7190

0 commit comments

Comments
 (0)