Skip to content

Commit 9fbd2df

Browse files
authored
Merge pull request #22 from Arslan-Siraj/rescore
2 parents 77e0217 + aa5e066 commit 9fbd2df

24 files changed

+895882
-175
lines changed

.github/workflows/build-docker-images.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Docker Image CI
22

33
on:
4+
workflow_dispatch:
45
push:
56
branches: [ "main" ]
67
pull_request:

.github/workflows/build-windows-executable-app.yaml

Lines changed: 44 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -9,33 +9,31 @@ on:
99
workflow_dispatch:
1010

1111
env:
12-
OPENMS_VERSION: 3.2.0
12+
OPENMS_VERSION: 3.5.0
1313
# Define unique GUID for UpgradeCode
1414
APP_UpgradeCode: "31703de0-3422-444a-a469-8df83635bd6d"
1515
# Define needed TOPP tools here
1616
TOPP_TOOLS: "OpenNuXL"
1717

1818
jobs:
1919
build-openms:
20-
runs-on: windows-latest
20+
runs-on: windows-2022
2121

2222
steps:
2323
- name: Checkout
2424
uses: actions/checkout@v4
2525
with:
26-
repository: Arslan-Siraj/OpenMS #OpenMS/OpenMS
27-
ref: feature/NuXL #release/${{ env.OPENMS_VERSION }}
26+
repository: OpenMS/OpenMS
27+
ref: release/${{ env.OPENMS_VERSION }}
2828
path: 'OpenMS'
2929

30-
- name: Install Qt
30+
- name: Install Qt (Windows)
3131
uses: jurplel/install-qt-action@v4
3232
with:
33-
version: '6.2.*' # 5.12.7 is broken https://bugreports.qt.io/browse/QTBUG-81715, > 5.15.2 is not available on official archives (https://github.com/miurahr/aqtinstall/issues/636)
34-
host: 'windows' # default: win64_msvc2017_64
35-
target: 'desktop'
36-
install-deps: 'true'
33+
version: '6.8.3' ## Note this version is build with win64_msvc2022_64 and should always match what we use
34+
arch: 'win64_msvc2022_64'
3735
cache: 'false'
38-
aqtversion: '==3.1.*'
36+
archives: 'qtsvg qtimageformats qtbase'
3937

