Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
179 changes: 179 additions & 0 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
name: Parallax Windows Build

on:
workflow_dispatch:
push:
branches: [ main ]
tags:
- 'v*.*.*' # εŒΉι…η‰ˆζœ¬ζ ‡η­Ύε¦‚ v1.0.0, v2.1.3 η­‰
pull_request:
branches: [ main ]

jobs:
build:
runs-on: windows-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Visual Studio environment
uses: microsoft/setup-msbuild@v1.1

- name: Setup CMake
uses: lukka/get-cmake@latest

- name: Create build directory
run: |
cd src
mkdir build
cd build

- name: Configure CMake
run: |
cd src/build
cmake ../parallax -A x64 -DCMAKE_BUILD_TYPE=Release

- name: Build project
run: |
cd src/build
cmake --build . --config Release

- name: Verify build output
run: |
if (Test-Path "src\build\x64\Release\parallax.exe") {
Write-Host "Build successful: parallax.exe found"
Get-Item "src\build\x64\Release\parallax.exe" | Select-Object Name, Length, LastWriteTime
} else {
Write-Host "Build failed: parallax.exe not found"
exit 1
}

- name: Prepare installer files
run: |
# Create installer files directory
if (Test-Path "installer\FilesToInstall") {
Remove-Item "installer\FilesToInstall" -Recurse -Force
}
New-Item -ItemType Directory -Path "installer\FilesToInstall" -Force

# Copy executable to installer directory
Copy-Item "src\build\x64\Release\parallax.exe" "installer\FilesToInstall\"

Write-Host "Files prepared for installer:"
Get-ChildItem "installer\FilesToInstall" | Select-Object Name, Length

- name: Build installer
run: |
cd installer
cmd /c "build-nim-nozip.bat"
shell: cmd

- name: Verify installer output
run: |
$installerPath = "installer\Output\Gradient_Parallax_PC_Setup_v1.0.0.0.exe"
if (Test-Path $installerPath) {
Write-Host "Installer created successfully"
Get-Item $installerPath | Select-Object Name, Length, LastWriteTime
} else {
Write-Host "Installer creation failed"
Write-Host "Available files in installer\Output:"
if (Test-Path "installer\Output") {
Get-ChildItem "installer\Output" | Select-Object Name, Length
}
exit 1
}

- name: Collect PDB files
run: |
# Create PDB directory
New-Item -ItemType Directory -Path "pdbs" -Force

# Find and copy all PDB files from build directory
Write-Host "Searching for PDB files..."
$pdbFiles = Get-ChildItem -Path "src\build" -Filter "*.pdb" -Recurse

if ($pdbFiles.Count -gt 0) {
Write-Host "Found PDB files:"
foreach ($pdb in $pdbFiles) {
Write-Host "- $($pdb.FullName)"
Copy-Item $pdb.FullName "pdbs\"
}
} else {
Write-Host "No PDB files found"
}

Write-Host "PDB files collected:"
Get-ChildItem "pdbs" | Select-Object Name, Length

- name: Create release package
run: |
# Get current date for versioning
$date = Get-Date -Format "yyyyMMdd"
$time = Get-Date -Format "HHmm"
$version = "1.0.0"
$datetime = "${date}_${time}"

# Create package directory
New-Item -ItemType Directory -Path "release" -Force

# Copy executable
Copy-Item "src\build\x64\Release\parallax.exe" "release\"

# Create program tar.gz package
$packageName = "Parallax_Win-v${version}_${datetime}.tar.gz"
tar -czf $packageName -C release .

# Create PDB tar.gz package
$pdbPackageName = "Parallax_Pdb-v${version}_${datetime}.tar.gz"
if (Test-Path "pdbs" -PathType Container) {
$pdbCount = (Get-ChildItem "pdbs").Count
if ($pdbCount -gt 0) {
tar -czf $pdbPackageName -C pdbs .
Write-Host "PDB package created: $pdbPackageName"
} else {
Write-Host "No PDB files to package"
}
}

