Skip to content

Commit c7f8775

Browse files
authored
feat: add .deb and .rpm packages, drop Windows ARM64 (#47)
- Add build-deb job (cargo-deb on Ubuntu) - Add build-rpm job (cargo-generate-rpm on Fedora container) - Add deb/rpm metadata to icm-cli Cargo.toml - Remove aarch64-pc-windows-msvc target (not useful) - Release now includes: macOS (x64/ARM), Linux (x64/ARM), Windows (x64), .deb, .rpm
1 parent c01c999 commit c7f8775

3 files changed

Lines changed: 78 additions & 7 deletions

File tree

.github/workflows/release.yml

Lines changed: 66 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ jobs:
4444
- target: x86_64-pc-windows-msvc
4545
os: windows-latest
4646
archive: zip
47-
- target: aarch64-pc-windows-msvc
48-
os: windows-latest
49-
archive: zip
5047

5148
steps:
5249
- name: Checkout
@@ -92,9 +89,73 @@ jobs:
9289
name: icm-${{ matrix.target }}
9390
path: icm-${{ matrix.target }}.${{ matrix.archive }}
9491

92+
build-deb:
93+
name: Build .deb
94+
runs-on: ubuntu-latest
95+
steps:
96+
- name: Checkout
97+
uses: actions/checkout@v4
98+
99+
- name: Install Rust
100+
uses: dtolnay/rust-toolchain@stable
101+
102+
- name: Install cargo-deb
103+
run: cargo install cargo-deb
104+
105+
- name: Build .deb
106+
run: cargo deb -p icm-cli
107+
108+
- name: Prepare artifacts
109+
run: |
110+
mkdir -p deb-out
111+
cp target/debian/*.deb deb-out/
112+
# Create version-agnostic name
113+
cp target/debian/*.deb deb-out/icm_amd64.deb
114+
115+
- name: Upload artifact
116+
uses: actions/upload-artifact@v4
117+
with:
118+
name: icm-deb
119+
path: deb-out/*.deb
120+
121+
build-rpm:
122+
name: Build .rpm
123+
runs-on: ubuntu-latest
124+
container: fedora:latest
125+
steps:
126+
- name: Install dependencies
127+
run: dnf install -y git rust cargo rpm-build
128+
129+
- name: Checkout
130+
uses: actions/checkout@v4
131+
132+
- name: Install cargo-generate-rpm
133+
run: cargo install cargo-generate-rpm
134+
135+
- name: Build release
136+
run: cargo build --release -p icm-cli
137+
138+
- name: Generate .rpm
139+
run: cargo generate-rpm -p crates/icm-cli
140+
141+
- name: Prepare artifacts
142+
run: |
143+
mkdir -p rpm-out
144+
cp target/generate-rpm/*.rpm rpm-out/
145+
# Create version-agnostic name
146+
VERSION=$(grep '^version' crates/icm-cli/Cargo.toml | head -1 | sed 's/.*"\(.*\)".*/\1/')
147+
cp target/generate-rpm/*.rpm "rpm-out/icm-${VERSION}-1.x86_64.rpm"
148+
cp target/generate-rpm/*.rpm rpm-out/icm.x86_64.rpm
149+
150+
- name: Upload artifact
151+
uses: actions/upload-artifact@v4
152+
with:
153+
name: icm-rpm
154+
path: rpm-out/*.rpm
155+
95156
release:
96157
name: Create Release
97-
needs: [build]
158+
needs: [build, build-deb, build-rpm]
98159
runs-on: ubuntu-latest
99160
steps:
100161
- name: Checkout
@@ -119,7 +180,7 @@ jobs:
119180
- name: Flatten artifacts
120181
run: |
121182
mkdir -p release
122-
find artifacts -type f \( -name "*.tar.gz" -o -name "*.zip" \) -exec cp {} release/ \;
183+
find artifacts -type f \( -name "*.tar.gz" -o -name "*.zip" -o -name "*.deb" -o -name "*.rpm" \) -exec cp {} release/ \;
123184
124185
- name: Create checksums
125186
run: |

crates/icm-cli/Cargo.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,14 @@ crossterm = { workspace = true, optional = true }
3939

4040
[target.'cfg(unix)'.dependencies]
4141
libc = { workspace = true }
42+
43+
[package.metadata.deb]
44+
maintainer = "Patrick Szymkowiak"
45+
copyright = "2024-2026 Patrick Szymkowiak"
46+
extended-description = "Permanent memory for AI agents — MCP server with hybrid search, temporal decay, and multilingual embeddings."
47+
section = "utility"
48+
priority = "optional"
49+
assets = [["target/release/icm", "usr/bin/", "755"]]
50+
51+
[package.metadata.generate-rpm]
52+
assets = [{ source = "target/release/icm", dest = "/usr/bin/icm", mode = "755" }]

install.ps1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ function Get-Arch {
1010
$arch = [System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture
1111
switch ($arch) {
1212
"X64" { return "x86_64" }
13-
"Arm64" { return "aarch64" }
14-
default { throw "Unsupported architecture: $arch" }
13+
default { throw "Unsupported architecture: $arch. Only x86_64 is supported on Windows." }
1514
}
1615
}
1716

0 commit comments

Comments
 (0)