Skip to content
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

Prepare for new release workflow #206

Merged
merged 36 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
2594077
rename folder on_click_macos_gui -> macos
mschwoer Aug 22, 2024
122d1a7
add new install scripts
mschwoer Aug 22, 2024
12c0cd5
make new install scripts executable
mschwoer Aug 22, 2024
696950d
complete folder renaming and add to bumpversion
mschwoer Aug 22, 2024
1792bf7
bring windows release to new form
mschwoer Aug 22, 2024
17b71fd
change windows release artifact name
mschwoer Aug 22, 2024
ba16fde
fix install paths
mschwoer Aug 22, 2024
a4993be
add linux to new release pipeline
mschwoer Aug 22, 2024
0eeb889
fixes
mschwoer Aug 22, 2024
6565e28
fixes
mschwoer Aug 22, 2024
8711810
fixes
mschwoer Aug 22, 2024
7b84aad
fix linux
mschwoer Aug 22, 2024
ce90d40
fix windows
mschwoer Aug 22, 2024
0c7636b
fix windows
mschwoer Aug 22, 2024
2a34a9a
fix macos
mschwoer Aug 22, 2024
f8109e5
fix windows
mschwoer Aug 23, 2024
f9fe85a
fix windows
mschwoer Aug 23, 2024
ab5f73f
fix windows
mschwoer Aug 23, 2024
ae87a95
fix windows
mschwoer Aug 23, 2024
211e44e
clean up
mschwoer Aug 23, 2024
6186969
rename & add comments
mschwoer Aug 26, 2024
3febb87
rename & add comments
mschwoer Aug 26, 2024
10f9078
remove architecture
mschwoer Aug 26, 2024
d9c345d
add BUILD_NAME
mschwoer Aug 27, 2024
a7240fe
fix BUILD_NAME
mschwoer Aug 27, 2024
578c5b0
debug windows installer
mschwoer Aug 27, 2024
85a8d6c
remove debug windows installer
mschwoer Aug 27, 2024
c3d96c0
remove debug windows installer
mschwoer Aug 27, 2024
dc0acfc
final fixes
mschwoer Aug 27, 2024
99fe779
comments and update Readme instructions
mschwoer Aug 27, 2024
42efbc1
fix bumpversion script
mschwoer Aug 27, 2024
eab3c18
fix bumpversion script
mschwoer Aug 27, 2024
9d1a33d
add exit on error to install scripts
mschwoer Sep 2, 2024
74a12aa
fix unbound variable
mschwoer Sep 2, 2024
0ed474b
fix installers
mschwoer Sep 2, 2024
78f5d95
resolve windows path issue
mschwoer Sep 2, 2024
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
27 changes: 20 additions & 7 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,31 @@ serialize =

[bumpversion:file:./docs/conf.py]

[bumpversion:file:./release/one_click_linux_gui/control]
[bumpversion:file:./README.md]

[bumpversion:file:./release/one_click_linux_gui/create_installer_linux.sh]
[bumpversion:file:./release/linux/control]

[bumpversion:file:./release/one_click_macos_gui/distribution.xml]
[bumpversion:file:./release/linux/build_installer_linux.sh]

[bumpversion:file:./release/one_click_macos_gui/Info.plist]
[bumpversion:file:./release/linux/build_package_linux.sh]

[bumpversion:file:./release/one_click_macos_gui/create_installer_macos.sh]
[bumpversion:file:./release/linux/create_installer_linux.sh] # TODO remove with old release workflow

[bumpversion:file:./release/one_click_windows_gui/create_installer_windows.sh]
[bumpversion:file:./release/macos/distribution.xml]

[bumpversion:file:./release/macos/Info.plist]

[bumpversion:file:./release/macos/create_installer_macos.sh] # TODO remove with old release workflow

[bumpversion:file:./release/macos/build_installer_macos.sh]

[bumpversion:file:./release/macos/build_package_macos.sh]

[bumpversion:file:./release/windows/create_installer_windows.sh] # TODO remove with old release workflow

[bumpversion:file:./release/windows/build_installer_windows.ps1]

[bumpversion:file:./release/windows/peptdeep_innoinstaller.iss]

