Skip to content

fix(stability): resolve shm.rs regression and finalize distro-specifi… #7

fix(stability): resolve shm.rs regression and finalize distro-specifi…

fix(stability): resolve shm.rs regression and finalize distro-specifi… #7

Workflow file for this run

name: Global Release Automation
on:
push:
tags:
- "v*" # Triggers on tags like v0.3.0
jobs:
build:
name: Build ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
suffix: x64_ubuntu
binary: cortex
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
suffix: x64_fedora_arch
binary: cortex
- os: macos-14 # Specifically for Apple Silicon (macOS 14+)
target: aarch64-apple-darwin
suffix: arm64_macos
binary: cortex
- os: macos-14 # Standard stable runner
target: x86_64-apple-darwin
suffix: x64_macos
binary: cortex
- os: windows-latest
target: x86_64-pc-windows-msvc
suffix: x64_windows
binary: cortex.exe
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install Rust Toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Rust Cache
uses: swatinem/rust-cache@v2
- name: Build Rust Core
working-directory: rust
run: cargo build --release --target ${{ matrix.target }}
env:
PYO3_PYTHON: python
- name: Package Release Assets
shell: bash
working-directory: rust
run: |
mkdir -p release_dist
# Copy the compiled binary
cp target/${{ matrix.target }}/release/${{ matrix.binary }} release_dist/
# Include the installation and management scripts from root
cp ../install.sh release_dist/
# Create compressed archive with custom naming: cortex_version_suffix
if [ "${{ runner.os }}" == "Windows" ]; then
# Windows runner has 7z in path
7z a ../cortex_${{ github.ref_name }}_${{ matrix.suffix }}.zip ./release_dist/*
else
tar -czf ../cortex_${{ github.ref_name }}_${{ matrix.suffix }}.tar.gz -C release_dist .
fi
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: cortex_${{ github.ref_name }}_${{ matrix.suffix }}
path: cortex_${{ github.ref_name }}_${{ matrix.suffix }}.*
publish:
name: Publish GitHub Release
needs: build
runs-on: ubuntu-latest
steps:
- name: Download All Binaries
uses: actions/download-artifact@v4
with:
path: release_artifacts
merge-multiple: true
- name: Create Release
uses: softprops/action-gh-release@v2
with:
files: release_artifacts/*
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}