forked from esphome/esphome-flasher
-
Notifications
You must be signed in to change notification settings - Fork 5
177 lines (172 loc) · 5.66 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
on: [push]
name: Create Release
jobs:
build-windows:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.10.11'
architecture: 'x64'
- name: Print Versions
run: |
python --version
pip --version
- name: Install requirements
run: |
pip install -r requirements_build.txt
pip install -e .
- name: Run PyInstaller
run: |
python -m PyInstaller.__main__ -F -w -n FujiNet-Flasher -i icon.ico esphomeflasher\__main__.py
- uses: actions/upload-artifact@master
with:
name: FujiNet-Flasher_win-x64
path: dist/FujiNet-Flasher.exe
build-windows-x86:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.10.11'
architecture: 'x86'
- name: Print Versions
run: |
python --version
pip --version
- name: Install requirements
run: |
pip install -r requirements_build.txt
pip install -e .
- name: Run PyInstaller
run: |
python -m PyInstaller.__main__ -F -w -n FujiNet-Flasher -i icon.ico esphomeflasher\__main__.py
- name: See dist directory
run: ls dist
- name: Upload Artifact
uses: actions/upload-artifact@master
with:
name: FujiNet-Flasher_win-x86
path: dist/FujiNet-Flasher.exe
build-ubuntu:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.10.11'
- name: Install dependencies
run: |
sudo apt update
sudo apt install libgtk-3-dev libnotify-dev libsdl2-dev
pip uninstall --yes setuptools
# pip install attrdict3
# pip install -U \
# -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-18.04 \
# wxPython
- name: Install requirements
run: |
pip install -r requirements_build.txt
pip install -e .
- name: Run PyInstaller
run: |
python -m PyInstaller.__main__ -F -w -n FujiNet-Flasher -i icon.ico esphomeflasher/__main__.py
- name: See dist directory
run: ls dist
- name: Upload Artifact
uses: actions/upload-artifact@master
with:
name: FujiNet-Flasher_linux
path: dist/FujiNet-Flasher
build-macos:
runs-on: macOS-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.10.11'
- name: Print Versions
run: |
python --version
pip --version
- name: Install requirements
run: |
pip install -r requirements_build.txt
pip install -e .
- name: Run PyInstaller
run: |
python -m PyInstaller.__main__ -F -w -n FujiNet-Flasher -i icon.icns esphomeflasher/__main__.py
- name: Remove Extra Binary
run: rm dist/FujiNet-Flasher
- name: Set binary permissions
run: chmod +x dist/FujiNet-Flasher.app/Contents/MacOS/Fujinet-Flasher
- name: See dist directory
run: ls -alR dist
- name: Tar files
run: |
cd dist
tar -cvf ../FujiNet-Flasher_macos_latest.tar *
cd ..
- name: Upload Artifact
uses: actions/upload-artifact@master
with:
name: FujiNet-Flasher_macos_latest
path: FujiNet-Flasher_macos_latest.tar
build-macos-mavericks:
runs-on: macOS-latest
env:
# We need the official Python, because the GA ones only support newer macOS versions
# The deployment target is picked up by the Python build tools automatically
PYTHON_VERSION: 3.9.1
MACOSX_DEPLOYMENT_TARGET: 10.9
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Get Python
run: curl https://www.python.org/ftp/python/${PYTHON_VERSION}/python-${PYTHON_VERSION}-macosx10.9.pkg -o "python.pkg"
- name: Uninstall homebrew python
run: brew uninstall [email protected]
- name: Uninstall homebrew pip
run: brew uninstall brew-pip
- name: Install Python
# Need to copy the pkg because the installer command removes it, breaking the cache
run: |
sudo installer -pkg python.pkg -target /
- name: Print Versions
# Run commands using 'python3' & 'pip3' to avoid using the worker preinstalled python
run: |
python3 --version
pip3 --version
- name: Install requirements
run: |
pip3 install -r requirements_build.txt
pip3 install -e .
- name: Run PyInstaller
run: |
python3 -m PyInstaller.__main__ -F -w -n FujiNet-Flasher -i icon.icns esphomeflasher/__main__.py
- name: Remove Extra Binary
run: rm dist/FujiNet-Flasher
- name: Set binary permissions
run: chmod +x dist/FujiNet-Flasher.app/Contents/MacOS/Fujinet-Flasher
- name: See dist directory
run: ls -alR dist
- name: Tar files
run: |
cd dist
tar -cvf ../FujiNet-Flasher_macos_mavericks.tar *
cd ..
- name: Upload Artifact
uses: actions/upload-artifact@master
with:
name: FujiNet-Flasher_macos_mavericks
path: FujiNet-Flasher_macos_mavericks.tar