feat: lsp file watcher. #3945
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-macos | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
env: | |
MACOSX_DEPLOYMENT_TARGET: '10.13' | |
jobs: | |
build-and-test: | |
# Ref: https://github.com/actions/runner-images/tree/main/images/macos | |
strategy: | |
matrix: | |
os: [macos-12, macos-13] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Git checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: "true" | |
- name: Set up python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.23 | |
- name: Install KCL CLI | |
run: | | |
go install kcl-lang.io/cli/cmd/kcl@main | |
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH | |
echo "${{ github.workspace }}/go/bin" >> $GITHUB_PATH | |
- run: clang --version | |
- run: cargo --version | |
- run: rustc --print sysroot | |
- name: Delete rust cargo | |
run: rm -rf /root/.cargo/bin | |
shell: bash | |
- name: Install rust nightly toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: 1.79 | |
override: true | |
components: clippy, rustfmt | |
- name: Code format check | |
working-directory: ./kclvm | |
run: cargo fmt --check | |
shell: bash | |
- name: Grammar test | |
working-directory: ./kclvm | |
run: export PATH=$PATH:$PWD/../_build/dist/darwin/kclvm/bin && make && make test-grammar | |
shell: bash | |
- name: Evaluator Grammar test | |
working-directory: ./kclvm | |
run: export PATH=$PATH:$PWD/../_build/dist/darwin/kclvm/bin && make test-grammar-evaluator | |
shell: bash | |
- name: Runtime test | |
working-directory: ./kclvm | |
run: export PATH=$PATH:$PWD/../_build/dist/darwin/kclvm/bin && make test-runtime | |
shell: bash | |
- name: Unit test | |
working-directory: ./kclvm | |
run: export PATH=$PATH:$PWD/../_build/dist/darwin/kclvm/bin && make codecov-lcov | |
shell: bash | |
- name: Coveralls upload | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
path-to-lcov: ./kclvm/.kclvm_cov/lcov.info | |
- name: Release | |
run: export PATH=$PATH:$PWD/../_build/dist/darwin/kclvm/bin && make release | |
shell: bash | |
- name: Read VERSION file | |
id: read_version | |
run: | | |
VERSION=$(cat VERSION) | |
echo "VERSION=v${VERSION}" >> $GITHUB_ENV | |
- uses: actions/upload-artifact@v4 | |
if: "contains(matrix.os, 'macos-12')" | |
with: | |
name: kcl-${{ env.VERSION }}-darwin-amd64 | |
if-no-files-found: error | |
path: _build/kclvm-${{ env.VERSION }}-darwin-amd64.tar.gz |