Skip to content

Commit 52c7695

Browse files
authored
Merge pull request #5044 from martin-frbg/issue5043
[WIP,Testing] Add CI workflow to test crossbuilding for Huawei HarmonyOS
2 parents e4f83d4 + 14e6835 commit 52c7695

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/harmonyos.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: harmonyos
2+
3+
on: [push, pull_request]
4+
5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
7+
cancel-in-progress: true
8+
9+
permissions:
10+
contents: read # to fetch code (actions/checkout)
11+
12+
jobs:
13+
build:
14+
if: "github.repository == 'OpenMathLib/OpenBLAS'"
15+
runs-on: ubuntu-latest
16+
env:
17+
OHOS_NDK_CMAKE: $GITHUB_WORKSPACE/ohos-sdk/linux/native/build-tools/cmake/bin/cmake
18+
COMMON_CMAKE_OPTIONS: |
19+
-DCMAKE_TOOLCHAIN_FILE=$GITHUB_WORKSPACE/ohos-sdk/linux/native/build/cmake/ohos.toolchain.cmake \
20+
-DCMAKE_INSTALL_PREFIX=install \
21+
-DCMAKE_BUILD_TYPE=Release \
22+
steps:
23+
- uses: actions/checkout@v4
24+
- name: ndk-install
25+
run: |
26+
wget https://repo.huaweicloud.com/harmonyos/os/4.1.1-Release/ohos-sdk-windows_linux-public.tar.gz
27+
tar -xf ohos-sdk-windows_linux-public.tar.gz
28+
cd ohos-sdk/linux
29+
unzip -q native-linux-x64-4.1.7.8-Release.zip
30+
cd -
31+
- name: build-armv8
32+
run: |
33+
mkdir build && cd build
34+
${{ env.OHOS_NDK_CMAKE }} ${{ env.COMMON_CMAKE_OPTIONS }} -DOHOS_ARCH="arm64-v8a" \
35+
-DTARGET=ARMV8 -DNOFORTRAN=1 ..
36+
${{ env.OHOS_NDK_CMAKE }} --build . -j $(nproc)
37+

0 commit comments

Comments
 (0)