fix: add debug info #368
This file contains hidden or 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: script-kcl-lsp | |
| on: push | |
| jobs: | |
| check-macos: | |
| strategy: | |
| matrix: | |
| os: [macos-13, macos-13-xlarge, macos-14, macos-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Debug getLatestRelease function | |
| run: | | |
| getLatestRelease() { | |
| local KCLReleaseUrl="https://api.github.com/repos/${GITHUB_ORG}/${GITHUB_REPO}/releases" | |
| local latest_release="" | |
| if [ "$KCL_HTTP_REQUEST_CLI" == "curl" ]; then | |
| response=$(curl -s $KCLReleaseUrl) | |
| echo "API Response: $response" # 打印 API 返回的数据 | |
| latest_release=$(echo "$response" | grep \"tag_name\" | grep -v rc | awk 'NR==1{print $2}' | sed -n 's/\"\(.*\)\",/\1/p') | |
| else | |
| response=$(wget -q --header="Accept: application/json" -O - $KCLReleaseUrl) | |
| echo "API Response: $response" # 打印 API 返回的数据 | |
| latest_release=$(echo "$response" | grep \"tag_name\" | grep -v rc | awk 'NR==1{print $2}' | sed -n 's/\"\(.*\)\",/\1/p') | |
| fi | |
| echo "Latest Release: $latest_release" # 打印解析后的结果 | |
| ret_val=$latest_release | |
| } | |
| getLatestRelease | |
| - name: Check Install Script KCL Language Server | |
| run: curl -fsSL https://kcl-lang.io/script/install-kcl-lsp.sh | /bin/bash | |
| - name: Check run | |
| shell: bash -leo pipefail {0} | |
| run: sudo kcl-language-server version | |
| check-linux: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-20.04, ubuntu-22.04, ubuntu-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Check Install Script KCL Language Server | |
| run: wget -q https://kcl-lang.io/script/install-kcl-lsp.sh -O - | /bin/bash | |
| - name: Check run | |
| shell: bash -ieo pipefail {0} | |
| run: kcl-language-server version | |
| check-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Check Install Script KCL Language Server | |
| run: powershell -Command "iwr -useb https://www.kcl-lang.io/script/install-kcl-lsp.ps1 | iex" | |
| - name: Check run | |
| run: C:\kclvm\bin\kcl-language-server.exe version | |
| check-kcl-lsp-scoop-install: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Check Scoop Install | |
| shell: powershell | |
| run: | | |
| iwr -useb get.scoop.sh -outfile 'install.ps1' | |
| .\install.ps1 -RunAsAdmin | |
| scoop bucket add kcl-lang https://github.com/kcl-lang/scoop-bucket.git | |
| scoop install kcl-lang/kcl-lsp | |
| kcl-language-server.exe version | |
| check-kcl-lsp-brew-install-macos: | |
| strategy: | |
| matrix: | |
| os: [macos-13, macos-13-xlarge, macos-14, macos-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Check Brew Installation | |
| working-directory: . | |
| run: | | |
| brew install kcl-lang/tap/kcl-lsp | |
| kcl-language-server version | |
| check-kcl-lsp-brew-install-linux: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: Homebrew/actions/setup-homebrew@master | |
| - name: Check Brew Installation | |
| working-directory: . | |
| run: | | |
| brew install kcl-lang/tap/kcl-lsp | |
| kcl-language-server version |