Skip to content

Commit

Permalink
[CI] Add windows ci
Browse files Browse the repository at this point in the history
This PR adds windows CI.
  • Loading branch information
tqchen committed Mar 13, 2024
1 parent 5b8c529 commit 901b4b3
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 1 deletion.
File renamed without changes.
File renamed without changes.
39 changes: 39 additions & 0 deletions .github/workflows/windows-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# GH actions.
# We use it to cover windows builds
# Jenkins is still the primary CI
name: Windows CI

on:
push:
branches:
- win
pull_request:
branches:
- main

jobs:
Windows:
runs-on: windows-latest
defaults:
run:
shell: 'cmd /C call {0}'

steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'

- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: mlc-llm-build
channel-priority: strict
environment-file: ci/build-environment.yaml
auto-activate-base: false
- name: Conda info
run: |
conda info
conda list
python --version
- name: Build MLC-LLM
run: >-
ci/task/build_win.bat
2 changes: 1 addition & 1 deletion 3rdparty/tvm
Submodule tvm updated 165 files
15 changes: 15 additions & 0 deletions ci/build-environment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: mlc-llm-build

channels:
- conda-forge

dependencies:
- conda-build
- anaconda-client
- libvulkan-headers
- libvulkan-loader
- spirv-tools
- spirv-headers
- git
- cmake
- bzip2
20 changes: 20 additions & 0 deletions ci/task/build_win.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
cd mlc-llm
rd /s /q build
mkdir build
cd build

cmake -A x64 -Thost=x64 ^
-G "Visual Studio 17 2022" ^
-DUSE_VULKAN=ON ^
..

cmake --build . --parallel 3 --config Release -- /m

cd ..\..

IF %ERRORLEVEL% EQU 0 (
echo Build success
) else (
echo Build failed
exit /b 1
)

0 comments on commit 901b4b3

Please sign in to comment.