Skip to content

Commit e774b60

Browse files
authored
Fix musl release rlimit build (#7)
* fix: support musl release rlimits * ci: cover release build targets
1 parent ae89909 commit e774b60

8 files changed

Lines changed: 50 additions & 18 deletions

File tree

.github/workflows/ci.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,21 @@ jobs:
107107
runs-on: ${{ matrix.os }}
108108
needs: [fmt, clippy, test]
109109
strategy:
110+
fail-fast: false
110111
matrix:
111112
include:
112113
- os: ubuntu-latest
113114
target: x86_64-unknown-linux-gnu
115+
- os: ubuntu-latest
116+
target: x86_64-unknown-linux-musl
117+
musl: true
118+
- os: ubuntu-latest
119+
target: aarch64-unknown-linux-gnu
120+
cross: true
114121
- os: macos-latest
115122
target: aarch64-apple-darwin
123+
- os: macos-latest
124+
target: x86_64-apple-darwin
116125
steps:
117126
- uses: actions/checkout@v4
118127

@@ -121,6 +130,22 @@ jobs:
121130
with:
122131
targets: ${{ matrix.target }}
123132

133+
- name: Install musl tools
134+
if: matrix.musl
135+
run: sudo apt-get update && sudo apt-get install -y musl-tools
136+
137+
- name: Install cross-compilation tools
138+
if: matrix.cross
139+
run: |
140+
sudo apt-get update
141+
sudo apt-get install -y gcc-aarch64-linux-gnu
142+
143+
- name: Setup cross-compilation
144+
if: matrix.cross
145+
run: |
146+
echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
147+
echo "CC_aarch64_unknown_linux_gnu=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
148+
124149
- name: Cache cargo registry
125150
uses: actions/cache@v4
126151
with:

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.13.57] - 2026-05-01
11+
12+
### Fixed
13+
14+
- Fixed Linux musl release builds by using the `libc::setrlimit` resource type exposed by musl targets.
15+
- Added release-target parity to CI build checks so unsupported target regressions fail before tagging.
16+
1017
## [0.13.56] - 2026-05-01
1118

1219
### Changed

Cargo.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "sage"
3-
version = "0.13.56"
3+
version = "0.13.57"
44
edition = "2024"
55
authors = ["Sage Agent Team"]
66
license = "MIT"
@@ -9,9 +9,9 @@ description = "LLM-based agent for general purpose software engineering tasks"
99
publish = false
1010

1111
[dependencies]
12-
sage-sdk = { path = "crates/sage-sdk", version = "0.13.56" }
13-
sage-core = { path = "crates/sage-core", version = "0.13.56" }
14-
sage-tools = { path = "crates/sage-tools", version = "0.13.56" }
12+
sage-sdk = { path = "crates/sage-sdk", version = "0.13.57" }
13+
sage-core = { path = "crates/sage-core", version = "0.13.57" }
14+
sage-tools = { path = "crates/sage-tools", version = "0.13.57" }
1515
tokio = { workspace = true }
1616
tokio-util = { workspace = true }
1717
tracing-subscriber = { workspace = true }
@@ -35,7 +35,7 @@ members = [
3535
resolver = "2"
3636

3737
[workspace.package]
38-
version = "0.13.56"
38+
version = "0.13.57"
3939
edition = "2024"
4040
authors = ["Sage Agent Team"]
4141
license = "MIT"

crates/sage-cli/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ path = "src/main.rs"
1515

1616
[dependencies]
1717
# Core library
18-
sage-core = { path = "../sage-core", version = "0.13.56" }
19-
sage-tools = { path = "../sage-tools", version = "0.13.56" }
20-
sage-sdk = { path = "../sage-sdk", version = "0.13.56" }
18+
sage-core = { path = "../sage-core", version = "0.13.57" }
19+
sage-tools = { path = "../sage-tools", version = "0.13.57" }
20+
sage-sdk = { path = "../sage-sdk", version = "0.13.57" }
2121

2222
# CLI
2323
clap = { workspace = true }

crates/sage-core/src/sandbox/executor/limits.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
use crate::sandbox::limits::ResourceLimits;
44
use tokio::process::Command;
55

6-
#[cfg(any(target_os = "linux", target_os = "android"))]
6+
#[cfg(all(target_os = "linux", any(target_env = "gnu", target_env = "uclibc")))]
77
type RlimitResource = libc::__rlimit_resource_t;
88

9-
#[cfg(not(any(target_os = "linux", target_os = "android")))]
9+
#[cfg(not(all(target_os = "linux", any(target_env = "gnu", target_env = "uclibc"))))]
1010
type RlimitResource = libc::c_int;
1111

1212
/// Try to set a resource limit; return error only for unexpected failures.

crates/sage-sdk/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ default-tools = ["dep:sage-tools"]
1515

1616
[dependencies]
1717
# Core library
18-
sage-core = { path = "../sage-core", version = "0.13.56" }
19-
sage-tools = { path = "../sage-tools", version = "0.13.56", optional = true }
18+
sage-core = { path = "../sage-core", version = "0.13.57" }
19+
sage-tools = { path = "../sage-tools", version = "0.13.57", optional = true }
2020

2121
# Async runtime
2222
tokio = { workspace = true }

crates/sage-tools/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ categories.workspace = true
1111

1212
[dependencies]
1313
# Core library
14-
sage-core = { path = "../sage-core", version = "0.13.56" }
14+
sage-core = { path = "../sage-core", version = "0.13.57" }
1515

1616
# Async runtime
1717
tokio = { workspace = true }

0 commit comments

Comments
 (0)