Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove kclvm python CI tests, CLI and plugin related codes. #495

Merged
merged 1 commit into from
Apr 10, 2023
Merged
Show file tree
Hide file tree
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
10 changes: 0 additions & 10 deletions .github/workflows/kcl.yml

This file was deleted.

19 changes: 5 additions & 14 deletions .github/workflows/macos_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,6 @@ jobs:
- run: cargo --version
- run: rustc --print sysroot

- name: Build KCLVM
run: make build
shell: bash
- name: Grammar test
run: |
brew install coreutils
chmod +x ./internal/scripts/test_grammar.sh
./internal/scripts/test_grammar.sh
shell: bash
- name: Delete rust cargo
run: rm -rf /root/.cargo/bin
shell: bash
Expand All @@ -38,23 +29,23 @@ jobs:
toolchain: 1.67
override: true
components: clippy, rustfmt
- name: Rust code format check
- name: Code format check
working-directory: ./kclvm
run: cargo fmt --check
shell: bash
- name: Rust grammar test
- name: Grammar test
working-directory: ./kclvm
run: export PATH=$PATH:$PWD/../_build/dist/Darwin/kclvm/bin:/usr/local/opt/llvm@12/bin && make install-rustc-wasm && make && make test-grammar
shell: bash
- name: Rust runtime test
- name: Runtime test
working-directory: ./kclvm
run: export PATH=$PATH:$PWD/../_build/dist/Darwin/kclvm/bin:/usr/local/opt/llvm@12/bin && make install-rustc-wasm && make && make test-runtime
shell: bash
- name: Rust unit test
- name: Unit test
working-directory: ./kclvm
run: export PATH=$PATH:$PWD/../_build/dist/Darwin/kclvm/bin:/usr/local/opt/llvm@12/bin && make install-rustc-wasm && make && make codecov-lcov
shell: bash
- name: Rust konfig test
- name: Konfig test
working-directory: ./kclvm
run: export PATH=$PATH:$PWD/../_build/dist/Darwin/kclvm/bin:/usr/local/opt/llvm@12/bin && make install-rustc-wasm && make && make test-konfig
shell: bash
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
# KCLVM build

- name: Build KCLVM
run: export PATH=$PATH:$PWD/_build/dist/ubuntu/kclvm/bin && make build && cd kclvm && make
run: export PATH=$PATH:$PWD/_build/dist/ubuntu/kclvm/bin && make build
shell: bash

# KCLVM docker image build and upload
Expand Down
20 changes: 6 additions & 14 deletions .github/workflows/ubuntu_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,6 @@ jobs:
uses: actions/checkout@v3
with:
submodules: "true"
- name: Build KCLVM
run: make build
shell: bash
- name: Grammar test
run: |
chmod +x ./internal/scripts/test_grammar.sh
./internal/scripts/test_grammar.sh
shell: bash
- name: Delete rust cargo
run: rm -rf /root/.cargo/bin
shell: bash
Expand All @@ -29,27 +21,27 @@ jobs:
toolchain: 1.67
override: true
components: clippy, rustfmt
- name: Rust code format check
- name: Code format check
working-directory: ./kclvm
run: cargo fmt --check
shell: bash
- name: Rust code clippy check
- name: Code clippy check
working-directory: ./kclvm
run: cargo clippy --no-deps -r
shell: bash
- name: Rust grammar test
- name: Grammar test
working-directory: ./kclvm
run: export PATH=$PATH:$PWD/../_build/dist/ubuntu/kclvm/bin && make install-rustc-wasm && make && make test-grammar
shell: bash
- name: Rust runtime test
- name: Runtime test
working-directory: ./kclvm
run: export PATH=$PATH:$PWD/../_build/dist/ubuntu/kclvm/bin && make install-rustc-wasm && make && make test-runtime
shell: bash
- name: Rust unit test
- name: Unit test
working-directory: ./kclvm
run: export PATH=$PATH:$PWD/../_build/dist/ubuntu/kclvm/bin && make install-rustc-wasm && make && make codecov-lcov
shell: bash
- name: Rust konfig test
- name: Konfig test
working-directory: ./kclvm
run: export PATH=$PATH:$PWD/../_build/dist/ubuntu/kclvm/bin && make install-rustc-wasm && make && make test-konfig
shell: bash
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/windows_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ jobs:
# Rust runtime test
- run: python3 -m pip install --upgrade pip && python3 -m pip install pytest && kclvm -m pytest -vv
working-directory: ./kclvm/tests/test_units

# Rust konfig test
- run: .\test\integration\test_konfig.bat
working-directory: .

