release: v1.12.3 #31
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: Build ll-search | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| include: | |
| - target: aarch64-apple-darwin | |
| runner: macos-latest | |
| artifact: ll-search-darwin-arm64 | |
| - target: x86_64-unknown-linux-gnu | |
| runner: ubuntu-latest | |
| artifact: ll-search-linux-x64 | |
| - target: x86_64-pc-windows-msvc | |
| runner: windows-latest | |
| artifact: ll-search-windows-x64 | |
| runs-on: ${{ matrix.runner }} | |
| defaults: | |
| run: | |
| working-directory: native | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Cache cargo | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| native/target | |
| key: ${{ matrix.target }}-cargo-${{ hashFiles('native/Cargo.lock') }} | |
| - name: Build | |
| run: cargo build --release --target ${{ matrix.target }} | |
| - name: Package (Unix) | |
| if: runner.os != 'Windows' | |
| run: | | |
| mkdir -p dist | |
| cp target/${{ matrix.target }}/release/ll-search dist/ | |
| find target/${{ matrix.target }}/release -name "libonnxruntime*" -not -name "*.a" | head -1 | xargs -I{} cp {} dist/ || true | |
| tar -czf ../${{ matrix.artifact }}.tar.gz -C dist . | |
| - name: Package (Windows) | |
| if: runner.os == 'Windows' | |
| run: | | |
| mkdir dist | |
| copy target\${{ matrix.target }}\release\ll-search.exe dist\ | |
| Get-ChildItem -Path target\${{ matrix.target }}\release -Filter "onnxruntime*" -File | Where-Object { $_.Extension -ne ".lib" } | Copy-Item -Destination dist\ | |
| Compress-Archive -Path dist\* -DestinationPath ..\${{ matrix.artifact }}.zip | |
| shell: pwsh | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.artifact }} | |
| path: ${{ matrix.artifact }}.* | |
| release: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| - name: Create release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| **/*.tar.gz | |
| **/*.zip | |
| generate_release_notes: true |