chore: bump version to 0.8.0 and finalize release notes #42
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Bio-Engine Consolidated Pipeline | |
| on: | |
| push: | |
| branches: [ master, main, develop, fix/windows-dll-issues ] | |
| tags: [ 'v*' ] | |
| workflow_dispatch: | |
| paths: | |
| - '**.py' | |
| - 'requirements.txt' | |
| - 'bio-engine.spec' | |
| - '.github/workflows/**' | |
| jobs: | |
| build-linux: | |
| name: Build Linux Binary | |
| runs-on: ubuntu-22.04 | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| cache: 'pip' | |
| - name: Install Dependencies | |
| shell: bash | |
| run: | | |
| python -m pip install --upgrade pip | |
| while IFS= read -r line || [ -n "$line" ]; do | |
| line=$(echo "$line" | sed 's/#.*//' | xargs) | |
| [ -z "$line" ] && continue | |
| [[ "$line" =~ ^[[:space:]] ]] && continue | |
| pip install "$line" || echo "WARNING: Failed to install $line (may be platform-specific)" | |
| done < requirements.txt | |
| pip install pyinstaller | |
| - name: Build with PyInstaller | |
| run: pyinstaller bio-engine.spec | |
| - name: Upload Binary | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: bio-engine-linux | |
| path: dist/bio-engine | |
| if-no-files-found: error | |
| build-windows: | |
| name: Build Windows Binary | |
| runs-on: windows-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| cache: 'pip' | |
| - name: Install Dependencies | |
| shell: bash | |
| run: | | |
| python -m pip install --upgrade pip | |
| while IFS= read -r line || [ -n "$line" ]; do | |
| line=$(echo "$line" | sed 's/#.*//' | xargs) | |
| [ -z "$line" ] && continue | |
| [[ "$line" =~ ^[[:space:]] ]] && continue | |
| pip install "$line" || echo "WARNING: Failed to install $line (may be platform-specific)" | |
| done < requirements.txt | |
| pip install pyinstaller | |
| - name: Build with PyInstaller | |
| run: pyinstaller bio-engine.spec | |
| - name: Upload Binary | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: bio-engine-windows | |
| path: dist/bio-engine.exe | |
| if-no-files-found: error | |
| test-linux: | |
| name: Verify Linux (pysam) | |
| needs: build-linux | |
| runs-on: ubuntu-latest | |
| continue-on-error: true | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| cache: 'pip' | |
| - name: Install Dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| pip install pytest pytest-cov | |
| - name: Run Tests with pytest and coverage | |
| run: | | |
| PYTHONPATH=. pytest | |
| - name: Generate Coverage Badge | |
| uses: tj-actions/coverage-badge-py@v2 | |
| with: | |
| output: coverage.svg | |
| - name: Verify Changed files | |
| uses: tj-actions/verify-changed-files@v20 | |
| id: verify-changed-files | |
| with: | |
| files: coverage.svg | |
| - name: Commit and push coverage badge | |
| if: steps.verify-changed-files.outputs.files_changed == 'true' | |
| run: | | |
| git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
| git config --local user.name "github-actions[bot]" | |
| git add coverage.svg | |
| git commit -m "chore: update coverage badge" | |
| git push | |
| test-windows: | |
| name: Verify Windows (Binaries) | |
| needs: build-windows | |
| runs-on: windows-latest | |
| continue-on-error: true | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| cache: 'pip' | |
| - name: Install Dependencies | |
| shell: bash | |
| run: | | |
| python -m pip install --upgrade pip | |
| while IFS= read -r line || [ -n "$line" ]; do | |
| line=$(echo "$line" | sed 's/#.*//' | xargs) | |
| [ -z "$line" ] && continue | |
| [[ "$line" =~ ^[[:space:]] ]] && continue | |
| pip install "$line" || echo "WARNING: Failed to install $line (may be platform-specific)" | |
| done < requirements.txt | |
| pip install h11 | |
| - name: Setup MSYS2 | |
| uses: msys2/setup-msys2@v2 | |
| with: | |
| msystem: MINGW64 | |
| update: true | |
| install: mingw-w64-x86_64-samtools mingw-w64-x86_64-htslib | |
| - name: Run Windows Binary Test | |
| shell: msys2 {0} | |
| env: | |
| BIO_BGZIP_PATH: bgzip | |
| BIO_SAMTOOLS_PATH: samtools | |
| TRACY_PATH: echo | |
| run: | | |
| export PATH="/c/hostedtoolcache/windows/Python/3.10.11/x64:$PATH" | |
| python --version | |
| python tests/test_windows_binaries.py | |
| - name: Prep Isolated environment (Diagnostic & Bundling) | |
| shell: msys2 {0} | |
| run: | | |
| mkdir -p isolated_test | |
| cp /mingw64/bin/bgzip.exe isolated_test/bgzip.exe | |
| cp /mingw64/bin/samtools.exe isolated_test/samtools.exe || true | |
| echo "### Diagnostic: Identifying dependencies for bgzip ###" | |
| ldd /mingw64/bin/bgzip.exe | |
| # Copy all DLLs mentioned by ldd that are in /mingw64/bin/ | |
| # This is a robust way to ensure we catch everything | |
| ldd /mingw64/bin/bgzip.exe | grep /mingw64/bin/ | awk '{print $3}' | xargs -I {} cp {} isolated_test/ | |
| echo "Contents of isolated_test:" | |
| ls -l isolated_test | |
| echo "Isolated environment prepped with dependencies" | |
| - name: Run Windows Isolated Test (to confirm fix) | |
| shell: pwsh | |
| env: | |
| BIO_BGZIP_PATH: isolated_test\bgzip.exe | |
| run: | | |
| python tests/test_isolated_bgzip.py | |
| release: | |
| name: Upload to Release | |
| needs: [test-linux, test-windows] | |
| if: startsWith(github.ref, 'refs/tags/') | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| - name: Download Linux Binary | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: bio-engine-linux | |
| path: linux-bin | |
| - name: Download Windows Binary | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: bio-engine-windows | |
| path: windows-bin | |
| - name: Prepare Binaries for Release | |
| run: | | |
| mv linux-bin/bio-engine bio-engine-x86_64-unknown-linux-gnu | |
| mv windows-bin/bio-engine.exe bio-engine-x86_64-pc-windows-msvc.exe | |
| ls -l | |
| - name: Upload to GitHub Release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| gh release create ${{ github.ref_name }} --generate-notes || true | |
| gh release upload ${{ github.ref_name }} \ | |
| bio-engine-x86_64-unknown-linux-gnu \ | |
| bio-engine-x86_64-pc-windows-msvc.exe \ | |
| --clobber |