[bumpversion:file:./release/one_click_windows_gui/peptdeep_innoinstaller.iss]
search = {current_version}
replace = {new_version}
26 changes: 15 additions & 11 deletions .github/workflows/publish_and_release.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# TODO remove with old release workflow
on:
# push:
# branches: [ main ]
Expand Down Expand Up @@ -57,20 +58,20 @@ jobs:
- name: Creating installer for Linux
shell: bash -l {0}
run: |
cd release/one_click_linux_gui
cd release/linux
. ./create_installer_linux.sh CPU
- name: Test installer for Linux
shell: bash -l {0}
run: |
sudo dpkg -i release/one_click_linux_gui/dist/peptdeep_gui_installer_linux.deb
sudo dpkg -i release/linux/dist/peptdeep_gui_installer_linux.deb
- name: Upload Linux Installer
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.Create_Draft_On_GitHub.outputs.upload_url }}
asset_path: release/one_click_linux_gui/dist/peptdeep_gui_installer_linux.deb
asset_path: release/linux/dist/peptdeep_gui_installer_linux.deb
asset_name: peptdeep_gui_installer_linux.deb
asset_content_type: application/octet-stream
Create_MacOS_Release:
Expand All @@ -89,25 +90,27 @@ jobs:
- name: Creating installer for MacOS
shell: bash -l {0}
run: |
cd release/one_click_macos_gui
cd release/macos
. ./create_installer_macos.sh
- name: Test installer for MacOS
shell: bash -l {0}
run: |
sudo installer -pkg release/one_click_macos_gui/dist/peptdeep_gui_installer_macos.pkg -target /
sudo installer -pkg release/macos/dist/peptdeep_gui_installer_macos.pkg -target /
- name: Upload MacOS Installer
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.Create_Draft_On_GitHub.outputs.upload_url }}
asset_path: release/one_click_macos_gui/dist/peptdeep_gui_installer_macos.pkg
asset_path: release/macos/dist/peptdeep_gui_installer_macos.pkg
asset_name: peptdeep_gui_installer_macos.pkg
asset_content_type: application/octet-stream
Create_Windows_Release:
runs-on: windows-latest
needs: Create_Draft_On_GitHub
env:
BUILD_NAME: peptdeep-1.2.1-win-x64
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand All @@ -121,14 +124,14 @@ jobs:
- name: Creating installer for Windows
shell: bash -l {0}
run: |
cd release/one_click_windows_gui
cd release/windows
. ./create_installer_windows.sh
- name: Test installer for Windows
shell: bash -l {0}
run: |
cd release/one_click_windows_gui/dist/
cd release/windows/dist/
echo "TODO, this test seems to freeze the runner..."
# ./peptdeep_gui_installer_windows.exe //verysilent //log=log.txt //noicons //tasks= //portable=1
# ./peptdeep-${{ needs.Version_Bumped.outputs.version }}-win-x64.exe //verysilent //log=log.txt //noicons //tasks= //portable=1
# cat log.txt
- name: Upload Windows Installer
id: upload-release-asset
Expand All @@ -137,9 +140,10 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.Create_Draft_On_GitHub.outputs.upload_url }}
asset_path: release/one_click_windows_gui/dist/peptdeep_gui_installer_windows.exe
asset_name: peptdeep_gui_installer_windows.exe
asset_path: release/windows/dist/peptdeep-${{ needs.Version_Bumped.outputs.version }}-win-x64.exe
asset_name: peptdeep-${{ needs.Version_Bumped.outputs.version }}-win-x64.exe
asset_content_type: application/octet-stream

Create_PyPi_Release:
runs-on: ubuntu-latest
needs: Version_Bumped
Expand Down
31 changes: 17 additions & 14 deletions .github/workflows/release_installers.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# TODO remove with old release workflow
on:
workflow_dispatch:

