mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-17 19:48:51 +00:00
Harmony port: Workflows
This commit is contained in:
parent
3a4de2ad89
commit
462476f150
2 changed files with 44 additions and 0 deletions
33
.github/actions/setup-harmony-toolchain/action.yml
vendored
Normal file
33
.github/actions/setup-harmony-toolchain/action.yml
vendored
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
name: 'Setup Harmony toolchain'
|
||||
inputs:
|
||||
version:
|
||||
description: 'Harmony version'
|
||||
default: '5.0.0-Release'
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- uses: actions/cache/restore@v4
|
||||
id: restore-cache
|
||||
with:
|
||||
path: /opt/native
|
||||
key: harmony-${{ inputs.version }}
|
||||
|
||||
- name: Download Harmony toolchain
|
||||
if: ${{ !steps.restore-cache.outputs.cache-hit }}
|
||||
shell: bash
|
||||
run: |
|
||||
wget https://repo.huaweicloud.com/openharmony/os/${{ inputs.version }}/ohos-sdk-windows_linux-public.tar.gz
|
||||
tar -zxvf ohos-sdk-windows_linux-public.tar.gz
|
||||
mkdir -p /opt
|
||||
|
||||
unzip linux/native*.zip -d /opt
|
||||
- uses: actions/cache/save@v4
|
||||
if: ${{ !steps.restore-cache.outputs.cache-hit }}
|
||||
with:
|
||||
path: /opt/native
|
||||
key: harmony-${{ inputs.version }}
|
||||
- name: 'Set output vars'
|
||||
id: final
|
||||
shell: bash
|
||||
run: |
|
||||
echo "HARMONY_NATIVE_SDK=/opt/native" >> $GITHUB_OUTPUT
|
||||
11
.github/workflows/create-test-plan.py
vendored
11
.github/workflows/create-test-plan.py
vendored
|
|
@ -55,6 +55,7 @@ class SdlPlatform(Enum):
|
|||
FreeBSD = "freebsd"
|
||||
NetBSD = "netbsd"
|
||||
NGage = "ngage"
|
||||
Harmony = "harmony"
|
||||
|
||||
|
||||
class Msys2Platform(Enum):
|
||||
|
|
@ -141,6 +142,7 @@ JOB_SPECS = {
|
|||
"netbsd": JobSpec(name="NetBSD", os=JobOs.UbuntuLatest, platform=SdlPlatform.NetBSD, artifact="SDL-netbsd-x64", ),
|
||||
"freebsd": JobSpec(name="FreeBSD", os=JobOs.UbuntuLatest, platform=SdlPlatform.FreeBSD, artifact="SDL-freebsd-x64", ),
|
||||
"ngage": JobSpec(name="N-Gage", os=JobOs.WindowsLatest, platform=SdlPlatform.NGage, artifact="SDL-ngage", ),
|
||||
"harmony": JobSpec(name="Harmony", os=JobOs.UbuntuLatest, platform=SdlPlatform.Harmony, artifact="SDL-harmony-arm64", harmony_arch="arm64-v8a"),
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -757,6 +759,15 @@ def spec_to_job(spec: JobSpec, key: str, trackmem_symbol_names: bool) -> JobDeta
|
|||
job.setup_gage_sdk_path = "C:/ngagesdk"
|
||||
job.cmake_toolchain_file = "C:/ngagesdk/cmake/ngage-toolchain.cmake"
|
||||
job.test_pkg_config = False
|
||||
case SdlPlatform.Harmony:
|
||||
job.cmake_arguments.extend((
|
||||
f"-DOHOS_ARCH={spec.harmony_arch}",
|
||||
"-DCMAKE_TOOLCHAIN_FILE=/opt/native/build/cmake/ohos.toolchain.cmake",
|
||||
))
|
||||
job.shared_lib = SharedLibType.SO_0
|
||||
job.static_lib = StaticLibType.A
|
||||
job.run_tests = False
|
||||
job.test_pkg_config = False
|
||||
case _:
|
||||
raise ValueError(f"Unsupported platform={spec.platform}")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue