Skip to content

Commit

Permalink
feat: modify ci for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
weileifrank committed Oct 31, 2024
1 parent bcb589a commit 031e22f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 9 deletions.
31 changes: 23 additions & 8 deletions .github/ci/build/build_windows.bat
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,19 @@ echo build_time: %build_time%
echo release_version: %release_version%
echo short_version: %short_version%
echo pwd: %cd%
echo sdk_url: %sdk_url%

echo init value sdk_url: %sdk_url%
setlocal enabledelayedexpansion
if "%sdk_url%"=="" (
REM Read sdk_url from install.ps1
for /f "tokens=2 delims=''" %%a in ('findstr /R "^ *\$agora_sdk = '" .\windows\APIExample\install.ps1') do (
set sdk_url=%%a
REM Remove the trailing single quote
set sdk_url=!sdk_url:'=!
REM Exit the loop after finding the first match
goto :FOUND
)
)
:FOUND
echo off
set zip_name=%sdk_url%
:LOOP
Expand All @@ -63,14 +74,10 @@ set zip_name=%part2%
goto LOOP
:END
echo on
echo sdk_url: %sdk_url%
echo part2: %part2%
echo zip_name: %zip_name%

dir

curl %sdk_url% -o %zip_name%
REM python %WORKSPACE%\\artifactory_utils.py --action=download_file --file=%sdk_url%
7z x ./%zip_name% -y

dir
rmdir /S /Q Agora_Native_SDK_for_Windows_FULL\demo
del /F /Q Agora_Native_SDK_for_Windows_FULL\commits
Expand All @@ -90,6 +97,14 @@ del /F result.zip
del /F %WORKSPACE%\\%zip_name%

if %compile_project% EQU false goto FINAL
curl %sdk_url% -o %zip_name%
if %errorlevel% neq 0 (
echo Failed to download the file from %sdk_url%
) else (
REM python %WORKSPACE%\\artifactory_utils.py --action=download_file --file=%sdk_url%
7z x ./%zip_name% -y
cd Agora_Native_SDK_for_Windows_FULL\samples\API-example
call cloud_build.bat
)

:FINAL
2 changes: 1 addition & 1 deletion windows/APIExample/install.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$agora_sdk = 'https://download.agora.io/sdk/release/Agora_Native_SDK_for_Windows_v4.5.0_FULL.zip'
$ThirdPartysrc = 'https://fullapp.oss-cn-beijing.aliyuncs.com/API-Examples/ThirdParty.zip'
$ThirdPartydes = 'ThirdParty.zip'
$agora_sdk = 'https://download.agora.io/sdk/release/Agora_Native_SDK_for_Windows_v4.5.0_FULL.zip'
$agora_des = 'AgoraSdk.zip'
$agora_local_sdk = '../../sdk'

Expand Down

0 comments on commit 031e22f

Please sign in to comment.