Expand Down Expand Up @@ -54,20 +55,20 @@ jobs:
- name: Creating installer for Linux
shell: bash -l {0}
run: |
cd release/one_click_linux_gui
cd release/linux
. ./create_installer_linux.sh CPU
- name: Test installer for Linux
shell: bash -l {0}
run: |
sudo dpkg -i release/one_click_linux_gui/dist/peptdeep_gui_installer_linux.deb
sudo dpkg -i release/linux/dist/peptdeep_gui_installer_linux.deb
- name: Upload Linux Installer
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.Create_Draft_On_GitHub.outputs.upload_url }}
asset_path: release/one_click_linux_gui/dist/peptdeep_gui_installer_linux.deb
asset_path: release/linux/dist/peptdeep_gui_installer_linux.deb
asset_name: peptdeep_gui_installer_linux.deb
asset_content_type: application/octet-stream
Create_MacOS_Release:
Expand All @@ -86,20 +87,20 @@ jobs:
- name: Creating installer for MacOS
shell: bash -l {0}
run: |
cd release/one_click_macos_gui
cd release/macos
. ./create_installer_macos.sh
- name: Test installer for MacOS
shell: bash -l {0}
run: |
sudo installer -pkg release/one_click_macos_gui/dist/peptdeep_gui_installer_macos.pkg -target /
sudo installer -pkg release/macos/dist/peptdeep_gui_installer_macos.pkg -target /
- name: Upload MacOS Installer
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.Create_Draft_On_GitHub.outputs.upload_url }}
asset_path: release/one_click_macos_gui/dist/peptdeep_gui_installer_macos.pkg
asset_path: release/macos/dist/peptdeep_gui_installer_macos.pkg
asset_name: peptdeep_gui_installer_macos.pkg
asset_content_type: application/octet-stream
Create_MacOS_Arm_Release:
Expand All @@ -118,25 +119,27 @@ jobs:
- name: Creating installer for MacOS
shell: bash -l {0}
run: |
cd release/one_click_macos_gui
cd release/macos
. ./create_installer_macos.sh
- name: Test installer for MacOS
shell: bash -l {0}
run: |
sudo installer -pkg release/one_click_macos_gui/dist/peptdeep_gui_installer_macos.pkg -target /
sudo installer -pkg release/macos/dist/peptdeep_gui_installer_macos.pkg -target /
- name: Upload MacOS Installer
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.Create_Draft_On_GitHub.outputs.upload_url }}
asset_path: release/one_click_macos_gui/dist/peptdeep_gui_installer_macos.pkg
asset_path: release/macos/dist/peptdeep_gui_installer_macos.pkg
asset_name: peptdeep_gui_installer_macos_arm.pkg
asset_content_type: application/octet-stream
Create_Windows_Release:
runs-on: windows-latest
needs: Create_Draft_On_GitHub
env:
BUILD_NAME: peptdeep-1.2.1-win-x64
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand All @@ -150,14 +153,14 @@ jobs:
- name: Creating installer for Windows
shell: bash -l {0}
run: |
cd release/one_click_windows_gui
cd release/windows
. ./create_installer_windows.sh
- name: Test installer for Windows
shell: bash -l {0}
run: |
cd release/one_click_windows_gui/dist/
cd release/windows/dist/
echo "TODO, this test seems to freeze the runner..."
# ./peptdeep_gui_installer_windows.exe //verysilent //log=log.txt //noicons //tasks= //portable=1
# ./peptdeep-1.2.1-win-x64.exe //verysilent //log=log.txt //noicons //tasks= //portable=1
# cat log.txt
- name: Upload Windows Installer
id: upload-release-asset
Expand All @@ -166,6 +169,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.Create_Draft_On_GitHub.outputs.upload_url }}
asset_path: release/one_click_windows_gui/dist/peptdeep_gui_installer_windows.exe
asset_name: peptdeep_gui_installer_windows.exe
asset_path: release/windows/dist/peptdeep-${{ needs.Version_Bumped.outputs.version }}-win-x64.exe
asset_name: peptdeep-${{ needs.Version_Bumped.outputs.version }}-win-x64.exe
asset_content_type: application/octet-stream
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ share/python-wheels/
.installed.cfg
*.egg
MANIFEST
dist_pyinstaller/
build_pyinstaller/

# PyInstaller
# Usually these files are written by a python script from a template
Expand Down
29 changes: 22 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,19 +112,23 @@ The GUI of peptdeep is a completely stand-alone tool that requires no
knowledge of Python or CLI tools. Click on one of the links below to
download the latest release for:

