diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 64991b7..430f04a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,7 +8,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [windows-2019] + os: [windows-2019, ubuntu-20.04, macos-10.15] steps: - uses: actions/checkout@v3 @@ -22,17 +22,14 @@ jobs: run: | pip install -r requirements.txt - - name: Fix Python Compiler + - name: Build Windows Exe + if: runner.os == 'Windows' run: | $pydir = python -c "import sys;print(sys.exec_prefix)" gendef $pydir\vcruntime140.dll dlltool -D $pydir\vcruntime140.dll -d vcruntime140.def -l $pydir\libs\libvcruntime140.a pip install pywin32 python ci\fix_compiler_error.py - - - name: Build Windows Exe - if: runner.os == 'Windows' - run: | cd src\libs\src python setup.py build_ext --inplace -c mingw32 mv *.pyd .. @@ -42,8 +39,49 @@ jobs: iscc win.iss cd .. + - name: Build Linux Exe + if: runner.os == 'Linux' + run: | + cd src/libs/src + python setup.py build_ext --inplace + mv *.so .. + cd ../../.. + version=`awk '/^VERSION/{print $NF}' src/config.py | sed 's/\"//g'` + pyinstaller linux.spec + cd dist + tar -czvf Krait-v${version}-linux.tar.gz Krait + chmod a+x ../build_rpmdeb.sh + ../build_rpmdeb.sh ${version} + + - name: Build MacOS Exe + if: runner.os == 'macOS' + run: | + cd src/libs/src + python setup.py build_ext --inplace + mv *.so .. + cd ../../.. + version=`awk '/^VERSION/{print $NF}' src/config.py | sed 's/\"//g'` + pyinstaller mac.spec + cd dist + npm install --global create-dmg + create-dmg Krait.app + mv "Krait 0.0.0.dmg" Krait-v${version}-macos.dmg + - name: Upload Installer uses: actions/upload-artifact@v3 with: - name: Krait-win64 - path: setup/*.exe + name: Krait + path: | + setup/*.exe + dist/*.dmg + dist/*.deb + dist/*.tar.gz + + - uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + files: | + setup/*.exe + dist/*.dmg + dist/*.deb + dist/*.tar.gz diff --git a/README.md b/README.md index 0706905..2ab65a9 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@

- - + @@ -40,7 +39,7 @@ Krait is a robust and ultrafast tool with a user-friendly graphic interface for [https://github.com/lmdu/krait/releases](https://github.com/lmdu/krait/releases) # Documentation -[http://krait.biosv.com/en/latest//](http://krait.biosv.com/en/latest/) +[http://krait.biosv.com/en/latest//](http://krait.biosv.com/en/latest) # Citation Du L, Zhang C, Liu Q, Zhang X, Yue B (2018) Krait: an ultrafast tool for genome-wide survey of microsatellites and primer design. Bioinformatics. 34(4):681-683. [10.1093/bioinformatics/btx665](https://doi.org/10.1093/bioinformatics/btx665)