forked from kcl-lang/kcl
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: use powershell scripts for windows
Signed-off-by: peefy <[email protected]>
- Loading branch information
Showing
13 changed files
with
71 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Set-Location $PSScriptRoot | ||
. '.\scripts\build-windows\build.ps1' | ||
$bin_path = Join-Path $PSScriptRoot 'scripts\build-windows\_output\kclvm-windows\bin' | ||
$env:Path += ";$bin_path" | ||
# rust unit test | ||
Set-Location .\kclvm | ||
cargo test -p kclvm-* | ||
Set-Location $PSScriptRoot | ||
# rust runtime test | ||
Set-Location .\kclvm\tests\test_units | ||
python3 -m pytest -vv | ||
Set-Location $PSScriptRoot | ||
# konfig test | ||
Invoke-Expression -Command '.\test\integration\test_konfig.bat' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Copyright The KCL Authors. All rights reserved. | ||
|
||
Set-Location $PSScriptRoot | ||
# 1. Install kclvm_cli_cdylib.dll | ||
Set-Location "..\..\kclvm" | ||
cargo build --release | ||
Set-Location $PSScriptRoot | ||
|
||
New-Item -ErrorAction Ignore -Path ".\_output" -ItemType "directory" | ||
New-Item -ErrorAction Ignore -Path ".\_output\kclvm-windows" -ItemType "directory" | ||
New-Item -ErrorAction Ignore -Path ".\_output\kclvm-windows\bin" -ItemType "directory" | ||
New-Item -ErrorAction Ignore -Path ".\_output\kclvm-windows\include" -ItemType "directory" | ||
|
||
Copy-Item -Path "..\..\kclvm\target\release\kclvm_cli_cdylib.dll" -Destination ".\_output\kclvm-windows\bin\" -Force | ||
Copy-Item -Path "..\..\kclvm\target\release\kclvm_cli_cdylib.dll.lib" -Destination ".\_output\kclvm-windows\bin\" -Force | ||
Copy-Item -Path "..\..\kclvm\target\release\kclvm_cli_cdylib.dll.lib" -Destination "..\..\kclvm\target\release\kclvm_cli_cdylib.lib" | ||
|
||
Set-Location $PSScriptRoot | ||
# 2. Install kclvm CLI | ||
Set-Location "..\..\cli" | ||
cargo build --release | ||
Set-Location $PSScriptRoot | ||
Copy-Item -Path "..\..\cli\target\release\kclvm_cli.exe" -Destination ".\_output\kclvm-windows\bin\" -Force | ||
|
||
Set-Location $PSScriptRoot | ||
# 3. Install kcl language server | ||
Set-Location "..\..\kclvm\tools\src\LSP" | ||
cargo build --release | ||
Set-Location $PSScriptRoot | ||
Copy-Item -Path "..\..\kclvm\target\release\kcl-language-server.exe" -Destination ".\_output\kclvm-windows\bin\“ | ||
|
||
Set-Location $PSScriptRoot | ||
# 4. Copy KCLVM C API header | ||
Copy-Item -Path "..\..\kclvm\runtime\src\_kclvm.h" -Destination ".\_output\kclvm-windows\include\" -Force | ||
|
||
Set-Location $PSScriptRoot | ||
# Install hello.k | ||
Copy-Item -Path "..\..\samples\hello.k" -Destination ".\_output\kclvm-windows" -Force | ||
|
||
# Run KCL files | ||
.\_output\kclvm-windows\bin\kclvm_cli.exe run ..\..\samples\fib.k | ||
.\_output\kclvm-windows\bin\kclvm_cli.exe run ..\..\samples\hello.k | ||
.\_output\kclvm-windows\bin\kclvm_cli.exe run ..\..\samples\kubernetes.k | ||
.\_output\kclvm-windows\bin\kclvm_cli.exe run ..\..\samples\math.k |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Copyright The KCL Authors. All rights reserved. | ||
|
||
Set-Location $PSScriptRoot | ||
|
||
Remove-Item -Recurse -Force "_output" | ||
Remove-Item -Recurse -Force "*.obj" | ||
Remove-Item -Recurse -Force "*.exp" | ||
Remove-Item -Recurse -Force "*.lib" | ||
Remove-Item -Recurse -Force "*.dll" | ||
Remove-Item -Force "*.zip" |