Skip to content
Merged
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
4ac2827
refactor: remove educational vs professional LDPC codes comparison ex…
selimfirat Jun 10, 2025
3619acd
Refactor Examples: Extract Plotting Code and Convert Print Statements…
selimfirat Jun 13, 2025
681c2b5
Refactor Examples: Extract Plotting Code and Convert Print Statements…
selimfirat Jun 14, 2025
9b119f4
Refactor modulation examples and improve type handling
selimfirat Jun 14, 2025
d02d456
#34 refactor: update plotting imports and utilize PlottingUtils for c…
selimfirat Jun 14, 2025
70b620e
refactor: enhance error handling in setup.py and improve file reading…
selimfirat Jun 14, 2025
e913c73
Refactor plotting utilities and update examples to use new PlottingUt…
selimfirat Jun 14, 2025
8864e65
Refactor documentation and examples: Update contributing guidelines, …
selimfirat Jun 14, 2025
6a5e4f4
refactor: convert PosixPath to string in mock file handling for consi…
selimfirat Jun 14, 2025
46bb24b
Add comprehensive tests for PlottingUtils and enhance plotting functi…
selimfirat Jun 14, 2025
10e772b
Remove example script for Discrete Task-Oriented Deep JSCC (Xie 2023)…
selimfirat Jun 14, 2025
1396dda
Enhance visualizations and animations for FEC and LDPC decoding examples
selimfirat Jun 14, 2025
787b662
Remove patch coverage configuration from codecov.yml
selimfirat Jun 14, 2025
ccdb834
Add comprehensive tests for mutual information processing and edge ca…
selimfirat Jun 14, 2025
fcc6d28
Add installation and validation steps for BPG tools in CI workflows
selimfirat Jun 14, 2025
72646de
Refactor BPG tools installation in CI workflows to create a local bin…
selimfirat Jun 14, 2025
98b0d2d
Enhance data handling and visualization in channel comparison and MAC…
selimfirat Jun 14, 2025
b2afaf9
Refactor BPG tools installation in CI workflows to improve environmen…
selimfirat Jun 14, 2025
e9311bb
Enhance CI workflows by adding caching for BPG tools, improving syste…
selimfirat Jun 14, 2025
b661b3d
Improve system dependency installation in CI workflows with enhanced …
selimfirat Jun 14, 2025
b48efe8
Add comprehensive tests for SSIM and EVM metrics, including stateful …
selimfirat Jun 14, 2025
a65ff1d
Refactor examples and tests for improved clarity and coverage
selimfirat Jun 14, 2025
7bc7f3c
CapacityAnalyzer removed. Refactor code structure for improved readab…
selimfirat Jun 14, 2025
bda3743
Update BPG download links to use the correct source for improved inst…
selimfirat Jun 15, 2025
f4cbe96
Update changelog and version to 0.2.1; add new features, improvements…
selimfirat Jun 15, 2025
a11ddce
Remove references to unused example directories in documentation
selimfirat Jun 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
188 changes: 187 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,183 @@ jobs:
${{ runner.os }}-ci-pip-${{ matrix.python-version }}-
${{ runner.os }}-ci-pip-

- name: Cache BPG tools
uses: actions/cache@v4
id: bpg-cache
with:
path: ~/.local/bin/bpg*
key: ${{ runner.os }}-bpg-tools-v1
restore-keys: |
${{ runner.os }}-bpg-tools-

- name: Install system dependencies
run: |
echo "πŸ”§ Installing system dependencies for BPG..."

# Check if we can use sudo without password
if sudo -n true 2>/dev/null; then
echo "πŸ“¦ Installing system packages with sudo..."
sudo apt-get update -qq
sudo apt-get install -y libtiff5-dev pkg-config wget build-essential
echo "βœ… System dependencies installed via apt"
else
echo "⚠️ Cannot use sudo - checking for existing dependencies..."

# Check if required tools/libraries are already available
MISSING_DEPS=()

# Check for essential build tools
if ! command -v gcc &> /dev/null; then
MISSING_DEPS+=("gcc")
fi
if ! command -v make &> /dev/null; then
MISSING_DEPS+=("make")
fi
if ! command -v wget &> /dev/null && ! command -v curl &> /dev/null; then
MISSING_DEPS+=("wget or curl")
fi

# Check for pkg-config and libraries
if ! command -v pkg-config &> /dev/null; then
MISSING_DEPS+=("pkg-config")
fi
if ! pkg-config --exists libtiff-4 2>/dev/null; then
MISSING_DEPS+=("libtiff-dev")
fi

