Skip to content

Commit b7e36ac

Browse files
committed
v1.0.0 (release on github)
1 parent 0da5e1d commit b7e36ac

File tree

5 files changed

+148
-21
lines changed

5 files changed

+148
-21
lines changed

.github/workflows/release.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
env:
9+
CARGO_TERM_COLOR: always
10+
11+
jobs:
12+
build:
13+
name: Build ${{ matrix.target }}
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
matrix:
17+
include:
18+
- os: ubuntu-latest
19+
target: x86_64-unknown-linux-gnu
20+
binary_name: gparallel
21+
- os: ubuntu-latest
22+
target: aarch64-unknown-linux-gnu
23+
binary_name: gparallel
24+
use_cross: true
25+
- os: macos-latest
26+
target: x86_64-apple-darwin
27+
binary_name: gparallel
28+
- os: macos-latest
29+
target: aarch64-apple-darwin
30+
binary_name: gparallel
31+
32+
steps:
33+
- uses: actions/checkout@v4
34+
35+
- name: Install Rust
36+
uses: dtolnay/rust-toolchain@stable
37+
with:
38+
targets: ${{ matrix.target }}
39+
40+
- name: Install cross
41+
if: matrix.use_cross
42+
run: cargo install cross
43+
44+
- name: Build
45+
run: |
46+
if [ "${{ matrix.use_cross }}" = "true" ]; then
47+
cross build --release --target ${{ matrix.target }}
48+
else
49+
cargo build --release --target ${{ matrix.target }}
50+
fi
51+
52+
- name: Archive binary
53+
run: |
54+
cd target/${{ matrix.target }}/release
55+
tar czf ../../../${{ matrix.binary_name }}-${{ matrix.target }}.tar.gz ${{ matrix.binary_name }}
56+
57+
- name: Upload artifacts
58+
uses: actions/upload-artifact@v4
59+
with:
60+
name: ${{ matrix.binary_name }}-${{ matrix.target }}
61+
path: ${{ matrix.binary_name }}-${{ matrix.target }}.tar.gz
62+
63+
release:
64+
needs: build
65+
runs-on: ubuntu-latest
66+
steps:
67+
- uses: actions/checkout@v4
68+
69+
- name: Download artifacts
70+
uses: actions/download-artifact@v4
71+
72+
- name: Create Release
73+
uses: softprops/action-gh-release@v2
74+
with:
75+
files: |
76+
gparallel-*/*.tar.gz
77+
draft: false
78+
prerelease: false
79+
generate_release_notes: true

Cargo.lock

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

Cargo.toml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "gparallel"
3-
version = "0.2.1"
3+
version = "1.0.0"
44
description = "Single‑binary workstation GPU scheduler: feed a list of shell commands and gparallel will run them one‑by‑one on every visible GPU (1 GPU per process). Perfect for researchers who don't need heavyweight clusters like Slurm or run.ai."
55
license = "MIT"
66
readme = "README.md"
@@ -22,3 +22,10 @@ serde = { version = "1.0", features = ["derive"] }
2222
serde_json = "1.0"
2323
chrono = "0.4"
2424
nix = { version = "0.27", features = ["process", "signal"] }
25+
26+
[profile.release]
27+
opt-level = 3
28+
lto = true
29+
codegen-units = 1
30+
strip = true
31+
panic = "abort"

README.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -235,14 +235,7 @@ Common causes:
235235

236236
## Contributing
237237

238-
Contributions welcome! Please:
239-
240-
1. Fork the repository
241-
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
242-
3. Commit changes (`git commit -m 'Add amazing feature'`)
243-
4. Push to branch (`git push origin feature/amazing-feature`)
244-
5. Open a Pull Request
245-
238+
Contributions welcome! Please open an issue or submit a pull request.
246239
### Development Setup
247240

248241
```bash

build-release.sh

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
#!/bin/bash
2+
set -e
3+
4+
PROJECT_NAME="gparallel"
5+
VERSION=$(grep '^version' Cargo.toml | sed 's/version = "\(.*\)"/\1/')
6+
7+
echo "Building $PROJECT_NAME v$VERSION..."
8+
9+
# Create release directory
10+
mkdir -p release
11+
12+
# Build for different targets
13+
TARGETS=(
14+
"x86_64-unknown-linux-gnu"
15+
"aarch64-unknown-linux-gnu"
16+
"x86_64-apple-darwin"
17+
"aarch64-apple-darwin"
18+
)
19+
20+
for TARGET in "${TARGETS[@]}"; do
21+
echo "Building for $TARGET..."
22+
23+
# Check if target is installed
24+
if ! rustup target list | grep -q "$TARGET (installed)"; then
25+
echo "Installing target $TARGET..."
26+
rustup target add $TARGET
27+
fi
28+
29+
# Build
30+
if cargo build --release --target $TARGET 2>/dev/null; then
31+
# Copy binary to release directory with target suffix
32+
cp "target/$TARGET/release/$PROJECT_NAME" "release/${PROJECT_NAME}-${TARGET}"
33+
echo "✓ Built $TARGET"
34+
else
35+
echo "✗ Failed to build $TARGET (may require cross-compilation tools)"
36+
fi
37+
done
38+
39+
# Create archives
40+
cd release
41+
for file in *; do
42+
if [[ -f "$file" ]]; then
43+
tar -czf "${file}.tar.gz" "$file"
44+
echo "Created ${file}.tar.gz"
45+
fi
46+
done
47+
48+
echo "Release builds complete! Check the 'release' directory."

0 commit comments

Comments
 (0)