v0.5.0-beta1: Mmap Storage Update #28
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 & Release KektorDB | |
| on: | |
| release: | |
| types: [published] | |
| permissions: | |
| contents: write | |
| jobs: | |
| create-release-assets: | |
| name: Create Release Assets | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| # Esegui il fetch di tutti i tag per ottenere il nome della versione corretto | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: '1.24.6' | |
| - name: Set up Rust (Stable Toolchain) | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| - name: Set up Zig | |
| uses: goto-bus-stop/setup-zig@v2 | |
| with: | |
| version: 0.15.2 | |
| - name: Install build dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y p7zip-full mingw-w64 | |
| - name: Add all Rust cross-compilation targets | |
| run: | | |
| rustup target add x86_64-unknown-linux-gnu | |
| rustup target add aarch64-unknown-linux-gnu | |
| rustup target add x86_64-pc-windows-gnu | |
| rustup target add aarch64-apple-darwin | |
| rustup target add x86_64-apple-darwin | |
| - name: Run unit tests (Go-pure mode) | |
| # Eseguiamo i test sulla versione più semplice e portabile | |
| run: make test | |
| - name: Build all release binaries using Makefile | |
| # Il Makefile si occuperà di tutta la logica di cross-compilazione | |
| run: make release | |
| - name: Package release assets into archives | |
| run: | | |
| cd release | |
| for f in *; do | |
| BASENAME=$(echo "$f" | sed 's/\.exe$//') | |
| if [[ "$f" == *.exe ]]; then | |
| zip "${BASENAME}.zip" "$f" ../LICENSE ../README.md | |
| else | |
| tar -czvf "${BASENAME}.tar.gz" "$f" ../LICENSE ../README.md | |
| fi | |
| done | |
| # Elenca i file creati per il debug | |
| ls -l ../ | |
| mv *.zip *.tar.gz ../ | |
| - name: Upload Release Assets | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| # Carica tutti i file .zip e .tar.gz dalla radice | |
| files: | | |
| *.zip | |
| *.tar.gz |