Skip to content
name: Compile and publish MSYS2 Dependencies
on:
release:
branches: [ "main" ]
types: [ published ]
permissions:
contents: read
jobs:
# Builds on MSYS2 and upload a wheels artifact to be
# released on PyPI
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
update: false
install: >-
git
autotools
gcc
zlib-devel
libbz2-devel
liblzma-devel
ncurses-devel
python
python-pip
mingw-w64-ucrt-x86_64-tools-git
- name: Clone repositories
shell: msys2 {0}
run: |
python -m pip install requests
python make_clone_script.py $GITHUB_REF > clone_script.sh
chmod +x clone_script.sh
./clone_script.sh
- name: Compile htslib
shell: msys2 {0}
run: |
export PATH=$PATH:/mingw64/bin
pushd .
cd htslib
autoreconf -i
./configure
make -j32
popd
- name: Compile samtools
shell: msys2 {0}
run: |
export PATH=$PATH:/mingw64/bin
pushd .
cd samtools
autoheader
autoconf -Wno-syntax
./configure
make -j32
popd
- name: Compile bcftools
shell: msys2 {0}
run: |
export PATH=$PATH:/mingw64/bin
pushd .
cd bcftools
autoheader
autoconf -Wno-syntax
./configure
make -j32
popd
- name: Compile bwa
shell: msys2 {0}
run: |
export PATH=$PATH:/mingw64/bin
pushd .
cd bwa
make -j32
popd
- name: Compile minimap2
shell: msys2 {0}
run: |
export PATH=$PATH:/mingw64/bin
pushd .
cd minimap2
make -j32
- name: Scan imports
shell: msys2 {0}
run: |
python -m pip install pefile
python import_scanner.py
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- uses: actions/upload-artifact@v4
with:
name: wheels
path: dist/
retention-days: 1
# Publish Job
pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
needs: build
environment:
name: pypi
url: https://pypi.org/p/doublehelix-external
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
name: wheels
path: ./dist/
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1