bug: resolve 'error: linker clang not found' on ci
#25
Workflow file for this run
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: Release LSP | |
| permissions: | |
| contents: write | |
| on: | |
| push: | |
| tags: | |
| - "swls-v*" # Triggers on version tags (e.g., v1.0.0) | |
| workflow_dispatch: # Allows manual runs | |
| jobs: | |
| build: | |
| name: Build (${{ matrix.name }}) | |
| runs-on: ${{ matrix.platform }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # Linux | |
| - platform: ubuntu-latest | |
| target: x86_64-unknown-linux-gnu | |
| name: linux-x86_64 | |
| - platform: ubuntu-latest | |
| target: aarch64-unknown-linux-gnu | |
| name: linux-aarch64 | |
| # macOS | |
| - platform: macos-latest | |
| target: x86_64-apple-darwin | |
| name: macos-x86_64 | |
| - platform: macos-latest | |
| target: aarch64-apple-darwin | |
| name: macos-arm64 | |
| # Windows | |
| - platform: windows-latest | |
| target: x86_64-pc-windows-msvc | |
| name: windows-x86_64 | |
| - platform: windows-latest | |
| target: aarch64-pc-windows-msvc | |
| name: windows-arm64 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache Cargo dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Add Rust target | |
| run: rustup target add ${{ matrix.target }} | |
| # Linux ARM needs cross | |
| - name: Install cross (Linux ARM only) | |
| if: matrix.target == 'aarch64-unknown-linux-gnu' | |
| run: cargo install cross | |
| - name: Build LSP Binary | |
| env: | |
| APP_VERSION: ${{ github.ref_name }} | |
| shell: bash | |
| run: | | |
| if [[ "${{ matrix.target }}" == "aarch64-unknown-linux-gnu" ]]; then | |
| cross build --release -p swls --target ${{ matrix.target }} | |
| else | |
| cargo build --release -p swls --target ${{ matrix.target }} | |
| fi | |
| - name: Rename binary for release | |
| shell: bash | |
| run: | | |
| mkdir -p release | |
| BIN_NAME="swls" | |
| EXT="" | |
| if [[ "${{ runner.os }}" == "Windows" ]]; then | |
| BIN_NAME="swls.exe" | |
| EXT=".exe" | |
| fi | |
| cp target/${{ matrix.target }}/release/$BIN_NAME \ | |
| release/swls-${{ matrix.name }}$EXT | |
| - name: Upload Native Binary | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: swls-${{ matrix.name }} | |
| path: release/* | |
| create-release: | |
| name: Create GitHub Release | |
| runs-on: ubuntu-latest | |
| needs: [build] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| merge-multiple: true | |
| path: release | |
| - name: List downloaded files | |
| run: ls -R release | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| release/* | |
| body: "🚀 New release of LSP! Includes native binaries for Linux, macOS and Windows." | |