if [ ${#MISSING_DEPS[@]} -eq 0 ]; then
echo "βœ… All required dependencies are already available"
else
echo "❌ Missing dependencies: ${MISSING_DEPS[*]}"
echo "πŸ“ BPG compilation may fail due to missing system dependencies"
echo "πŸ’‘ Consider configuring passwordless sudo for the runner user"
echo " or pre-installing: libtiff5-dev pkg-config wget build-essential"

# Try alternative installation methods
echo "πŸ”„ Attempting alternative installation methods..."

# Try using conda if available
if command -v conda &> /dev/null; then
echo "πŸ“¦ Trying conda installation..."
conda install -c conda-forge libtiff pkg-config -y || echo "⚠️ Conda install failed"
fi

# Try using homebrew if available (for macOS runners)
if command -v brew &> /dev/null; then
echo "πŸ“¦ Trying homebrew installation..."
brew install libtiff pkg-config || echo "⚠️ Homebrew install failed"
fi
fi
fi

- name: Install BPG tools
run: |
echo "πŸ”§ Installing BPG (Better Portable Graphics) tools..."

# Create local bin directory for BPG tools
BPG_BIN_DIR="$HOME/.local/bin"
mkdir -p "$BPG_BIN_DIR"

# Add to PATH for this session and future steps
echo "$BPG_BIN_DIR" >> $GITHUB_PATH
export PATH="$BPG_BIN_DIR:$PATH"

# Check if BPG tools are already installed or cached
if command -v bpgenc &> /dev/null && command -v bpgdec &> /dev/null; then
echo "βœ… BPG tools already installed"
bpgenc 2>&1 | head -n 3 || true
elif [ "${{ steps.bpg-cache.outputs.cache-hit }}" == "true" ]; then
echo "βœ… BPG tools restored from cache"
chmod +x "$BPG_BIN_DIR"/bpg* 2>/dev/null || true
else
echo "πŸ“¦ Installing BPG tools from source..."

# Check build environment
echo "πŸ” Checking build environment..."
echo "OS: $(uname -s)"
echo "Architecture: $(uname -m)"
echo "Available compilers:"
which gcc && gcc --version | head -1 || echo "gcc not found"
which clang && clang --version | head -1 || echo "clang not found"
which make && make --version | head -1 || echo "make not found"

# Check for required libraries
echo "πŸ” Checking for required libraries..."
pkg-config --exists libjpeg && echo "libjpeg: βœ…" || echo "libjpeg: ❌"
pkg-config --exists libpng && echo "libpng: βœ…" || echo "libpng: ❌"
pkg-config --exists libtiff-4 && echo "libtiff: βœ…" || echo "libtiff: ❌"

# Download and try to compile BPG (non-blocking)
echo "πŸ“₯ Downloading BPG source..."
cd /tmp

# Try multiple sources for BPG
BPG_DOWNLOADED=false

# Primary source
if wget -q --timeout=10 https://bellard.org/bpg/libbpg-0.9.8.tar.gz 2>/dev/null; then
echo "βœ… Downloaded BPG source from primary location"
BPG_DOWNLOADED=true
# Fallback: try curl
elif curl -sL --max-time 10 https://bellard.org/bpg/libbpg-0.9.8.tar.gz -o bpg-0.9.8.tar.gz 2>/dev/null; then
echo "βœ… Downloaded BPG source using curl"
BPG_DOWNLOADED=true
# Alternative source (if available)
elif wget -q --timeout=10 https://github.com/mirrorer/libbpg/archive/refs/heads/master.tar.gz -O bpg-master.tar.gz 2>/dev/null; then
echo "βœ… Downloaded BPG source from alternative location"
tar xzf bpg-master.tar.gz
mv libbpg-master bpg-0.9.8
BPG_DOWNLOADED=true
fi

if [ "$BPG_DOWNLOADED" = true ]; then
echo "βœ… Downloaded BPG source"
tar xzf bpg-0.9.8.tar.gz
cd bpg-0.9.8

# Try to compile BPG tools
echo "πŸ”¨ Attempting to compile BPG tools..."

# Redirect make output to avoid stdout issues
if make > make_output.log 2>&1; then
echo "βœ… BPG compilation successful"
cat make_output.log | tail -n 10 # Show last 10 lines of build log

# Install to user bin directory
if cp bpgenc bpgdec "$BPG_BIN_DIR/" 2>/dev/null; then
chmod +x "$BPG_BIN_DIR/bpgenc" "$BPG_BIN_DIR/bpgdec"

# Verify installation
if command -v bpgenc &> /dev/null && command -v bpgdec &> /dev/null; then
echo "βœ… BPG tools installed successfully to $BPG_BIN_DIR"
bpgenc 2>&1 | head -n 3 || true
else
echo "⚠️ BPG tools copied but not found in PATH"
fi
else
echo "⚠️ Failed to copy BPG tools to $BPG_BIN_DIR"
fi
else
echo "⚠️ BPG compilation failed - this is non-critical"
echo "πŸ” Build log (last 20 lines):"
cat make_output.log | tail -n 20 || echo "No build log available"
echo "πŸ“ BPG-dependent tests will be skipped"
fi
else
echo "⚠️ Failed to download BPG source - this is non-critical"
echo "πŸ“ BPG-dependent tests will be skipped"
fi
fi

# Final status check
if command -v bpgenc &> /dev/null && command -v bpgdec &> /dev/null; then
echo "πŸŽ‰ BPG tools are available for testing"
else
echo "ℹ️ BPG tools not available - BPG tests will be skipped"
fi
shell: bash
continue-on-error: true

- name: Install dependencies
run: |
echo "πŸ”§ Installing dependencies for CI build..."
Expand All @@ -69,7 +246,16 @@ jobs:
pip --version
pytest --version

echo "πŸ“Š Key installed packages:"
echo "οΏ½ Validating BPG tools..."
if command -v bpgenc &> /dev/null && command -v bpgdec &> /dev/null; then
echo "βœ… BPG tools available"
echo "bpgenc location: $(which bpgenc)"
echo "bpgdec location: $(which bpgdec)"
else
echo "❌ BPG tools not found in PATH"
fi

echo "οΏ½πŸ“Š Key installed packages:"
pip list | grep -E "(pytest|coverage|sphinx|numpy|scipy)" || true

- name: Test with pytest
Expand Down
Loading
Loading