Skip to content

Commit 027a27d

Browse files
committed
Add qwebchannel.js to build bundle
1 parent f076f6f commit 027a27d

4 files changed

Lines changed: 134 additions & 140 deletions

File tree

.github/workflows/dist-build-macos.yaml

Lines changed: 0 additions & 69 deletions
This file was deleted.

.github/workflows/dist-build-windows.yaml

Lines changed: 0 additions & 70 deletions
This file was deleted.

.github/workflows/dist-build.yaml

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
name: Build Windows binary
2+
3+
on:
4+
push:
5+
branches:
6+
- release
7+
8+
jobs:
9+
build-windows:
10+
runs-on: windows-2022
11+
steps:
12+
- name: Checkout repo
13+
uses: actions/checkout@v5
14+
15+
- name: Setup Python
16+
uses: actions/setup-python@v6
17+
with:
18+
python-version: '3.13.7'
19+
20+
- name: Cache pip dependencies
21+
uses: actions/cache@v4
22+
with:
23+
path: ~\AppData\Local\pip\Cache
24+
key: ${{ runner.os }}-pip-3.13.7-${{ hashFiles('requirements.txt') }}
25+
restore-keys: |
26+
${{ runner.os }}-pip-3.13.7-
27+
28+
- name: Install dependencies
29+
run: pip install -r requirements.txt
30+
31+
- name: Install offline_folium map files
32+
run: python -m offline_folium
33+
34+
- name: Build with Nuitka
35+
uses: Nuitka/Nuitka-Action@main
36+
with:
37+
nuitka-version: main
38+
script-name: netseedf.py
39+
mode: app
40+
enable-plugins: pyside6
41+
include-package: netCDF4,cftime
42+
include-module: netCDF4.utils
43+
include-data-dir: "C:\\hostedtoolcache\\windows\\Python\\3.13.7\\x64\\Lib\\site-packages\\offline_folium=offline_folium"
44+
include-data-files: "qwebchannel.js=qwebchannel.js"
45+
copyright: 'GNU General Public License v3.0'
46+
#windows-console-mode: disable
47+
windows-icon-from-ico: 'icon.png'
48+
company-name: 'Rok Kuk'
49+
product-name: 'NetSeeDF'
50+
file-version: '0.1'
51+
52+
- name: Upload artifact
53+
id: artifact_upload
54+
uses: actions/upload-artifact@v4
55+
with:
56+
include-hidden-files: true
57+
name: dist-build-windows
58+
path: build
59+
60+
- name: If executable upload success
61+
if: steps.artifact_upload.conclusion == 'success'
62+
run: |
63+
echo "Executable uploaded successfully" >> $GITHUB_STEP_SUMMARY
64+
echo "uploaded='true'" >> $GITHUB_OUTPUT
65+
66+
- name: If executable upload fails
67+
if: failure() && steps.artifact_upload.conclusion == 'failure'
68+
run: |
69+
echo "::warning title=Failed-Upload::\
70+
Executable couldn't upload. \
71+
Check available storage at: 'settings > billing > Storage for Actions and Packages'."
72+
73+
build-macos:
74+
runs-on: macos-14
75+
steps:
76+
- name: Checkout repo
77+
uses: actions/checkout@v5
78+
79+
- name: Setup Python
80+
uses: actions/setup-python@v6
81+
with:
82+
python-version: '3.13.7'
83+
84+
- name: Cache pip dependencies
85+
uses: actions/cache@v4
86+
with:
87+
path: ~\AppData\Local\pip\Cache
88+
key: ${{ runner.os }}-pip-3.13.7-${{ hashFiles('requirements.txt') }}
89+
restore-keys: |
90+
${{ runner.os }}-pip-3.13.7-
91+
92+
- name: Install dependencies
93+
run: pip install -r requirements.txt
94+
95+
- name: Install offline_folium map files
96+
run: python -m offline_folium
97+
98+
- name: Build with Nuitka
99+
uses: Nuitka/Nuitka-Action@main
100+
with:
101+
nuitka-version: main
102+
script-name: netseedf.py
103+
mode: app
104+
enable-plugins: pyside6
105+
include-package: netCDF4,cftime
106+
include-module: netCDF4.utils
107+
include-data-dir: "/Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/offline_folium=offline_folium"
108+
include-data-files: "qwebchannel.js=qwebchannel.js"
109+
copyright: 'GNU General Public License v3.0'
110+
macos-app-icon: 'icon.png'
111+
company-name: 'Rok Kuk'
112+
macos-app-name: 'NetSeeDF'
113+
macos-app-version: '0.1'
114+
115+
- name: Upload artifact
116+
id: artifact_upload
117+
uses: actions/upload-artifact@v4
118+
with:
119+
include-hidden-files: true
120+
name: dist-build-macos
121+
path: build
122+
123+
- name: If executable upload success
124+
if: steps.artifact_upload.conclusion == 'success'
125+
run: |
126+
echo "Executable uploaded successfully" >> $GITHUB_STEP_SUMMARY
127+
echo "uploaded='true'" >> $GITHUB_OUTPUT
128+
129+
- name: If executable upload fails
130+
if: failure() && steps.artifact_upload.conclusion == 'failure'
131+
run: |
132+
echo "::warning title=Failed-Upload::\
133+
Executable couldn't upload. \
134+
Check available storage at: 'settings > billing > Storage for Actions and Packages'."

tmp.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)