# Rename installer with timestamp
$installerName = "Parallax_Win_Setup_v${version}_${datetime}.exe"
Copy-Item "installer\Output\Gradient_Parallax_PC_Setup_v1.0.0.0.exe" $installerName

Write-Host "Release packages created:"
Write-Host "- Program package: $packageName"
Write-Host "- PDB package: $pdbPackageName"
Write-Host "- Installer: $installerName"

- name: Upload program package artifact
uses: actions/upload-artifact@v4
with:
name: parallax-win-package
path: Parallax_Win-v*.tar.gz

- name: Upload PDB package artifact
uses: actions/upload-artifact@v4
with:
name: parallax-win-pdbs
path: Parallax_Pdb-v*.tar.gz

- name: Upload installer artifact
uses: actions/upload-artifact@v4
with:
name: parallax-win-installer
path: Parallax_Win_Setup_v*.exe

- name: Create GitHub release
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v1
with:
files: |
Parallax_Win-v*.tar.gz
Parallax_Pdb-v*.tar.gz
Parallax_Win_Setup_v*.exe
name: Parallax Windows Release ${{ github.ref_name }}
tag_name: ${{ github.ref_name }}
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
90 changes: 90 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# Build directories and artifacts
/src/build/
**/build/
**/Debug/
**/Release/
**/x64/
**/x86/
**/.vs/

# Visual Studio files
*.vcxproj.user
*.vcxproj.filters
*.sln.docstates
*.suo
*.user
*.userosscache
*.sln.docstates.json

# CMake files
CMakeCache.txt
CMakeFiles/
cmake_install.cmake
Makefile
*.cmake
!CMakeLists.txt
!src/parallax/common_make/*.cmake

# Compiled binaries
*.exe
*.dll
*.lib
*.pdb
*.ilk
*.obj
*.iobj
*.ipdb
*.exp

# Exception: Keep NSIS installer tools
!installer/NSIS/**/*.exe
!installer/NSIS/**/*.dll
!installer/*.exe
!installer/*.dll

# Log files
*.log
parallax.log

# Configuration files (keep template)
parallax_config.txt

# Installer output
/installer/Output/
/installer/FilesToInstall/

# Temporary files
*.tmp
*.temp
*~
*.swp
*.swo

# OS generated files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

# IDE files
.vscode/
.idea/
*.code-workspace

# Package managers
node_modules/
.npm
.yarn/

# Backup files
*.bak
*.backup
*~

# Test files
test_*
*_test
*.test
63 changes: 63 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added
- Initial release of Parallax Windows CLI
- Comprehensive environment checking and installation
- WSL2 integration with real-time output
- CUDA toolkit detection and validation
- Modern C++ architecture with CRTP patterns
- Multi-language support (English/Chinese)

### Features
- `parallax check` - Environment requirements checking
- `parallax install` - Automated component installation
- `parallax config` - Configuration management
- `parallax run` - Direct WSL inference server execution
- `parallax join` - Distributed cluster node joining
- `parallax cmd` - WSL command pass-through

### System Support
- Windows 10 Version 2004+ and Windows 11
- NVIDIA GPU support (RTX 3060 Ti+)
- WSL2 and Ubuntu integration
- CUDA Toolkit 12.8/12.9 compatibility

## [1.0.0] - 2025-10-18

### Added
- Initial public release
- Complete development environment setup automation
- Professional Windows installer with NSIS
- Comprehensive documentation and examples
- Apache 2.0 license for open source distribution

### Architecture
- Modular component-based design
- Template method pattern for commands
- CRTP for compile-time polymorphism
- Separation of concerns across modules

### Documentation
- English and Chinese README files
- Contributing guidelines
- Security policy
- GitHub issue and PR templates

---

## Release Notes Format

Each release should include:
- **Added**: New features
- **Changed**: Changes in existing functionality
- **Deprecated**: Soon-to-be removed features
- **Removed**: Removed features
- **Fixed**: Bug fixes
- **Security**: Security improvements
Loading