feat: lsp file watcher. #3926
Workflow file for this run
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
name: build-and-test-windows | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
jobs: | |
build-and-test: | |
name: build and test on windows | |
runs-on: windows-latest | |
env: | |
LLVM_SYS_120_PREFIX: "C:/LLVM" | |
KCLVM_CLANG: "C:/LLVM/bin/clang.exe" | |
steps: | |
- name: Git checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: "true" | |
- name: Install rust nightly toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: 1.79 | |
override: true | |
components: clippy, rustfmt | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.23 | |
- name: Install KCL | |
shell: powershell | |
run: | | |
go install kcl-lang.io/cli/cmd/kcl@main | |
$GoPath = go env GOPATH | |
$GoInstallBin = Join-Path $GoPath "bin" | |
$Env:PATH += ";$GoInstallBin" | |
$Env:PATH += ";${{ github.workspace }}\go\bin" | |
- uses: ilammy/msvc-dev-cmd@v1 | |
- run: clang --version | |
- run: cargo --version | |
# Install LLVM-12 | |
- run: Invoke-WebRequest -Uri https://github.com/kcl-lang/llvm-package-windows/releases/download/v12.0.1/LLVM-12.0.1-win64.7z -OutFile C:/LLVM-12.0.1-win64.7z | |
- run: Get-FileHash -Algorithm MD5 C:/LLVM-12.0.1-win64.7z # md5: 3fcf77f82c6c3ee650711439b20aebe5 | |
- run: 7z x -y C:/LLVM-12.0.1-win64.7z -o"C:/LLVM" | |
- run: Remove-Item C:/LLVM-12.0.1-win64.7z | |
- run: echo "C:/LLVM/bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
# Build kclvm CLI | |
- run: .\scripts\build-windows\build.ps1 | |
# Set kclvm CLI into PATH | |
- run: echo ";$(pwd)\scripts\build-windows\_output\kclvm-windows\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
working-directory: . | |
# Rust unit test | |
- run: cargo test --workspace -r -- --nocapture | |
working-directory: ./kclvm | |
- name: Read VERSION file | |
id: read_version | |
run: | | |
$version = Get-Content VERSION | |
echo "VERSION=v$version" >> $env:GITHUB_ENV | |
- name: Rename kclvm-windows folder | |
run: | | |
$version = "${{ env.VERSION }}" | |
Rename-Item -Path ".\scripts\build-windows\_output\kclvm-windows" -NewName "kclvm-$version-windows" | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: kclvm-${{ env.VERSION }}-windows | |
if-no-files-found: error | |
path: scripts/build-windows/_output/kclvm-${{ env.VERSION }}-windows |