4038
# https://github.com/marketplace/actions/visual-studio-shell
4139
- name: Set up Visual Studio shell
@@ -46,7 +44,8 @@ jobs:
4644
- name: Setup build tools
4745
shell: bash
4846
run: |
49-
choco install ccache ninja cmake
47+
choco install ccache ninja -y --no-progress
48+
choco install cmake --version=3.31.1 -y --no-progress --force
5049
## GH CLI "SHOULD BE" installed. Sometimes I had to manually install nonetheless. Super weird.
5150
# https://github.com/actions/runner-images/blob/main/images/win/scripts/Installers/Install-GitHub-CLI.ps1
5251
echo "C:/Program Files (x86)/GitHub CLI" >> $GITHUB_PATH
@@ -82,6 +81,12 @@ jobs:
8281
rm contrib_build-Windows.tar.gz
8382
ls
8483
84+
- name: Add contrib to PATH
85+
shell: bash
86+
run: |
87+
# Add contrib library path for runtime DLL resolution
88+
echo "${{ github.workspace }}/OpenMS/contrib/lib" >> $GITHUB_PATH
89+
8590
- name: Setup ccache cache
8691
uses: actions/cache@v4
8792
with:
@@ -103,7 +108,7 @@ jobs:
103108
# add third-party binaries to PATH
104109
# use flat THIRDPARTY structure
105110
mkdir -p _thirdparty
106-
cp -R OpenMS/THIRDPARTY/Windows/64bit/* _thirdparty/
111+
cp -R OpenMS/THIRDPARTY/Windows/x86_64/* _thirdparty/
107112
cp -R OpenMS/THIRDPARTY/All/* _thirdparty/
108113
# add third-party binaries to PATH
109114
for thirdpartytool in ${{ github.workspace }}/_thirdparty/*
@@ -115,9 +120,9 @@ jobs:
115120
shell: bash
116121
run: |
117122
mkdir $GITHUB_WORKSPACE/OpenMS/bld/
123+
bash OpenMS/tools/ci/capture-env.sh -v $GITHUB_WORKSPACE/OpenMS/bld/CMakeCache.txt
118124
ctest --output-on-failure -V -S $GITHUB_WORKSPACE/OpenMS/tools/ci/cibuild.cmake
119125
env:
120-
#OS_PREFIX_PATH: "${{ env.Qt5_DIR }}/lib/cmake;${{ env.Qt5_DIR }}"
121126
OPENMS_CONTRIB_LIBS: "${{ github.workspace }}/OpenMS/contrib"
122127
CI_PROVIDER: "GitHub-Actions"
123128
CMAKE_GENERATOR: "Ninja"
@@ -127,6 +132,7 @@ jobs:
127132
ENABLE_TOPP_TESTING: "ON"
128133
ENABLE_CLASS_TESTING: "ON"
129134
WITH_GUI: "OFF"
135+
WITH_PARQUET: "OFF"
130136
ADDRESS_SANITIZER: "Off"
131137
BUILD_TYPE: "Release"
132138
OPENMP: "Off"
@@ -140,24 +146,24 @@ jobs:
140146
CCACHE_COMPRESSLEVEL: 12
141147
CCACHE_MAXSIZE: 400M
142148

143-
#- name: Test Windows
144-
# shell: bash
145-
# run: ctest --output-on-failure -V -S $GITHUB_WORKSPACE/OpenMS/tools/ci/citest.cmake
146-
# env:
147-
# SOURCE_DIRECTORY: "${{ github.workspace }}/OpenMS"
148-
# CI_PROVIDER: "GitHub-Actions"
149-
# BUILD_NAME: "${{ env.RUN_NAME }}-Win64-class-topp-${{ github.run_number }}"
149+
- name: Test Windows
150+
shell: bash
151+
run: ctest --output-on-failure -V -S $GITHUB_WORKSPACE/OpenMS/tools/ci/citest.cmake
152+
env:
153+
SOURCE_DIRECTORY: "${{ github.workspace }}/OpenMS"
154+
CI_PROVIDER: "GitHub-Actions"
155+
BUILD_NAME: "${{ env.RUN_NAME }}-Win64-class-topp-${{ github.run_number }}"
150156

151-
#- name: Package
152-
# shell: bash
153-
# run: |
154-
# ctest --output-on-failure -V -S $GITHUB_WORKSPACE/OpenMS/tools/ci/cipackage.cmake
155-
# env:
156-
# SOURCE_DIRECTORY: "${{ github.workspace }}/OpenMS"
157-
# PACKAGE_TYPE: zip
158-
# SEARCH_ENGINES_DIRECTORY: "${{ github.workspace }}/_thirdparty"
159-
# CI_PROVIDER: "GitHub-Actions"
160-
# CPACK_PACKAGE_FILE_NAME: "openms-package"
157+
- name: Package
158+
shell: bash
159+
run: |
160+
ctest --output-on-failure -V -S $GITHUB_WORKSPACE/OpenMS/tools/ci/cipackage.cmake
161+
env:
162+
SOURCE_DIRECTORY: "${{ github.workspace }}/OpenMS"
163+
PACKAGE_TYPE: zip
164+
SEARCH_ENGINES_DIRECTORY: "${{ github.workspace }}/_thirdparty"
165+
CI_PROVIDER: "GitHub-Actions"
166+
CPACK_PACKAGE_FILE_NAME: "openms-package"
161167

162168
- name: Upload package as artifact
163169
uses: actions/upload-artifact@v4
@@ -167,18 +173,19 @@ jobs:
167173
#${{ github.workspace }}/OpenMS/bld/bin/*
168174
#${{ github.workspace }}/_thirdparty/*
169175
${{ github.workspace }}/OpenMS/bld/bin/OpenNuXL.exe
176+
${{ github.workspace }}/OpenMS/bld/bin/FileConverter.exe
170177
${{ github.workspace }}/OpenMS/bld/bin/PercolatorAdapter.exe
171178
${{ github.workspace }}/OpenMS/bld/bin/*.dll
172179
${{ github.workspace }}/_thirdparty/*.exe
173180
${{ github.workspace }}/_thirdparty/ThermoRawFileParser/**
174181
${{ github.workspace }}/_thirdparty/Percolator/**
175182
176183
build-executable:
177-
runs-on: windows-latest
184+
runs-on: windows-2022
178185
needs: build-openms
179186

180187
env:
181-
PYTHON_VERSION: 3.11.0
188+
PYTHON_VERSION: 3.10.0
182189
APP_NAME: OpenMS-NuXLApp
183190

184191
steps:
@@ -191,9 +198,9 @@ jobs:
191198
name: openms-package
192199
path: openms-package
193200

194-
#- name: List files in openms-package
195-
# run: |
196-
# ls -R openms-package
201+
- name: List files in openms-package
202+
run: |
203+
ls -R openms-package
197204
198205
- name: Extract bin and share from package
199206
run: |
@@ -253,9 +260,9 @@ jobs:
253260
./python-${{ env.PYTHON_VERSION }}/python get-pip.py --no-warn-script-location
254261
rm get-pip.py
255262
256-
- name: Uncomment 'import site' in python311._pth file
263+
- name: Uncomment 'import site' in python310._pth file
257264
run: |
258-
sed -i 's/#import site/import site/' python-${{ env.PYTHON_VERSION }}/python311._pth
265+
sed -i 's/#import site/import site/' python-${{ env.PYTHON_VERSION }}/python310._pth
259266
260267
- name: Install Required Packages
261268
run: .\python-${{ env.PYTHON_VERSION }}\python -m pip install --force-reinstall -r requirements.txt --no-warn-script-location

.github/workflows/executable.yaml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
name: Executable
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build-executable:
8+
runs-on: windows-2022
9+
10+
env:
11+
OPENMS_VERSION: 3.5.0
12+
APP_UpgradeCode: "31703de0-3422-444a-a469-8df83635bd6d"
13+
TOPP_TOOLS: "OpenNuXL"
14+
PYTHON_VERSION: 3.10.0
15+
APP_NAME: OpenMS-NuXLApp
16+
17+
steps:
18+
- name: Set up Python (regular distribution)
19+
uses: actions/setup-python@v4
20+
with:
21+
python-version: ${{ env.PYTHON_VERSION }}
22+
23+
- name: Setup python embeddable version
24+
run: |
25+
mkdir python-${{ env.PYTHON_VERSION }}
26+
curl -O https://www.python.org/ftp/python/${{ env.PYTHON_VERSION }}/python-${{ env.PYTHON_VERSION }}-embed-amd64.zip
27+
unzip python-${{ env.PYTHON_VERSION }}-embed-amd64.zip -d python-${{ env.PYTHON_VERSION }}
28+
rm python-${{ env.PYTHON_VERSION }}-embed-amd64.zip
29+
30+
$PYTHON_DIR="${{ runner.tool_cache }}/Python/${{ env.PYTHON_VERSION }}/x64"
31+
$EMBED_DIR="python-${{ env.PYTHON_VERSION }}"
32+
33+
mkdir -p $EMBED_DIR/Lib/site-packages/tkinter
34+
mkdir -p $EMBED_DIR/tcl
35+
36+
cp -r $PYTHON_DIR/Lib/tkinter/* $EMBED_DIR/Lib/site-packages/tkinter/
37+
cp -r $PYTHON_DIR/tcl/* $EMBED_DIR/tcl/
38+
cp $PYTHON_DIR/DLLs/_tkinter.pyd $EMBED_DIR/
39+
cp $PYTHON_DIR/DLLs/tcl86t.dll $EMBED_DIR/
40+
cp $PYTHON_DIR/DLLs/tk86t.dll $EMBED_DIR/
41+
42+
- name: Install pip
43+
run: |
44+
curl -O https://bootstrap.pypa.io/get-pip.py
45+
./python-${{ env.PYTHON_VERSION }}/python get-pip.py --no-warn-script-location
46+
rm get-pip.py
47+
48+
- name: Uncomment 'import site' in python310._pth file
49+
run: |
50+
sed -i 's/#import site/import site/' python-${{ env.PYTHON_VERSION }}/python310._pth
51+
52+
- name: Install Required Packages
53+
run: .\python-${{ env.PYTHON_VERSION }}\python -m pip install --force-reinstall -r requirements.txt --no-warn-script-location
54+
55+
- name: Set to offline deployment
56+
run: |
57+
$content = Get-Content -Raw settings.json | ConvertFrom-Json
58+
$content.online_deployment = $false
59+
$content | ConvertTo-Json -Depth 100 | Set-Content settings.json
60+
61+
- name: Create .bat file
62+
run: |
63+
echo " start /min .\python-${{ env.PYTHON_VERSION }}\python -m streamlit run app.py local" > ${{ env.APP_NAME }}.bat
64+
65+
- name: Create All-in-one executable folder
66+
run: |
67+
if (Test-Path -Path "streamlit_exe") {
68+
Remove-Item -Recurse -Force "streamlit_exe"
69+
}
70+
mkdir streamlit_exe
71+
mv python-${{ env.PYTHON_VERSION }} streamlit_exe
72+
cp -r src streamlit_exe
73+
cp -r content streamlit_exe
74+
cp -r assets streamlit_exe
75+
cp -r example-data streamlit_exe
76+
cp -r .streamlit streamlit_exe
77+
cp app.py streamlit_exe
78+
cp settings.json streamlit_exe
79+
cp ${{ env.APP_NAME }}.bat streamlit_exe
80+
81+
- name: Generate Readme.txt
82+
shell: bash
83+
run: |
84+
cat <<EOF > streamlit_exe/Readme.txt
85+
Welcome to ${{ env.APP_NAME }} app!
86+
To launch the application:
87+
1. Navigate to the installation directory.
88+
2. Double-click on the file: ${{ env.APP_NAME }}.bat or ${{ env.APP_NAME }} shortcut.
89+
Additional Information:
90+
- If multiple Streamlit apps are running, you can change the port in the .streamlit/config.toml file.
91+
Example:
92+
[server]
93+
port = 8502
94+
Reach out to us:
95+
- Join our Discord server for support: https://discord.com/invite/4TAGhqJ7s5
96+
- GitHub: https://github.com/Arslan-Siraj/nuxl-app
97+
- Website: https://openms.de/
98+
Thanks for using ${{ env.APP_NAME }}!
99+
EOF
100+
101+
# ...rest of your steps (WiX install, .wxs generation, candle/light build, zip & upload)...

0 commit comments

Comments
 (0)