Skip to content

Update #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 26 additions & 14 deletions .github/workflows/compile-and-publish.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
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:
Expand All @@ -19,8 +14,8 @@ jobs:
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
update: false
msystem: ucrt64
update: true
install: >-
git
autotools
Expand All @@ -32,6 +27,19 @@ jobs:
python
python-pip
mingw-w64-ucrt-x86_64-tools-git
mingw-w64-ucrt-x86_64-toolchain
mingw-w64-ucrt-x86_64-curl
mingw-w64-ucrt-x86_64-libdeflate
mingw-w64-ucrt-x86_64-bzip2
mingw-w64-ucrt-x86_64-zlib
mingw-w64-ucrt-x86_64-xz
mingw-w64-ucrt-x86_64-openssl
mingw-w64-ucrt-x86_64-libtre-git
mingw-w64-ucrt-x86_64-libiconv
mingw-w64-ucrt-x86_64-libsystre
mingw-w64-ucrt-x86_64-libwinpthread
mingw-w64-ucrt-x86_64-ncurses
mingw-w64-ucrt-x86_64-autotools
- name: Clone repositories
shell: msys2 {0}
run: |
Expand All @@ -42,7 +50,7 @@ jobs:
- name: Compile htslib
shell: msys2 {0}
run: |
export PATH=$PATH:/mingw64/bin
export PATH=$PATH:/ucrt64/bin
pushd .
cd htslib
autoreconf -i
Expand All @@ -52,7 +60,7 @@ jobs:
- name: Compile samtools
shell: msys2 {0}
run: |
export PATH=$PATH:/mingw64/bin
export PATH=$PATH:/ucrt64/bin
pushd .
cd samtools
autoheader
Expand All @@ -63,7 +71,7 @@ jobs:
- name: Compile bcftools
shell: msys2 {0}
run: |
export PATH=$PATH:/mingw64/bin
export PATH=$PATH:/ucrt64/bin
pushd .
cd bcftools
autoheader
Expand All @@ -74,18 +82,23 @@ jobs:
- name: Compile bwa
shell: msys2 {0}
run: |
export PATH=$PATH:/mingw64/bin
# Temporarily switch to MSYS for bwa compilation
export MSYSTEM=MSYS
export PATH=/usr/bin:$PATH
pushd .
cd bwa
make -j32
popd
- name: Compile minimap2
shell: msys2 {0}
run: |
export PATH=$PATH:/mingw64/bin
# Switch back to UCRT64 for minimap2
export MSYSTEM=UCRT64
export PATH=$PATH:/ucrt64/bin
pushd .
cd minimap2
make -j32
popd
- name: Scan imports
shell: msys2 {0}
run: |
Expand All @@ -107,7 +120,6 @@ jobs:
path: dist/
retention-days: 1

# Publish Job
pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
Expand All @@ -123,4 +135,4 @@ jobs:
name: wheels
path: ./dist/
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
uses: pypa/gh-action-pypi-publish@release/v1
106 changes: 106 additions & 0 deletions .github/workflows/testbuild.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: Compile and publish MSYS2 Dependencies
on:
release:
branches: [ "main" ]
types: [ published ]
permissions:
contents: read
jobs:
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: true
install: >-
git
autotools
gcc
zlib-devel
libbz2-devel
liblzma-devel
ncurses-devel
python
python-pip
mingw-w64-ucrt-x86_64-tools-git
mingw-w64-ucrt-x86_64-toolchain
mingw-w64-ucrt-x86_64-curl
mingw-w64-ucrt-x86_64-libdeflate
mingw-w64-ucrt-x86_64-bzip2
mingw-w64-ucrt-x86_64-zlib
mingw-w64-ucrt-x86_64-xz
mingw-w64-ucrt-x86_64-openssl
mingw-w64-ucrt-x86_64-libtre-git
mingw-w64-ucrt-x86_64-libiconv
mingw-w64-ucrt-x86_64-libsystre
mingw-w64-ucrt-x86_64-libwinpthread
mingw-w64-ucrt-x86_64-ncurses
mingw-w64-ucrt-x86_64-autotools
- 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:/ucrt64/bin
pushd .
cd htslib
autoreconf -i
./configure
make -j32
popd
- name: Compile samtools
shell: msys2 {0}
run: |
export PATH=$PATH:/ucrt64/bin
pushd .
cd samtools
autoheader
autoconf -Wno-syntax
./configure
make -j32
popd
- name: Compile bcftools
shell: msys2 {0}
run: |
export PATH=$PATH:/ucrt64/bin
pushd .
cd bcftools
autoheader
autoconf -Wno-syntax
./configure
make -j32
popd
- name: Compile bwa
shell: msys2 {0}
run: |
# Temporarily switch to MSYS for bwa compilation
export MSYSTEM=MSYS
export PATH=/usr/bin:$PATH
pushd .
cd bwa
make -j32
popd
- name: Compile minimap2
shell: msys2 {0}
run: |
# Switch back to UCRT64 for minimap2
export MSYSTEM=UCRT64
export PATH=$PATH:/ucrt64/bin
pushd .
cd minimap2
make -j32
popd
- name: Scan imports
shell: msys2 {0}
run: |
python -m pip install pefile
python import_scanner.py
2 changes: 1 addition & 1 deletion make_clone_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def print_clone_script(tag:str):
"htslib": "git clone --depth 1 --recurse-submodules --branch {version} https://github.com/samtools/htslib",
"samtools": "git clone --depth 1 --recurse-submodules --branch {version} https://github.com/samtools/samtools",
"bcftools": "git clone --depth 1 --recurse-submodules --branch {version} https://github.com/samtools/bcftools",
"bwa": "git clone --depth 1 --recurse-submodules --branch {version} https://github.com/lh3/bwa",
"bwa": "git clone --depth 1 --recurse-submodules --branch cygwin https://github.com/WGSExtract/bwa/tree/cygwin",
"minimap2": "git clone --depth 1 --recurse-submodules --branch {version} https://github.com/lh3/minimap2",
}

Expand Down