- [**Windows**](https://github.com/MannLabs/alphapeptdeep/releases/latest/download/peptdeep_gui_installer_windows.exe)
- [**macOS**](https://github.com/MannLabs/alphapeptdeep/releases/latest/download/peptdeep_gui_installer_macos.pkg)
- [**Linux**](https://github.com/MannLabs/alphapeptdeep/releases/latest/download/peptdeep_gui_installer_linux.deb)
- [**Windows**](https://github.com/MannLabs/alphapeptdeep/releases/latest/download/peptdeep-1.2.1-windows-amd64.exe)
- [**macOS**](https://github.com/MannLabs/alphapeptdeep/releases/latest/download/peptdeep-1.2.1-macos-darwin-x64.pkg)
- [**macOS ARM**](https://github.com/MannLabs/alphapeptdeep/releases/latest/download/peptdeep-1.2.1-macos-darwin-arm64.pkg )
- [**Linux**](https://github.com/MannLabs/alphapeptdeep/releases/latest/download/peptdeep-1.2.1-linux-x64.deb)

Older releases remain available on the [release
page](https://github.com/MannLabs/alphapeptdeep/releases), but no
backwards compatibility is guaranteed.

Note that, as GitHub does not allow large release files, these installers do not have GPU support. To create GPU version installers, clone the source code and install GPU-version pytorch (#use-gpu), and then use `release/one_click_xxx_gui/create_installer_xxx.sh` to build installer locally. For example in Windows, run

Note that, as GitHub does not allow large release files, these installers do not have GPU support.
To create GPU version installers: clone the source code, install the GPU-version of pytorch [see here](#use-gpu),
and then use the `build_installer_*.sh` and `build_package_*.sh`
script in the respective `release/[macos, linux, windows]` folder to build the installer locally.
For Linux you need to additionally pass the "GPU" flag, i.e. run
```bash
cd release/one_click_windows_gui
. ./create_installer_windows.sh
release/linux/build_installer_linux.sh GPU
release/linux/build_package_linux.sh
```

### Pip
Expand Down Expand Up @@ -945,6 +949,17 @@ branch. For an even more interactive participation, check out the
the [Contributors License Agreement](misc/CLA.md).

### Notes for developers

#### Tagging of changes
In order to have release notes automatically generated, changes need to be tagged with labels.
The following labels are used (should be safe-explanatory):
`breaking-change`, `bug`, `enhancement`.

#### Release a new version
This package uses a shared release process defined in the
[alphashared](https://github.com/MannLabs/alphashared) repository. Please see the instructions
[there](https://github.com/MannLabs/alphashared/blob/reusable-release-workflow/.github/workflows/README.md#release-a-new-version).

#### pre-commit hooks
It is highly recommended to use the provided pre-commit hooks, as the CI pipeline enforces all checks therein to
pass in order to merge a branch.
Expand Down
24 changes: 24 additions & 0 deletions release/linux/build_installer_linux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash
set -e -u

# Build the installer for Linux.
# This script must be run from the root of the repository.

CPU_OR_GPU=${1:-CPU}

rm -rf dist build *.egg-info
rm -rf dist_pyinstaller build_pyinstaller

# Creating the wheel
python setup.py sdist bdist_wheel

# Setting up the local package
# Make sure you include the required extra packages and always use the stable or very-stable options!
pip install "dist/peptdeep-1.2.1-py3-none-any.whl[stable]"

if [ "${CPU_OR_GPU}" != "GPU" ]; then
pip install torch -U --extra-index-url https://download.pytorch.org/whl/cpu
fi

# Creating the stand-alone pyinstaller folder
pyinstaller release/pyinstaller/peptdeep.spec --distpath dist_pyinstaller --workpath build_pyinstaller -y
24 changes: 24 additions & 0 deletions release/linux/build_package_linux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash
set -e -u

# Build the install package for Linux.
# This script must be run from the root of the repository after running build_installer_linux.sh

PACKAGE_NAME=peptdeep

# BUILD_NAME is taken from environment variables, e.g. 'peptdeep-1.2.1-linux-x64'
rm -rf ${BUILD_NAME}.deb

# If needed, include additional source such as e.g.:
# cp ../../peptdeep/data/*.fasta dist/peptdeep/data
# WARNING: this probably does not work!!!!

# Wrapping the pyinstaller folder in a .deb package
mkdir -p dist_pyinstaller/${BUILD_NAME}/usr/local/bin
mv dist_pyinstaller/${PACKAGE_NAME} dist_pyinstaller/${BUILD_NAME}/usr/local/bin/${PACKAGE_NAME}
mkdir dist_pyinstaller/${BUILD_NAME}/DEBIAN
cp release/linux/control dist_pyinstaller/${BUILD_NAME}/DEBIAN
dpkg-deb --build --root-owner-group dist_pyinstaller/${BUILD_NAME}

# release workflow expects artifact at root of repository
mv dist_pyinstaller/${BUILD_NAME}.deb .
File renamed without changes.
4 changes: 2 additions & 2 deletions ...click_linux_gui/create_installer_linux.sh → release/linux/create_installer_linux.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!bash

# TODO remove with old release workflow
# Initial cleanup
rm -rf dist
rm -rf build
Expand All @@ -15,7 +15,7 @@ conda activate peptdeep_installer
python setup.py sdist bdist_wheel

# Setting up the local package
cd release/one_click_linux_gui
cd release/linux
# Make sure you include the required extra packages and always use the stable or very-stable options!
pip install "../../dist/peptdeep-1.2.1-py3-none-any.whl[stable]"

Expand Down
File renamed without changes.
15 changes: 15 additions & 0 deletions release/macos/build_installer_macos.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash
set -e -u

# Build the installer for MacOS.
# This script must be run from the root of the repository.

rm -rf dist
rm -rf build

# Creating the wheel
python setup.py sdist bdist_wheel
pip install "dist/peptdeep-1.2.1-py3-none-any.whl[stable]"

# Creating the stand-alone pyinstaller folder
pyinstaller release/pyinstaller/peptdeep.spec --distpath dist_pyinstaller --workpath build_pyinstaller -y
Loading
Loading