Update compile-and-publish.yml #5
This file contains 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: Compile MSYS2 Dependencies | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
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: false | |
install: >- | |
git | |
autotools | |
gcc | |
zlib-devel | |
libbz2-devel | |
liblzma-devel | |
mingw-w64-x86_64-tools-git | |
ncurses-devel | |
- name: Clone repositories | |
shell: msys2 {0} | |
run: | | |
git clone --depth 1 --recurse-submodules --branch 1.20 https://github.com/samtools/htslib | |
git clone --depth 1 --recurse-submodules --branch 1.20 https://github.com/samtools/samtools | |
git clone --depth 1 --recurse-submodules --branch 1.20 https://github.com/samtools/bcftools | |
git clone --depth 1 --recurse-submodules --branch v0.7.18 https://github.com/lh3/bwa | |
git clone --depth 1 --recurse-submodules --branch v2.28 https://github.com/lh3/minimap2 | |
- 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: 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 pefile | |
pip install build | |
- name: Scan imports | |
run: | | |
python -m pip install pefile | |
python import_scanner.py | |
- name: Build package | |
run: python -m build | |
#- uses: actions/upload-artifact@v4 | |
# with: | |
# name: third_party | |
# path: wgse/third_party/ | |
# retention-days: 1 | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: wheels | |
path: dist/ | |
retention-days: 1 | |
pypi-publish: | |
name: Upload release to PyPI | |
runs-on: ubuntu-latest | |
needs: build | |
environment: | |
name: pypi | |
url: https://pypi.org/p/WGSE-NG-3rd-party | |
permissions: | |
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
name: wheels | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |