Skip to content

Commit b3615d7

Browse files
authored
Enhance build workflow with Python and TOPP tools
Updated the workflow to include Python version and additional TOPP tools. Modified paths and commands for building and packaging the executable.
1 parent 37b0ad1 commit b3615d7

File tree

1 file changed

+28
-58
lines changed

1 file changed

+28
-58
lines changed

.github/workflows/build_executable_without_Wix.yaml

Lines changed: 28 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ on:
99
workflow_dispatch:
1010

1111
env:
12-
OPENMS_VERSION: 3.5.0
12+
OPENMS_VERSION: 3.5.0
13+
PYTHON_VERSION: 3.10.0
1314
# Define needed TOPP tools here
14-
TOPP_TOOLS: "OpenNuXL"
15+
TOPP_TOOLS: "OpenNuXL FileConverter PercolatorAdapter"
1516

1617
jobs:
1718
build-openms:
@@ -47,7 +48,6 @@ jobs:
4748
## GH CLI "SHOULD BE" installed. Sometimes I had to manually install nonetheless. Super weird.
4849
# https://github.com/actions/runner-images/blob/main/images/win/scripts/Installers/Install-GitHub-CLI.ps1
4950
echo "C:/Program Files (x86)/GitHub CLI" >> $GITHUB_PATH
50-
5151
- name: Extract branch/PR infos
5252
shell: bash
5353
run: |
@@ -78,13 +78,11 @@ jobs:
7878
7z x -so contrib_build-Windows.tar.gz | 7z x -si -ttar
7979
rm contrib_build-Windows.tar.gz
8080
ls
81-
8281
- name: Add contrib to PATH
8382
shell: bash
8483
run: |
8584
# Add contrib library path for runtime DLL resolution
8685
echo "${{ github.workspace }}/OpenMS/contrib/lib" >> $GITHUB_PATH
87-
8886
- name: Setup ccache cache
8987
uses: actions/cache@v4
9088
with:
@@ -95,7 +93,6 @@ jobs:
9593
${{ runner.os }}-ccache-${{ env.RUN_NAME }}
9694
${{ runner.os }}-ccache-${{ env.BASE_REF }}
9795
${{ runner.os }}-ccache-
98-
9996
- name: Add THIRDPARTY
10097
shell: bash
10198
run: |
@@ -113,7 +110,6 @@ jobs:
113110
do
114111
echo $thirdpartytool >> $GITHUB_PATH
115112
done
116-
117113
- name: Build Windows
118114
shell: bash
119115
run: |
@@ -168,15 +164,16 @@ jobs:
168164
with:
169165
name: openms-package
170166
path: |
167+
${{ github.workspace }}/OpenMS/bld/*.zip
171168
#${{ github.workspace }}/OpenMS/bld/bin/*
172169
#${{ github.workspace }}/_thirdparty/*
173-
${{ github.workspace }}/OpenMS/bld/bin/OpenNuXL.exe
174-
${{ github.workspace }}/OpenMS/bld/bin/FileConverter.exe
175-
${{ github.workspace }}/OpenMS/bld/bin/PercolatorAdapter.exe
176-
${{ github.workspace }}/OpenMS/bld/bin/*.dll
177-
${{ github.workspace }}/_thirdparty/*.exe
178-
${{ github.workspace }}/_thirdparty/ThermoRawFileParser/**
179-
${{ github.workspace }}/_thirdparty/Percolator/**
170+
#${{ github.workspace }}/OpenMS/bld/bin/OpenNuXL.exe
171+
#${{ github.workspace }}/OpenMS/bld/bin/FileConverter.exe
172+
#${{ github.workspace }}/OpenMS/bld/bin/PercolatorAdapter.exe
173+
#${{ github.workspace }}/OpenMS/bld/bin/*.dll
174+
#${{ github.workspace }}/_thirdparty/*.exe
175+
#${{ github.workspace }}/_thirdparty/ThermoRawFileParser/**
176+
#${{ github.workspace }}/_thirdparty/Percolator/**
180177
181178
build-executable:
182179
runs-on: windows-2022
@@ -195,41 +192,19 @@ jobs:
195192
with:
196193
name: openms-package
197194
path: openms-package
198-
199-
- name: List files in openms-package
200-
run: |
201-
ls -R openms-package
202-
203-
- name: Extract bin and share from package
204-
run: |
205-
mkdir -p openms-bin
206-
cp -r openms-package/OpenMS/bld/bin/* openms-bin/ || echo "No files to copy from openms-package/OpenMS/bld/bin"
207-
mkdir -p openms-thirdparty
208-
cp -r openms-package/_thirdparty/* openms-thirdparty/ || echo "No files to copy from openms-package/_thirdparty"
209195

210-
#cp -r share ../share
211-
#cp -r openms-package/bin ../openms-bin
212-
#cp -r openms-package/share ../share
213-
214-
- name: Download and unzip dlls
215-
run: |
216-
curl -L -o dlls_for_windows.zip https://github.com/Arslan-Siraj/nuxl_webapp_supporting_files/releases/download/v0.0.1/dlls_for_windows.zip
217-
unzip dlls_for_windows.zip -d dlls_windows
218-
cp -r dlls_windows/dlls_for_windows/* openms-bin/
219-
220-
- name: List files in openms-bin
196+
- name: Extract bin and share from package
221197
run: |
222-
ls -R openms-bin
198+
cd openms-package
199+
unzip "*.zip" -d .
200+
cp -r openms-package/bin ../openms-bin
201+
cp -r openms-package/share ../share
223202
224-
- name: List files in openms-thirdparty
225-
run: |
226-
ls -R openms-thirdparty
227-
228203
- name: Set up Python (regular distribution)
229-
uses: actions/setup-python@v4
204+
uses: actions/setup-python@v5
230205
with:
231206
python-version: ${{ env.PYTHON_VERSION }} # Use the same version as the embeddable version
232-
207+
233208
- name: Setup python embeddable version
234209
run: |
235210
# Create a directory for the embeddable Python version
@@ -251,7 +226,7 @@ jobs:
251226
cp $PYTHON_DIR/DLLs/_tkinter.pyd $EMBED_DIR/
252227
cp $PYTHON_DIR/DLLs/tcl86t.dll $EMBED_DIR/
253228
cp $PYTHON_DIR/DLLs/tk86t.dll $EMBED_DIR/
254-
229+
255230
- name: Install pip
256231
run: |
257232
curl -O https://bootstrap.pypa.io/get-pip.py
@@ -268,8 +243,8 @@ jobs:
268243
- name: Install pyopenms
269244
run: .\python-${{ env.PYTHON_VERSION }}\python -m pip install pyopenms==3.1.0 --no-warn-script-location
270245

271-
- name: Install numpy
272-
run: .\python-${{ env.PYTHON_VERSION }}\python -m pip install numpy==1.22.4 --no-warn-script-location
246+
#- name: Install numpy
247+
# run: .\python-${{ env.PYTHON_VERSION }}\python -m pip install numpy==1.22.4 --no-warn-script-location
273248

274249
- name: Set to offline deployment
275250
run: |
@@ -282,28 +257,23 @@ jobs:
282257
echo " start /min .\python-${{ env.PYTHON_VERSION }}\python -m streamlit run app.py local" > ${{ env.APP_NAME }}.bat
283258
284259
- name: Create All-in-one executable folder
285-
run: |
286-
if (Test-Path -Path "streamlit_exe") {
287-
Remove-Item -Recurse -Force "streamlit_exe"
288-
}
289-
260+
run: |
290261
mkdir streamlit_exe
262+
291263
mv python-${{ env.PYTHON_VERSION }} streamlit_exe
292264
cp -r src streamlit_exe
293265
cp -r content streamlit_exe
294266
cp -r assets streamlit_exe
295267
cp -r example-data streamlit_exe
296-
cp -r Force .streamlit streamlit_exe
268+
cp -r .streamlit streamlit_exe
297269
cp app.py streamlit_exe
298270
cp settings.json streamlit_exe
299271
cp ${{ env.APP_NAME }}.bat streamlit_exe
300-
cp -r openms-bin streamlit_exe
301-
cp -r openms-thirdparty streamlit_exe
302272
303-
#$files = $env:TOPP_TOOLS -split ' '
304-
#foreach ($file in $files) {
305-
# Copy-Item "openms-bin/${file}.exe" -Destination "streamlit_exe/${file}.exe"
306-
#}
273+
$files = $env:TOPP_TOOLS -split ' '
274+
foreach ($file in $files) {
275+
Copy-Item "openms-bin/${file}.exe" -Destination "streamlit_exe/${file}.exe"
276+
}
307277
308278
- name: Generate Readme.txt
309279
shell: bash

0 commit comments

Comments
 (0)