Skip to content

Commit

Permalink
ci: chore remove llvm features in CI (#1534)
Browse files Browse the repository at this point in the history
Signed-off-by: peefy <[email protected]>
  • Loading branch information
Peefy authored Aug 2, 2024
1 parent 8f654a0 commit 96b6ae8
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/windows_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 2 additions & 6 deletions kclvm/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,25 +61,21 @@ 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:
rustup component add llvm-tools-preview
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
Expand Down
3 changes: 2 additions & 1 deletion scripts/build-windows/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 96b6ae8

Please sign in to comment.