-
Notifications
You must be signed in to change notification settings - Fork 8
49 lines (46 loc) · 1.76 KB
/
build-ndk-win.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Build NDK (Win)
on:
workflow_call:
jobs:
build-ndk-win:
runs-on: [ self-hosted, Windows, X64, w10-1344 ]
steps:
- uses: actions/checkout@v2
- name: git-update-dependecies
run: git submodule update --init
- name: Find NDK SHA
run: |
$INWORLD_NDK_SHA=(git submodule status).Trim().Split()[0]
echo $INWORLD_NDK_SHA
Add-Content -Path ${env:GITHUB_ENV} -Value "INWORLD_NDK_SHA=$INWORLD_NDK_SHA"
- uses: actions/cache/restore@v3
id: ndk-cache-win64
with:
path: InworldAI\inworld-ndk\build\Package
key: ${{ runner.OS }}-ndk-cache-Win64-${{ env.INWORLD_NDK_SHA }}
enableCrossOsArchive: true
- name: git-update-dependecies
if: steps.ndk-cache-win64.outputs.cache-hit != 'true'
run: git submodule update --init --recursive
- name: Build NDK (Win64)
shell: pwsh
if: steps.ndk-cache-win64.outputs.cache-hit != 'true'
run: |
$pythonPath = (Get-Command python.exe).Source
$process = Start-Process -FilePath $pythonPath -Wait -NoNewWindow -PassThru -ArgumentList build-scripts\ndk-util.py,--platform=Win64,--clean,--build
if($process.ExitCode -ne 0)
{
exit 1
}
Remove-Item -Path "InworldAI\inworld-ndk\build\CMakeCache.txt"
$process = Start-Process -FilePath $pythonPath -Wait -NoNewWindow -PassThru -ArgumentList build-scripts\ndk-util.py,--platform=Win64-shared,--build
if($process.ExitCode -ne 0)
{
exit 1
}
- uses: actions/cache/save@v3
if: steps.ndk-cache-win64.outputs.cache-hit != 'true'
with:
path: InworldAI\inworld-ndk\build\Package
key: ${{ runner.OS }}-ndk-cache-Win64-${{ env.INWORLD_NDK_SHA }}
enableCrossOsArchive: true