Skip to content

Commit 68cda19

Browse files
authored
chore: remove deprecated scripts (#937)
* chore: remove deprecated scripts Signed-off-by: peefy <[email protected]> * chore: use powershell scripts for windows Signed-off-by: peefy <[email protected]> * chore: use powershell scripts for windows Signed-off-by: peefy <[email protected]> --------- Signed-off-by: peefy <[email protected]>
1 parent b437ae5 commit 68cda19

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+112
-1396
lines changed

.github/workflows/daily-release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ jobs:
123123

124124
- run: echo "C:/LLVM/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
125125

126-
- run: .\scripts\build-windows\build.bat
126+
- run: .\scripts\build-windows\build.ps1
127127

128128
- run: echo ";$(pwd)\scripts\build-windows\_output\kclvm-windows\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
129129
working-directory: .

.github/workflows/macos_test.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ jobs:
4646
working-directory: ./kclvm
4747
run: cargo fmt --check
4848
shell: bash
49+
- name: Unit test
50+
working-directory: ./kclvm
51+
run: export PATH=$PATH:$PWD/../_build/dist/Darwin/kclvm/bin:/usr/local/opt/llvm@12/bin && make install-rustc-wasm && make && make codecov-lcov
52+
shell: bash
4953
- name: Grammar test
5054
working-directory: ./kclvm
5155
run: export PATH=$PATH:$PWD/../_build/dist/Darwin/kclvm/bin:/usr/local/opt/llvm@12/bin && make install-rustc-wasm && make && make test-grammar
@@ -54,10 +58,6 @@ jobs:
5458
working-directory: ./kclvm
5559
run: export PATH=$PATH:$PWD/../_build/dist/Darwin/kclvm/bin:/usr/local/opt/llvm@12/bin && make install-rustc-wasm && make && make test-runtime
5660
shell: bash
57-
- name: Unit test
58-
working-directory: ./kclvm
59-
run: export PATH=$PATH:$PWD/../_build/dist/Darwin/kclvm/bin:/usr/local/opt/llvm@12/bin && make install-rustc-wasm && make && make codecov-lcov
60-
shell: bash
6161

6262
- uses: actions/upload-artifact@v3
6363
with:

.github/workflows/windows_test.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ jobs:
3434

3535
- run: echo "C:/LLVM/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
3636

37-
# Build kclvm-cli
38-
- run: .\scripts\build-windows\build.bat
37+
# Build kclvm CLI
38+
- run: .\scripts\build-windows\build.ps1
3939

40-
# Set kclvm-cli path
40+
# Set kclvm CLI into PATH
4141
- run: echo ";$(pwd)\scripts\build-windows\_output\kclvm-windows\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
4242
working-directory: .
4343

@@ -46,7 +46,7 @@ jobs:
4646
working-directory: ./kclvm
4747

4848
# Rust runtime test
49-
- run: python3 -m pip install --upgrade pip && python3 -m pip install pytest && kclvm -m pytest -vv
49+
- run: python3 -m pip install --upgrade pip && python3 -m pip install pytest && python3 -m pytest -vv
5050
working-directory: ./kclvm/tests/test_units
5151

5252
- uses: actions/upload-artifact@v3

build.ps1

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Set-Location $PSScriptRoot
2+
. '.\scripts\build-windows\build.ps1'
3+
$bin_path = Join-Path $PSScriptRoot 'scripts\build-windows\_output\kclvm-windows\bin'
4+
$env:Path += ";$bin_path"
5+
# rust unit test
6+
Set-Location .\kclvm
7+
cargo test -p kclvm-*
8+
Set-Location $PSScriptRoot
9+
# rust runtime test
10+
Set-Location .\kclvm\tests\test_units
11+
python3 -m pytest -vv
12+
Set-Location $PSScriptRoot
13+
# konfig test
14+
Invoke-Expression -Command '.\test\integration\test_konfig.bat'

build_and_test_win.bat

Lines changed: 0 additions & 19 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "kclvm_cli"
3-
version = "0.5.0"
3+
version = "0.7.0"
44
edition = "2021"
55

66
[[bin]]
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
fn main() {
2-
println!("cargo:rustc-link-search=../kclvm/target/release");
2+
if cfg!(target_os = "windows") {
3+
println!("cargo:rustc-link-search=..\\kclvm\\target\\release");
4+
} else {
5+
println!("cargo:rustc-link-search=../kclvm/target/release");
6+
}
37
println!("cargo:rustc-link-lib=dylib=kclvm_cli_cdylib");
48
if cfg!(target_os = "macos") {
59
println!("cargo:rustc-link-arg=-Wl,-rpath,@loader_path");
File renamed without changes.

docs/dev_guide/2.quick_start.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ make build
135135
In the top level of the `kcl-lang/kcl` repo and run:
136136

137137
```sh
138-
.\build_and_test_win.bat
138+
.\build.ps1
139139
```
140140

141141
### Testing

kclvm/README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,8 @@ You can choose any IDE you like for development, but we recommend a combination
4343

4444
## Notes
4545

46-
1. If you encounter problems compiling KCLVM and using LLVM 12 on Apple M1, you can refer to the [documentation](./docs/m1-mac-setup.md)
47-
2. If you wanna start over, you `MUST` clean up all cached building files, such as `LLVM build files`, `kclvm/target`, etc.
48-
3. If your updating-cargo-index is extremely slow, setup `~/.cargo/config` file.
46+
1. If you wanna start over, you `MUST` clean up all cached building files, such as `LLVM build files`, `kclvm/target`, etc.
47+
2. If your updating-cargo-index is extremely slow, setup `~/.cargo/config` file.
4948

5049
```toml
5150
[source.crates-io]

0 commit comments

Comments
 (0)