Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 11 additions & 16 deletions .github/workflows/ml-ci-build-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,15 @@ jobs:

$env:JAVA_HOME = [System.Environment]::GetEnvironmentVariable("JAVA_HOME", "Machine")

choco install git make pkgconfiglite openjdk17 ccache bazelisk gcloudsdk 7zip -y
choco install git make pkgconfiglite openjdk17 ccache bazelisk gcloudsdk 7zip --no-progress -y

python -m pip install --break-system-packages numpy

- name: Configure System Paths
run: |
Add-Content -Path $env:GITHUB_PATH -Value "C:\Program Files\Git\cmd"
Add-Content -Path $env:GITHUB_PATH -Value "C:\Program Files\Git\bin"
Add-Content -Path $env:GITHUB_PATH -Value "C:\Program Files\Git\mingw64\bin"
Add-Content -Path $env:GITHUB_PATH -Value "$env:ALLUSERSPROFILE\chocolatey\bin"
Add-Content -Path $env:GITHUB_PATH -Value "$env:USERPROFILE\.cargo\bin"
Add-Content -Path $env:GITHUB_PATH -Value "C:\Program Files\7-Zip"
Expand All @@ -89,14 +91,6 @@ jobs:
run: |
gcloud storage ls gs://litert-lm-cicd/caches/windows/bazel

- name: Setup VCPKG
run: |
git clone https://github.com/microsoft/vcpkg.git $env:USERPROFILE\vcpkg
cd $env:USERPROFILE\vcpkg
.\bootstrap-vcpkg.bat -disableMetrics
.\vcpkg integrate install
.\vcpkg install zlib openssl libpng curl fftw3 --triplet x64-windows

- name: Install Rust
run: |
Invoke-WebRequest -Uri "https://win.rustup.rs" -OutFile "rustup-init.exe"
Expand Down Expand Up @@ -251,15 +245,13 @@ jobs:
New-Item -ItemType Directory -Path "./models" -Force
}

$headers = @{
"Authorization" = "Bearer $($env:HF_TOKEN)"
}

Write-Host "Downloading model from Hugging Face: ${{ env.MODEL_URL }}"

Invoke-WebRequest -Uri "${{ env.MODEL_URL }}" `
-Headers $headers `
-OutFile "${{ env.MODEL_PATH }}"
# Use curl.exe for high-speed download without PowerShell DOM/stream overhead
curl.exe -L --retry 5 -f `
-H "Authorization: Bearer $env:HF_TOKEN" `
-o "${{ env.MODEL_PATH }}" `
"${{ env.MODEL_URL }}"

$file = Get-Item "${{ env.MODEL_PATH }}"
$sizeMB = [math]::Round($file.Length / 1MB, 2)
Expand All @@ -270,6 +262,7 @@ jobs:
run: |
bazel --output_base="$env:BAZEL_OUTPUT_BASE" `
build --disk_cache=~/.cache/bazel `
--repository_cache=~/.cache/bazel/repo `
--deleted_packages=swift `
--build_tag_filters='-nowindows' `
--action_env=TMP="$env:TMP" `
Expand All @@ -290,6 +283,7 @@ jobs:
run: |
bazel --output_base="$env:BAZEL_OUTPUT_BASE" `
test --disk_cache=~/.cache/bazel --test_output=errors `
--repository_cache=~/.cache/bazel/repo `
--deleted_packages=swift `
--test_timeout=300,1500,5400,18000 `
--test_tag_filters='-requires-mac-inputs:hard,-nowindows' `
Expand Down Expand Up @@ -318,6 +312,7 @@ jobs:
run: |
bazel --output_base="$env:BAZEL_OUTPUT_BASE" `
build --disk_cache=~/.cache/bazel `
--repository_cache=~/.cache/bazel/repo `
--define=litert_link_capi_so=true `
--define=litert_runtime_link_mode=dynamic `
--define=resolve_symbols_in_exec=false `
Expand Down
Loading