From 4faaba4c1605af05982ad9976ad716ad89770ab3 Mon Sep 17 00:00:00 2001 From: peefy Date: Fri, 2 Aug 2024 14:43:23 +0800 Subject: [PATCH] ci: chore remove llvm features in CI Signed-off-by: peefy --- .github/workflows/windows_test.yaml | 2 +- build.ps1 | 2 +- kclvm/makefile | 8 ++------ scripts/build-windows/build.ps1 | 3 ++- scripts/build.sh | 4 ++-- 5 files changed, 8 insertions(+), 11 deletions(-) diff --git a/.github/workflows/windows_test.yaml b/.github/workflows/windows_test.yaml index df06fda40..ea187619f 100644 --- a/.github/workflows/windows_test.yaml +++ b/.github/workflows/windows_test.yaml @@ -42,7 +42,7 @@ jobs: working-directory: . # Rust unit test - - run: cargo test -p kclvm-* --features llvm + - run: cargo test -r -p kclvm-* working-directory: ./kclvm - uses: actions/upload-artifact@v4 diff --git a/build.ps1 b/build.ps1 index f7b03c006..a3e5a058b 100644 --- a/build.ps1 +++ b/build.ps1 @@ -4,7 +4,7 @@ $bin_path = Join-Path $PSScriptRoot 'scripts\build-windows\_output\kclvm-windows $env:Path += ";$bin_path" # rust unit test Set-Location .\kclvm -cargo test --workspace -r --features llvm -- --nocapture +cargo test --workspace -r -- --nocapture Set-Location $PSScriptRoot # rust runtime test Set-Location .\kclvm\tests\test_units diff --git a/kclvm/makefile b/kclvm/makefile index ae392691e..755a9df0c 100644 --- a/kclvm/makefile +++ b/kclvm/makefile @@ -61,17 +61,13 @@ build-lsp: # Unit tests without code cov test: - cargo test --workspace -r --features llvm -- --nocapture - -# Unit tests without code cov and llvm-features -test-without-llvm: cargo test --workspace -r -- --nocapture # Unit tests with code cov (Requires rust 1.60+) codecov: rustup component add llvm-tools-preview cargo install cargo-llvm-cov - cargo llvm-cov --workspace --features llvm --ignore-filename-regex gpyrpc.rs --html --open -- --nocapture + cargo llvm-cov --workspace --ignore-filename-regex gpyrpc.rs --html --open -- --nocapture # Unit tests with code cov and output the lcov file (Requires rust 1.60+) codecov-lcov: @@ -79,7 +75,7 @@ codecov-lcov: cargo install cargo-llvm-cov rm -rf $(PWD)/.kclvm_cov mkdir $(PWD)/.kclvm_cov - cargo llvm-cov --features llvm --lcov --output-path $(PWD)/.kclvm_cov/lcov.info -r --workspace --ignore-filename-regex gpyrpc.rs -- --nocapture + cargo llvm-cov --lcov --output-path $(PWD)/.kclvm_cov/lcov.info -r --workspace --ignore-filename-regex gpyrpc.rs -- --nocapture # Test runtime libaries using python functions test-runtime: install-test-deps diff --git a/scripts/build-windows/build.ps1 b/scripts/build-windows/build.ps1 index 5670558b9..cee106bee 100644 --- a/scripts/build-windows/build.ps1 +++ b/scripts/build-windows/build.ps1 @@ -3,7 +3,8 @@ Set-Location $PSScriptRoot # 1. Install kclvm_cli_cdylib.dll Set-Location "..\..\kclvm" -cargo build --release --features llvm +# cargo build --release --features llvm +cargo build --release Set-Location $PSScriptRoot New-Item -ErrorAction Ignore -Path ".\_output" -ItemType "directory" diff --git a/scripts/build.sh b/scripts/build.sh index 32766f415..867d462a3 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -25,9 +25,9 @@ prepare_dirs cd $topdir/kclvm export PATH=$PATH:/root/.cargo/bin:/usr/lib/llvm-12/bin # Enable the llvm feature -cargo build --release --features llvm +# cargo build --release --features llvm # Disable the llvm feature -# cargo build --release +cargo build --release ## Switch dll file extension according to os. dll_extension="so"