- uses: actions/upload-artifact@v3
with:
Expand Down
18 changes: 17 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,33 @@ BUILD_IMAGE:=kusionstack/kclvm-builder
RUN_IN_DOCKER:=docker run -it --rm
RUN_IN_DOCKER+=-v ~/.ssh:/root/.ssh
RUN_IN_DOCKER+=-v ~/.gitconfig:/root/.gitconfig
RUN_IN_DOCKER+=-v ~/go/pkg/mod:/go/pkg/mod
RUN_IN_DOCKER+=-v ${PWD}:/root/kclvm
RUN_IN_DOCKER+=-w /root/kclvm ${BUILD_IMAGE}

# ----------------
# KCLVM build
# ----------------

.PHONY: build
build:
${PWD}/run.sh -a build

.PHONY: release
release:
${PWD}/run.sh -a release

.PHONY: test
test:
make -C ./kclvm test

.PHONY: test-grammar
test-grammar:
make -C ./kclvm test-grammar

.PHONY: fmt
fmt:
make -C ./kclvm fmt

# ----------------
# Docker
# ----------------
Expand Down
1 change: 1 addition & 0 deletions README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ Kusion 配置语言(KCL)是一个开源的基于约束的记录及函数语
+ **API 亲和**:原生支持 [OpenAPI](https://github.com/KusionStack/kcl-openapi)、 Kubernetes CRD, Kubernetes YAML 等 API 生态规范
+ **开发友好**:[语言工具](https://kcl-lang.io/docs/tools/cli/kcl/) (Format,Lint,Test,Vet,Doc 等)、 [IDE 插件](https://github.com/KusionStack/vscode-kcl) 构建良好的研发体验
+ **安全可控**:面向领域,不原生提供线程、IO 等系统级功能,低噪音,低安全风险,易维护,易治理
+ **生态集成**:通过 [Kustomize KCL 插件](https://github.com/KusionStack/kustomize-kcl), [Helm KCL 插件](https://github.com/KusionStack/helm-kcl) 或者 [KPT KCL SDK](https://github.com/KusionStack/kpt-kcl-sdk) 直接编辑或校验资源
+ **生产可用**:广泛应用在蚂蚁集团平台工程及自动化的生产环境实践中

## 如何选择
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ You can use KCL to
+ **API affinity**: Native support for ecological API specifications such as [OpenAPI](https://github.com/KusionStack/kcl-openapi), Kubernetes CRD, Kubernetes YAML spec.
+ **Developer-friendly**: Friendly development experiences with rich [language tools](https://kcl-lang.io/docs/tools/cli/kcl/) (Format, Lint, Test, Vet, Doc, etc.) and [IDE plugins](https://github.com/KusionStack/vscode-kcl).
+ **Safety & maintainable**: Domain-oriented, no system-level functions such as native threads and IO, low noise and security risk, easy maintenance and governance.
+ **Integrations**: Mutate and validate manifests through [Kustomize KCL Plugin](https://github.com/KusionStack/kustomize-kcl), [Helm KCL Plugin](https://github.com/KusionStack/helm-kcl) or [KPT KCL SDK](https://github.com/KusionStack/kpt-kcl-sdk).
+ **Production-ready**: Widely used in production practices of platform engineering and automation at Ant Group.

## How to choose?
Expand Down
129 changes: 0 additions & 129 deletions docs/cmd/README_KCLVM_USE.md

This file was deleted.

10 changes: 5 additions & 5 deletions docs/dev_guide/2.quick_start.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ Using a docker image is our recommended way, of course, you can also configure y
#### macOS and OS X

- `git`
- `Python 3.7+`
- `Rust 1.60+`
- `LLVM 12`
- `Python 3.7+` (Only for integration tests).

You'll need LLVM installed and `llvm-config` in your `PATH`. Just download from [LLVM 12](https://releases.llvm.org/download.html) or install `llvm@12` using `brew`.

Expand Down Expand Up @@ -106,8 +106,8 @@ ln -sf /usr/bin/wasm-ld-12 /usr/bin/wasm-ld

- `git`
- `Rust 1.60+`
- `Python 3.7+`
- `LLVM 12`
- `Python 3.7+` (Only for integration tests).

Please add the LLVM installation location to `LLVM_SYS_120_PREFIX` and the `$PATH`.

Expand All @@ -127,23 +127,23 @@ cd KCLVM
In the top level of the `KusionStack/KCLVM` repo and run:

```sh
./run.sh -a build
make build
```

#### Windows

In the top level of the `KusionStack/KCLVM` repo and run:

```sh
.\build_win.bat
.\build_and_test_win.bat
```

### Testing

In the top level of the `KusionStack/KCLVM` repo and run:

```sh
./run.sh -a test
make test
```

See the chapters on building and testing for more details.
Expand Down
Loading