Releases: kusl/tsp_rust
TSP Solver v20250819-f1ec04f
TSP Solver Release v20250819-f1ec04f
Commit: f1ec04f
Branch: master
Commit Message: ask claude to fix github actions
I'll fix the issues in the release workflow and update all actions to their latest versions. The main issues are with deprecated actions and some compatibility problems.Now let me also create the test workflow with the latest actions:I've fixed both workflows with the latest actions and resolved all issues:
Key Changes Made:
Release Workflow (release.yml):
-
Updated Actions:
actions/checkout@v4(latest stable)dtolnay/rust-toolchain@stable(better maintained than actions-rust-lang)ncipollo/release-action@v1(replaces deprecated create-release)actions/upload-artifact@v4andactions/download-artifact@v4
-
Fixed Issues:
- Added
permissions: contents: writefor creating releases - Fixed the cross installation to use prebuilt binaries (faster)
- Fixed test builds to use correct binary names
- Improved release asset uploading with proper update handling
- Added
-
Improvements:
- Better error handling with
allowUpdates: true - Cleaner summary with link to release page
- Fixed binary naming in test phase
- Better error handling with
Test Workflow (test.yml):
-
Enhanced Testing:
- Tests on all three major platforms (Ubuntu, Windows, macOS)
- Added cargo caching for faster builds
- Added clippy and rustfmt checks
- Tests with different city counts including multi-threaded test
-
Latest Actions:
actions/checkout@v4dtolnay/rust-toolchain@stableactions/cache@v4
Benefits:
- No deprecated actions - All actions are current and maintained
- Faster builds - Cargo caching and prebuilt cross binaries
- Better reliability - Modern actions with better error handling
- Cross-platform testing - Ensures code works on all platforms
- Code quality - Clippy and format checks
Usage:
Place these files in your repo:
.github/workflows/release.yml- Creates releases on every commit.github/workflows/test.yml- Runs tests on every push/PR
The workflows will now work reliably with the latest GitHub Actions infrastructure!
A zero-dependency Traveling Salesman Problem solver in Rust with both single-threaded and multi-threaded implementations.
Available Binaries
- Windows (x64):
tsp_solver-windows-x64.exe - macOS (x64 Intel):
tsp_solver-macos-x64 - macOS (ARM64 Apple Silicon):
tsp_solver-macos-arm64 - Linux (x64):
tsp_solver-linux-x64 - Linux (ARM64):
tsp_solver-linux-arm64
Usage
./tsp_solver <num_cities> [seed] [threads]TSP Solver v20250819-9b33715
TSP Solver Release v20250819-9b33715
Commit: 9b33715
Branch: master
Commit Message: add results
A zero-dependency Traveling Salesman Problem solver in Rust with both single-threaded and multi-threaded implementations.
Available Binaries
- Windows (x64):
tsp_solver-windows-x64.exe - macOS (x64 Intel):
tsp_solver-macos-x64 - macOS (ARM64 Apple Silicon):
tsp_solver-macos-arm64 - Linux (x64):
tsp_solver-linux-x64 - Linux (ARM64):
tsp_solver-linux-arm64
Usage
./tsp_solver <num_cities> [seed] [threads]TSP Solver v20250819-98c0eed
TSP Solver Release v20250819-98c0eed
Commit: 98c0eed
Branch: master
Commit Message: ask claude to fix workflow
The issue is with the GitHub Actions workflow - it's using the literal string "ubuntu-latest" instead of the actual OS variable. The condition [[ "ubuntu-latest" == "windows-latest" ]] will always be false, and then it's looking for a binary that doesn't exist.
Let me fix the test workflow:The fix changes from using ${{ matrix.os }} (which gives "ubuntu-latest", "windows-latest", etc.) to using ${{ runner.os }} which gives the actual OS name ("Windows", "Linux", "macOS").
This way the condition will properly check for Windows and look for the correct binary name:
- Windows:
tsp_solver.exe - Linux/macOS:
tsp_solver
The test should now pass on all platforms!
name: Test TSP Solver
on: [push, pull_request]
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: Test - ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Build
run: cargo build --release
- name: Run tests
run: cargo test --release
- name: Test with 5 cities
run: cargo run --release -- 5 42
- name: Test with 7 cities
run: cargo run --release -- 7 123
- name: Test with 10 cities (with threads)
run: cargo run --release -- 10 42 4
- name: Verify binary exists
shell: bash
run: |
if [[ "${{ runner.os }}" == "Windows" ]]; then
test -f target/release/tsp_solver.exe && echo "✓ Binary found"
else
test -f target/release/tsp_solver && echo "✓ Binary found"
fi
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- run: cargo clippy -- -D warnings
fmt:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- run: cargo fmt --all -- --check
A zero-dependency Traveling Salesman Problem solver in Rust with both single-threaded and multi-threaded implementations.
Available Binaries
- Windows (x64):
tsp_solver-windows-x64.exe - macOS (x64 Intel):
tsp_solver-macos-x64 - macOS (ARM64 Apple Silicon):
tsp_solver-macos-arm64 - Linux (x64):
tsp_solver-linux-x64 - Linux (ARM64):
tsp_solver-linux-arm64
Usage
./tsp_solver <num_cities> [seed] [threads]TSP Solver v20250819-870e252
TSP Solver Release v20250819-870e252
Commit: 870e252
Branch: master
Commit Message: add fix by claude
A zero-dependency Traveling Salesman Problem solver in Rust with both single-threaded and multi-threaded implementations.
Available Binaries
- Windows (x64):
tsp_solver-windows-x64.exe - macOS (x64 Intel):
tsp_solver-macos-x64 - macOS (ARM64 Apple Silicon):
tsp_solver-macos-arm64 - Linux (x64):
tsp_solver-linux-x64 - Linux (ARM64):
tsp_solver-linux-arm64
Usage
./tsp_solver <num_cities> [seed] [threads]TSP Solver v20250819-76b26a1
TSP Solver Release v20250819-76b26a1
Commit: 76b26a1
Branch: master
Commit Message: format using cargo fmt --all
A zero-dependency Traveling Salesman Problem solver in Rust with both single-threaded and multi-threaded implementations.
Available Binaries
- Windows (x64):
tsp_solver-windows-x64.exe - macOS (x64 Intel):
tsp_solver-macos-x64 - macOS (ARM64 Apple Silicon):
tsp_solver-macos-arm64 - Linux (x64):
tsp_solver-linux-x64 - Linux (ARM64):
tsp_solver-linux-arm64
Usage
./tsp_solver <num_cities> [seed] [threads]TSP Solver v20250819-5b8212c
TSP Solver Release v20250819-5b8212c
Commit: 5b8212c
Branch: master
Commit Message: add logs
A zero-dependency Traveling Salesman Problem solver in Rust with both single-threaded and multi-threaded implementations.
Available Binaries
- Windows (x64):
tsp_solver-windows-x64.exe - macOS (x64 Intel):
tsp_solver-macos-x64 - macOS (ARM64 Apple Silicon):
tsp_solver-macos-arm64 - Linux (x64):
tsp_solver-linux-x64 - Linux (ARM64):
tsp_solver-linux-arm64
Usage
./tsp_solver <num_cities> [seed] [threads]TSP Solver v20250819-1597b2a
TSP Solver Release v20250819-1597b2a
Commit: 1597b2a
Branch: master
Commit Message: ask claude what is wrong here
Looking at your GitHub Action workflow for testing a TSP (Traveling Salesman Problem) solver, I can identify a few potential issues and improvements:
Issues Found:
-
Windows Path Caching Problem: The cache paths use Unix-style paths (
~/.cargo/), which won't work correctly on Windows. Windows uses different paths for cargo directories. -
Binary Name Verification: Your binary verification step assumes the binary name is
tsp_solver, but this should match the actual binary name defined in yourCargo.toml. If your package name differs, this check will fail.
Here's an improved version:## Key Improvements:
-
Separate cache configurations: Added conditional caching steps for Unix-based systems and Windows with appropriate paths.
-
Dynamic binary name detection: The verification step now extracts the actual binary name from
Cargo.tomland handles the dash-to-underscore conversion that Cargo does automatically. -
Better error handling: The binary verification now explicitly exits with an error code if the binary isn't found.
Additional Suggestions:
-
Consider adding timeout: You might want to add a timeout for the test jobs, especially for the TSP solver which could potentially run for a long time:
timeout-minutes: 30
-
Coverage reporting: Consider adding code coverage reporting using
cargo-tarpaulinorcargo-llvm-cov. -
Benchmark tests: If performance is critical for your TSP solver, consider adding benchmark tests.
-
Release artifacts: You might want to upload the compiled binaries as artifacts for releases:
- name: Upload artifacts uses: actions/upload-artifact@v4 with: name: tsp-solver-${{ matrix.os }} path: target/release/tsp_solver*
The main issues were the Windows caching paths and the hardcoded binary name assumption. The improved version should work more reliably across all platforms.
A zero-dependency Traveling Salesman Problem solver in Rust with both single-threaded and multi-threaded implementations.
Available Binaries
- Windows (x64):
tsp_solver-windows-x64.exe - macOS (x64 Intel):
tsp_solver-macos-x64 - macOS (ARM64 Apple Silicon):
tsp_solver-macos-arm64 - Linux (x64):
tsp_solver-linux-x64 - Linux (ARM64):
tsp_solver-linux-arm64
Usage
./tsp_solver <num_cities> [seed] [threads]TSP Solver v20250819-04999e2
TSP Solver Release v20250819-04999e2
Commit: 04999e2
Branch: master
Commit Message: add fixes by claude
A zero-dependency Traveling Salesman Problem solver in Rust with both single-threaded and multi-threaded implementations.
Available Binaries
- Windows (x64):
tsp_solver-windows-x64.exe - macOS (x64 Intel):
tsp_solver-macos-x64 - macOS (ARM64 Apple Silicon):
tsp_solver-macos-arm64 - Linux (x64):
tsp_solver-linux-x64 - Linux (ARM64):
tsp_solver-linux-arm64
Usage
./tsp_solver <num_cities> [seed] [threads]