Skip to content

Commit 8533562

Browse files
committed
configure ci
1 parent 0c6c10f commit 8533562

File tree

8 files changed

+289
-8
lines changed

8 files changed

+289
-8
lines changed

.github/workflows/ci.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main, master ]
6+
pull_request:
7+
branches: [ main, master ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: dtolnay/rust-toolchain@stable
15+
- uses: Swatinem/rust-cache@v2
16+
- run: cargo test
17+
- run: cargo clippy -- -D warnings
18+
- run: cargo fmt --check
19+
20+
build:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v4
24+
- uses: taiki-e/upload-rust-binary-action@v1
25+
with:
26+
bin: lazyslurm
27+
target: x86_64-unknown-linux-gnu,x86_64-unknown-linux-musl,x86_64-apple-darwin,aarch64-apple-darwin,x86_64-pc-windows-msvc
28+
archive: $bin-$target
29+
checksum: sha256
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
create-release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: taiki-e/create-gh-release-action@v1
14+
with:
15+
changelog: CHANGELOG.md
16+
title: $version
17+
env:
18+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+
20+
upload-assets:
21+
needs: create-release
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v4
25+
- uses: taiki-e/upload-rust-binary-action@v1
26+
with:
27+
bin: lazyslurm
28+
target: x86_64-unknown-linux-gnu,x86_64-unknown-linux-musl,x86_64-apple-darwin,aarch64-apple-darwin,x86_64-pc-windows-msvc
29+
archive: $bin-$target
30+
checksum: sha256
31+
token: ${{ secrets.GITHUB_TOKEN }}
32+
33+
publish-crates:
34+
needs: create-release
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/checkout@v4
38+
- uses: dtolnay/rust-toolchain@stable
39+
- run: cargo publish
40+
env:
41+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

CHANGELOG.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Changelog
2+
3+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
4+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
5+
6+
## [Unreleased]
7+
8+
### Added
9+
- Cross-platform GitHub Actions CI/CD pipeline
10+
- Automated binary releases for Linux, macOS, and Windows
11+
- Homebrew formula
12+
- README with installation instructions
13+
14+
## [0.1.0] - 2025-09-05
15+
16+
### Added
17+
- Initial release of LazySlurm
18+
- Real-time SLURM job monitoring with terminal UI
19+
- Job list view with status indicators
20+
- Job details panel with comprehensive information
21+
- Job log tailing functionality
22+
- Keyboard navigation (q: quit, ↑/↓: navigate, r: refresh, c: cancel)
23+
- SLURM parser for job data extraction
24+
- Development environment with Docker and mock jobs
25+
- Support for user filtering and job management
26+
27+
### Dependencies
28+
- ratatui 0.28 for terminal UI
29+
- crossterm 0.28 for cross-platform terminal handling
30+
- clap 4.5 for CLI argument parsing
31+
- tokio 1.0 for async runtime
32+
- chrono 0.4 for date/time handling
33+
- anyhow 1.0 for error handling
34+
- regex 1.10 for parsing
35+
- serde 1.0 for serialization
36+
37+
### Development
38+
- Docker-based SLURM development environment
39+
- Just command runner for development tasks
40+
- Mock job generation for testing
41+
- Incremental compilation optimization

Cargo.toml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,16 @@
22
name = "lazyslurm"
33
version = "0.1.0"
44
edition = "2024"
5-
description = "A terminal UI for managing SLURM jobs"
5+
description = "A terminal UI for monitoring and managing SLURM jobs"
66
license = "MIT"
77
authors = ["Tom Hill <[email protected]>"]
88
repository = "https://github.com/hill/lazyslurm"
9+
homepage = "https://github.com/hill/lazyslurm"
10+
documentation = "https://docs.rs/lazyslurm"
11+
readme = "README.md"
12+
keywords = ["slurm", "hpc", "terminal", "tui", "cluster"]
13+
categories = ["command-line-utilities", "development-tools"]
14+
exclude = ["dev/", ".github/", "*.png", "*.jpg"]
915

1016
[[bin]]
1117
name = "lazyslurm"

README.md

Lines changed: 81 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,103 @@
11
# LazySlurm
22

3-
A terminal UI for [SLURM](https://slurm.schedmd.com/overview.html) job management. Like the awesome [lazygit](https://github.com/jesseduffield/lazygit) but for HPC.
3+
[![CI](https://github.com/hill/lazyslurm/workflows/CI/badge.svg)](https://github.com/hill/lazyslurm/actions)
4+
[![Crates.io](https://img.shields.io/crates/v/lazyslurm.svg)](https://crates.io/crates/lazyslurm)
5+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
46

5-
## Controls
7+
A terminal UI for [SLURM](https://slurm.schedmd.com/overview.html) job management. Like the awesome [lazygit](https://github.com/jesseduffield/lazygit) but for HPC clusters.
68

7-
- `q` quit
8-
- `↑/↓` navigate
9-
- `r` refresh
10-
- `c` cancel job
9+
![LazySlurm Screenshot](screenshot.png)
10+
11+
## Features
12+
13+
- **Real-time job monitoring** - Watch your jobs as they run, with live log tailing
14+
- **Intuitive keyboard navigation** - Vim-like controls for efficiency
15+
- **Job management** - Cancel jobs, view details, and monitor resource usage
16+
- **Cross-platform** - Works on Linux, macOS, and Windows
17+
- **Single binary** - No dependencies, perfect for HPC environments
18+
- **Lightweight** - Fast startup, minimal resource usage
1119

1220
## Installation
1321

1422
### Binary Releases
1523

24+
Download the latest binary for your platform from [GitHub Releases](https://github.com/hill/lazyslurm/releases):
25+
26+
```bash
27+
# Linux x64
28+
curl -L https://github.com/hill/lazyslurm/releases/latest/download/lazyslurm-linux-x64.tar.gz | tar xz
29+
sudo mv lazyslurm /usr/local/bin/
30+
31+
# macOS (Apple Silicon)
32+
curl -L https://github.com/hill/lazyslurm/releases/latest/download/lazyslurm-macos-arm64.tar.gz | tar xz
33+
sudo mv lazyslurm /usr/local/bin/
34+
35+
# macOS (Intel)
36+
curl -L https://github.com/hill/lazyslurm/releases/latest/download/lazyslurm-macos-x64.tar.gz | tar xz
37+
sudo mv lazyslurm /usr/local/bin/
38+
```
39+
1640
### Homebrew
1741

42+
```bash
43+
brew install hill/tap/lazyslurm
44+
```
45+
1846
### Cargo
1947

48+
If you have [Rust installed](https://rustup.rs/):
49+
50+
```bash
51+
cargo install lazyslurm
52+
```
53+
2054
### Gah
2155

2256
```sh
2357
gah install hill/lazyslurm
2458
```
2559

60+
## Usage
61+
62+
### Basic Usage
63+
64+
```bash
65+
# Monitor all jobs for current user
66+
lazyslurm
67+
68+
# Monitor jobs for specific user
69+
lazyslurm --user username
70+
71+
# Monitor jobs in specific partition
72+
lazyslurm --partition gpu
73+
```
74+
75+
### Keyboard Controls
76+
77+
| Key | Action |
78+
|-----|--------|
79+
| `q` | Quit application |
80+
| `↑/↓` or `j/k` | Navigate job list |
81+
| `r` | Refresh job data |
82+
| `c` | Cancel selected job |
83+
| `Enter` | View job details |
84+
| `l` | View job logs |
85+
| `?` | Show help |
86+
87+
### Configuration
88+
89+
LazySlurm reads configuration from `~/.config/lazyslurm/config.toml`:
90+
91+
```toml
92+
[display]
93+
refresh_interval = 5 # seconds
94+
max_log_lines = 100
95+
96+
[slurm]
97+
default_user = "myusername"
98+
default_partition = "compute"
99+
```
100+
26101
## Development
27102

28103
Requires Docker and [just](https://github.com/casey/just).

release/README.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Release & Distribution
2+
3+
This directory contains files related to distributing LazySlurm.
4+
5+
## Directory Structure
6+
7+
- `homebrew/` - Homebrew formula for macOS/Linux installation
8+
- `packaging/` - Future: RPM/DEB package specs
9+
- `scripts/` - Future: Installation scripts
10+
11+
## Release Process
12+
13+
### 1. Create a Release
14+
15+
1. Update version in `Cargo.toml`
16+
2. Update `CHANGELOG.md` with changes
17+
3. Create and push a git tag:
18+
```bash
19+
git tag v0.1.0
20+
git push origin v0.1.0
21+
```
22+
4. GitHub Actions will automatically:
23+
- Build cross-platform binaries
24+
- Create GitHub release
25+
- Upload binary assets
26+
- Publish to crates.io
27+
28+
### 2. Update Homebrew Formula
29+
30+
After a successful release:
31+
32+
1. Update URLs and SHA256 hashes in `homebrew/lazyslurm.rb`
33+
2. Test the formula locally:
34+
```bash
35+
brew install --build-from-source ./release/homebrew/lazyslurm.rb
36+
```
37+
3. Submit to homebrew-core or create a tap
38+
39+
### 3. Distribution Checklist
40+
41+
- [ ] GitHub release with binaries
42+
- [ ] Published to crates.io
43+
- [ ] Homebrew formula updated
44+
- [ ] README installation instructions updated
45+
- [ ] Test installations on different platforms
46+
47+
## Homebrew Tap (Future)
48+
49+
To create your own tap:
50+
51+
```bash
52+
# Create tap repository
53+
gh repo create homebrew-tap --public
54+
55+
# Add formula
56+
cp release/homebrew/lazyslurm.rb /path/to/homebrew-tap/Formula/
57+
58+
# Users install with:
59+
brew tap hill/tap
60+
brew install lazyslurm
61+
```

release/homebrew/lazyslurm.rb

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
class Lazyslurm < Formula
2+
desc "A terminal UI for monitoring and managing SLURM jobs"
3+
homepage "https://github.com/hill/lazyslurm"
4+
version "0.1.0"
5+
6+
if OS.mac? && Hardware::CPU.arm?
7+
url "https://github.com/hill/lazyslurm/releases/download/v0.1.0/lazyslurm-aarch64-apple-darwin.tar.xz"
8+
sha256 "TBD" # Will be updated with actual hash
9+
elsif OS.mac? && Hardware::CPU.intel?
10+
url "https://github.com/hill/lazyslurm/releases/download/v0.1.0/lazyslurm-x86_64-apple-darwin.tar.xz"
11+
sha256 "TBD" # Will be updated with actual hash
12+
elsif OS.linux?
13+
url "https://github.com/hill/lazyslurm/releases/download/v0.1.0/lazyslurm-x86_64-unknown-linux-gnu.tar.xz"
14+
sha256 "TBD" # Will be updated with actual hash
15+
end
16+
17+
license "MIT"
18+
19+
def install
20+
bin.install "lazyslurm"
21+
end
22+
23+
test do
24+
system "#{bin}/lazyslurm", "--version"
25+
end
26+
end

src/ui/components.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ fn render_job_details(frame: &mut Frame, app: &App, area: Rect) {
139139
Line::from(" Tom Hill 2025 - [email protected]"),
140140
Line::from(""),
141141
Line::from(""),
142-
Line::from("No jobs found."),
142+
Line::from("No jobs found!"),
143143
Line::from(""),
144144
Line::from("Try running: lazyslurm --user <username>"),
145145
Line::from("or check if SLURM is available."),

0 commit comments

Comments
 (0)