Compare commits
8 Commits
master
...
feat/heart
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7b981b154f | ||
|
|
5dfd0a5e2b | ||
|
|
2896875331 | ||
|
|
a2d5672e72 | ||
|
|
bb7314bc37 | ||
|
|
b59e3ae6d1 | ||
|
|
1f8934c4b4 | ||
|
|
ace9f19b11 |
29
.github/workflows/promote-release.yml
vendored
29
.github/workflows/promote-release.yml
vendored
@ -75,10 +75,21 @@ jobs:
|
||||
cross_compiler: gcc-aarch64-linux-gnu
|
||||
linker_env: CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER
|
||||
linker: aarch64-linux-gnu-gcc
|
||||
- os: ubuntu-latest
|
||||
target: armv7-unknown-linux-gnueabihf
|
||||
artifact: zeroclaw
|
||||
ext: tar.gz
|
||||
cross_compiler: gcc-arm-linux-gnueabihf
|
||||
linker_env: CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER
|
||||
linker: arm-linux-gnueabihf-gcc
|
||||
- os: macos-14
|
||||
target: aarch64-apple-darwin
|
||||
artifact: zeroclaw
|
||||
ext: tar.gz
|
||||
- os: macos-14
|
||||
target: x86_64-apple-darwin
|
||||
artifact: zeroclaw
|
||||
ext: tar.gz
|
||||
- os: windows-latest
|
||||
target: x86_64-pc-windows-msvc
|
||||
artifact: zeroclaw.exe
|
||||
@ -142,16 +153,16 @@ jobs:
|
||||
cat SHA256SUMS
|
||||
|
||||
- name: Create GitHub Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
tag_name: ${{ needs.validate.outputs.tag }}
|
||||
name: ${{ needs.validate.outputs.tag }}
|
||||
prerelease: false
|
||||
generate_release_notes: true
|
||||
files: |
|
||||
artifacts/**/*
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
gh release create "${{ needs.validate.outputs.tag }}" \
|
||||
--repo "${{ github.repository }}" \
|
||||
--target "$GITHUB_SHA" \
|
||||
--title "${{ needs.validate.outputs.tag }}" \
|
||||
--latest \
|
||||
--generate-notes \
|
||||
artifacts/*/*.tar.gz artifacts/*/*.zip artifacts/SHA256SUMS
|
||||
|
||||
docker:
|
||||
name: Push Docker Image
|
||||
|
||||
37
.github/workflows/release.yml
vendored
37
.github/workflows/release.yml
vendored
@ -1,8 +1,9 @@
|
||||
name: Beta Release
|
||||
name: Daily Beta Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
schedule:
|
||||
- cron: '0 8 * * *' # Daily at 08:00 UTC
|
||||
workflow_dispatch: {}
|
||||
|
||||
concurrency:
|
||||
group: release
|
||||
@ -19,6 +20,7 @@ env:
|
||||
|
||||
jobs:
|
||||
version:
|
||||
if: github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
|
||||
name: Resolve Version
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
@ -57,10 +59,21 @@ jobs:
|
||||
cross_compiler: gcc-aarch64-linux-gnu
|
||||
linker_env: CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER
|
||||
linker: aarch64-linux-gnu-gcc
|
||||
- os: ubuntu-latest
|
||||
target: armv7-unknown-linux-gnueabihf
|
||||
artifact: zeroclaw
|
||||
ext: tar.gz
|
||||
cross_compiler: gcc-arm-linux-gnueabihf
|
||||
linker_env: CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER
|
||||
linker: arm-linux-gnueabihf-gcc
|
||||
- os: macos-14
|
||||
target: aarch64-apple-darwin
|
||||
artifact: zeroclaw
|
||||
ext: tar.gz
|
||||
- os: macos-14
|
||||
target: x86_64-apple-darwin
|
||||
artifact: zeroclaw
|
||||
ext: tar.gz
|
||||
- os: windows-latest
|
||||
target: x86_64-pc-windows-msvc
|
||||
artifact: zeroclaw.exe
|
||||
@ -124,16 +137,16 @@ jobs:
|
||||
cat SHA256SUMS
|
||||
|
||||
- name: Create GitHub Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
tag_name: ${{ needs.version.outputs.tag }}
|
||||
name: ${{ needs.version.outputs.tag }}
|
||||
prerelease: true
|
||||
generate_release_notes: true
|
||||
files: |
|
||||
artifacts/**/*
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
gh release create "${{ needs.version.outputs.tag }}" \
|
||||
--repo "${{ github.repository }}" \
|
||||
--target "$GITHUB_SHA" \
|
||||
--title "${{ needs.version.outputs.tag }}" \
|
||||
--prerelease \
|
||||
--generate-notes \
|
||||
artifacts/*/*.tar.gz artifacts/*/*.zip artifacts/SHA256SUMS
|
||||
|
||||
docker:
|
||||
name: Push Docker Image
|
||||
|
||||
@ -688,7 +688,7 @@ allowed_workspace_roots = [] # optional allowlist for workspace mount validati
|
||||
|
||||
[heartbeat]
|
||||
enabled = false
|
||||
interval_minutes = 30
|
||||
interval_minutes = 5
|
||||
message = "Check London time" # optional fallback task when HEARTBEAT.md has no `- ` entries
|
||||
target = "telegram" # optional announce channel: telegram, discord, slack, mattermost
|
||||
to = "123456789" # optional target recipient/chat/channel id
|
||||
|
||||
@ -663,7 +663,7 @@ allowed_workspace_roots = [] # allowlist tùy chọn để xác thực workspa
|
||||
|
||||
[heartbeat]
|
||||
enabled = false
|
||||
interval_minutes = 30
|
||||
interval_minutes = 5
|
||||
|
||||
[tunnel]
|
||||
provider = "none" # "none", "cloudflare", "tailscale", "ngrok", "custom"
|
||||
|
||||
@ -16,7 +16,6 @@ Selected allowlist (all actions currently used across CI, Beta Release, and Prom
|
||||
| `actions/download-artifact@v4` | release, promote-release | Download build artifacts for packaging |
|
||||
| `dtolnay/rust-toolchain@stable` | All workflows | Install Rust toolchain (1.92.0) |
|
||||
| `Swatinem/rust-cache@v2` | All workflows | Cargo build/dependency caching |
|
||||
| `softprops/action-gh-release@v2` | release, promote-release | Create GitHub Releases |
|
||||
| `docker/setup-buildx-action@v3` | release, promote-release | Docker Buildx setup |
|
||||
| `docker/login-action@v3` | release, promote-release | GHCR authentication |
|
||||
| `docker/build-push-action@v6` | release, promote-release | Multi-platform Docker image build and push |
|
||||
@ -26,7 +25,6 @@ Equivalent allowlist patterns:
|
||||
- `actions/*`
|
||||
- `dtolnay/rust-toolchain@*`
|
||||
- `Swatinem/rust-cache@*`
|
||||
- `softprops/action-gh-release@*`
|
||||
- `docker/*`
|
||||
|
||||
## Workflows
|
||||
@ -34,7 +32,7 @@ Equivalent allowlist patterns:
|
||||
| Workflow | File | Trigger |
|
||||
|----------|------|---------|
|
||||
| CI | `.github/workflows/ci.yml` | Pull requests to `master` |
|
||||
| Beta Release | `.github/workflows/release.yml` | Push to `master` |
|
||||
| Daily Beta Release | `.github/workflows/release.yml` | Daily schedule (08:00 UTC) + manual `workflow_dispatch` |
|
||||
| Promote Release | `.github/workflows/promote-release.yml` | Manual `workflow_dispatch` |
|
||||
|
||||
## Change Control
|
||||
@ -68,6 +66,11 @@ gh api repos/zeroclaw-labs/zeroclaw/actions/permissions/selected-actions
|
||||
- Retained: `actions/*`, `dtolnay/rust-toolchain@*`, `softprops/action-gh-release@*`, `docker/*`
|
||||
- 2026-03-05: CI build optimization — added mold linker, cargo-nextest, CARGO_INCREMENTAL=0
|
||||
- sccache removed due to fragile GHA cache backend causing build failures
|
||||
- 2026-03-07: Release pipeline overhaul
|
||||
- Removed: `softprops/action-gh-release@*` (replaced with built-in `gh` CLI)
|
||||
- Beta trigger changed from push-on-master to daily schedule + workflow_dispatch
|
||||
- Added default-branch guard on beta workflow_dispatch
|
||||
- Added build targets: `armv7-unknown-linux-gnueabihf`, `x86_64-apple-darwin` (cross-compiled from macos-14)
|
||||
|
||||
## Rollback
|
||||
|
||||
|
||||
@ -2399,7 +2399,7 @@ pub struct ClassificationRule {
|
||||
pub struct HeartbeatConfig {
|
||||
/// Enable periodic heartbeat pings. Default: `false`.
|
||||
pub enabled: bool,
|
||||
/// Interval in minutes between heartbeat pings. Default: `30`.
|
||||
/// Interval in minutes between heartbeat pings. Default: `5`.
|
||||
pub interval_minutes: u32,
|
||||
/// Optional fallback task text when `HEARTBEAT.md` has no task entries.
|
||||
#[serde(default)]
|
||||
@ -2416,7 +2416,7 @@ impl Default for HeartbeatConfig {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
enabled: false,
|
||||
interval_minutes: 30,
|
||||
interval_minutes: 5,
|
||||
message: None,
|
||||
target: None,
|
||||
to: None,
|
||||
@ -4974,7 +4974,7 @@ mod tests {
|
||||
async fn heartbeat_config_default() {
|
||||
let h = HeartbeatConfig::default();
|
||||
assert!(!h.enabled);
|
||||
assert_eq!(h.interval_minutes, 30);
|
||||
assert_eq!(h.interval_minutes, 5);
|
||||
assert!(h.message.is_none());
|
||||
assert!(h.target.is_none());
|
||||
assert!(h.to.is_none());
|
||||
|
||||
@ -183,7 +183,7 @@ async fn run_heartbeat_worker(config: Config) -> Result<()> {
|
||||
);
|
||||
let delivery = heartbeat_delivery_target(&config)?;
|
||||
|
||||
let interval_mins = config.heartbeat.interval_minutes.max(5);
|
||||
let interval_mins = config.heartbeat.interval_minutes.max(1);
|
||||
let mut interval = tokio::time::interval(Duration::from_secs(u64::from(interval_mins) * 60));
|
||||
|
||||
loop {
|
||||
|
||||
@ -33,7 +33,7 @@ impl HeartbeatEngine {
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
let interval_mins = self.config.interval_minutes.max(5);
|
||||
let interval_mins = self.config.interval_minutes.max(1);
|
||||
info!("💓 Heartbeat started: every {} minutes", interval_mins);
|
||||
|
||||
let mut interval = time::interval(Duration::from_secs(u64::from(interval_mins) * 60));
|
||||
@ -247,7 +247,7 @@ mod tests {
|
||||
let engine = HeartbeatEngine::new(
|
||||
HeartbeatConfig {
|
||||
enabled: true,
|
||||
interval_minutes: 30,
|
||||
interval_minutes: 5,
|
||||
..HeartbeatConfig::default()
|
||||
},
|
||||
dir.clone(),
|
||||
@ -273,7 +273,7 @@ mod tests {
|
||||
let engine = HeartbeatEngine::new(
|
||||
HeartbeatConfig {
|
||||
enabled: true,
|
||||
interval_minutes: 30,
|
||||
interval_minutes: 5,
|
||||
..HeartbeatConfig::default()
|
||||
},
|
||||
dir.clone(),
|
||||
@ -291,7 +291,7 @@ mod tests {
|
||||
let engine = HeartbeatEngine::new(
|
||||
HeartbeatConfig {
|
||||
enabled: false,
|
||||
interval_minutes: 30,
|
||||
interval_minutes: 5,
|
||||
..HeartbeatConfig::default()
|
||||
},
|
||||
std::env::temp_dir(),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user