Build with python 3.10.11 #47
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |