Skip to content

Commit 2b0177c

Browse files
committed
Simplify OpenHarmony build to target only ARM64
Removed the build matrix and related logic for multiple ABIs in the OpenHarmony build job. The workflow now only builds for the ARM64 architecture, streamlining the configuration and build steps.
1 parent 23cbfe7 commit 2b0177c

File tree

1 file changed

+19
-30
lines changed

1 file changed

+19
-30
lines changed

.github/workflows/build.yml

Lines changed: 19 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -151,14 +151,8 @@ jobs:
151151
152152
# OpenHarmony builds
153153
build-ohos:
154-
strategy:
155-
matrix:
156-
abi:
157-
- arm64-v8a
158-
- armeabi-v7a
159-
160154
runs-on: ubuntu-latest
161-
name: Build OpenHarmony (${{ matrix.abi }})
155+
name: Build OpenHarmony
162156

163157
steps:
164158
- uses: actions/checkout@v4
@@ -197,38 +191,33 @@ jobs:
197191
- name: Configure CMake for OpenHarmony
198192
shell: bash
199193
run: |
200-
# Map CMake ABIs to OpenHarmony architectures
201-
case "${{ matrix.abi }}" in
202-
arm64-v8a)
203-
OHOS_ARCH=arm64
204-
CMAKE_ANDROID_ARCH_ABI=arm64-v8a
205-
;;
206-
armeabi-v7a)
207-
OHOS_ARCH=arm
208-
CMAKE_ANDROID_ARCH_ABI=armeabi-v7a
209-
;;
210-
*)
211-
echo "Unsupported ABI: ${{ matrix.abi }}"
212-
exit 1
213-
;;
214-
esac
215-
216-
mkdir build-ohos-${{ matrix.abi }}
217-
cd build-ohos-${{ matrix.abi }}
218-
219-
# Configure CMake with OpenHarmony toolchain
194+
mkdir build-ohos
195+
cd build-ohos
196+
197+
# Find ninja executable
198+
NINJA=$(which ninja)
199+
echo "Found ninja at: $NINJA"
200+
201+
# Debug: Check SDK structure
202+
echo "SDK structure:"
203+
ls -la $OHOS_SDK_PATH/native/ || true
204+
echo "Toolchain file:"
205+
cat $OHOS_SDK_PATH/native/build/cmake/ohos.toolchain.cmake | head -150 || true
206+
207+
# Configure CMake with OpenHarmony toolchain (ARM64 only)
220208
cmake .. \
221209
-DCMAKE_SYSTEM_NAME=OHOS \
222210
-DCMAKE_TOOLCHAIN_FILE=$OHOS_SDK_PATH/native/build/cmake/ohos.toolchain.cmake \
223-
-DOHOS_ARCH=$OHOS_ARCH \
224-
-DCMAKE_ANDROID_ARCH_ABI=$CMAKE_ANDROID_ARCH_ABI \
211+
-DOHOS_ARCH=aarch64 \
212+
-DCMAKE_ANDROID_ARCH_ABI=arm64-v8a \
225213
-DCMAKE_BUILD_TYPE=Release \
214+
-DCMAKE_MAKE_PROGRAM=$NINJA \
226215
-G Ninja
227216
228217
- name: Build Examples
229218
shell: bash
230219
run: |
231-
cd build-ohos-${{ matrix.abi }}
220+
cd build-ohos
232221
cmake --build . --config Release
233222
234223
# Windows build

0 commit comments

Comments
 (0)