Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move Continuous Integration to Github Actions and be able to download resulting binaries #66

Merged
merged 52 commits into from Sep 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
c445514
Added CI buid config for Github Actions
thepapermen May 15, 2023
fd6397d
Merge branch 'master' of github.com:thepapermen/airrohr-firmware-flasher
thepapermen May 15, 2023
c39be3e
Trying to fix GA build
thepapermen May 15, 2023
7585a29
Less Python and OS versions for GA build config
thepapermen May 15, 2023
8ad1642
Removed Ubuntu SDK Team PPA from GA buid yml
thepapermen May 15, 2023
187ea42
Added saving of built binaries to GA CI
thepapermen May 15, 2023
718e1c0
Added OS matrix to GA CI, modified binary archive path
thepapermen May 15, 2023
99a7237
Limited OS to Ubuntu 20.04 in GA CI
thepapermen May 15, 2023
300200b
Added Ubuntu 18.04 to GA CI
thepapermen May 15, 2023
c6b0878
Added macOS to GA CI
thepapermen May 15, 2023
bd0a48f
Changed macOS version in GA CI
thepapermen May 15, 2023
760ef6a
Changed macOS version in GA CI
thepapermen May 15, 2023
ea7d4a9
Added qt5 brew to GA CI build
thepapermen May 16, 2023
176577b
Experimenting with QT path, trying to fix Mac OS GA CI build
thepapermen May 16, 2023
bd2ad0e
Experimenting with QT path, trying to fix Mac OS GA CI build
thepapermen May 16, 2023
5a02130
Experimenting with QT path, trying to fix Mac OS GA CI build
thepapermen May 16, 2023
d656939
Experimenting with QT path, trying to fix Mac OS GA CI build
thepapermen May 16, 2023
2003ace
Experimenting with QT path, trying to fix Mac OS GA CI build
thepapermen May 16, 2023
5a001d5
Experimenting with QT path, trying to fix Mac OS GA CI build
thepapermen May 16, 2023
6d9858b
Experimenting with QT path, trying to fix Mac OS GA CI build
thepapermen May 16, 2023
fca2420
Experimenting with QT path, trying to fix Mac OS GA CI build
thepapermen May 16, 2023
fb18223
Experimenting with QT path, trying to fix Mac OS GA CI build
thepapermen May 16, 2023
51d10ee
Experimenting with QT path, trying to fix Mac OS GA CI build
thepapermen May 16, 2023
f892286
Experimenting with QT path, trying to fix Mac OS GA CI build
thepapermen May 16, 2023
031f50e
Experimenting with QT path, trying to fix Mac OS GA CI build
thepapermen May 16, 2023
d0b4b31
Wrestling with PATH var in GA CI OSX build
thepapermen May 16, 2023
1ef49e5
Wrestling with PATH var in GA CI OSX build
thepapermen May 16, 2023
95687fd
Wrestling with PATH var in GA CI OSX build
thepapermen May 16, 2023
4691044
Wrestling with PATH var in GA CI OSX build
thepapermen May 16, 2023
94590cb
Wrestling with PATH var in GA CI OSX build
thepapermen May 16, 2023
2585bb6
Wrestling with PATH var in GA CI OSX build
thepapermen May 16, 2023
3d5c051
Wrestling with OSX buildon GA CI
thepapermen May 16, 2023
229eee8
Wrestling with OSX buildon GA CI
thepapermen May 16, 2023
85004ab
Wrestling with OSX buildon GA CI
thepapermen May 16, 2023
53f671b
Wrestling with OSX buildon GA CI
thepapermen May 16, 2023
90af3e9
Wrestling with OSX buildon GA CI
thepapermen May 16, 2023
0a194ac
Added Ubuntu 22.04 just to try GA CI
thepapermen May 16, 2023
c14bc31
Trying newer pyinstaller version in a futile attempt to fix OS X build
thepapermen May 16, 2023
740ae76
Trying newer macholib version in a futile attempt to fix OS X build
thepapermen May 16, 2023
75afafd
Added missing dmgbuild install instruction
thepapermen May 16, 2023
361fa5d
Trying to fix dmgbuild error
thepapermen May 16, 2023
7e2854c
Replacing biplist with plistlib for python versions later than 3.4
thepapermen May 16, 2023
50148c0
Replacing biplist with plistlib for python versions later than 3.4 --…
thepapermen May 16, 2023
d3bf438
Added windows-latest to GA CI
thepapermen May 16, 2023
859fb46
Added windows-latest to GA CI
thepapermen May 16, 2023
a95d10b
Working on windows build on GA CI
thepapermen May 16, 2023
3f95ac1
Working on windows build on GA CI
thepapermen May 16, 2023
a56d4f1
Working on windows build on GA CI
thepapermen May 16, 2023
b82bb9f
Added python 3.6 and 3.11 to build matrix
thepapermen May 17, 2023
85f07be
More python versions in build matrix
thepapermen May 17, 2023
7a18c21
Removed all python versions except 3.9 from build matrix (3.6-3.10 ar…
thepapermen May 17, 2023
87ac3be
Github actions: Added .dmg extension to OS X binary build
thepapermen Jul 26, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
77 changes: 77 additions & 0 deletions .github/workflows/build-airrohr-firmware-flasher.yml
@@ -0,0 +1,77 @@
name: Build Airrohr Firmware Flasher CI

on: [push, pull_request, fork]

jobs:
build:
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-22.04, macos-latest, windows-latest]
python-version: ["3.9"]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- name: Install qt5 OS X Packages
if: runner.os == 'macOS'
run: brew install qt@5
- name: Install qt5 Ubuntu Packages
if: runner.os == 'Linux'
run: sudo apt-get update -qq && sudo apt-get install -qq qtbase5-dev qtdeclarative5-dev libqt5webkit5-dev qttools5-dev-tools make
- name: Install qt5 on Windows
if: runner.os == 'Windows'
uses: jurplel/install-qt-action@v3
with:
version: '5.15.2'
setup-python: 'false'
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Display python root dir
run: echo $Python3_ROOT_DIR
- name: Install dependencies
run: make deps
- name: Install Additional OS X build deps
if: runner.os == 'macOS'
run: pip install dmgbuild==1.6.1
- name: Display Path
run: echo $PATH
- name: Display Pip packages
run: pip freeze
- name: Test for pyuic5 command
if: runner.os == 'macOS'
run: export PATH="/usr/local/opt/qt@5/bin:/Users/runner/.local/bin:$PATH" && pyuic5 --version
- name: Test for lrelease command
if: runner.os == 'macOS'
run: export PATH="/usr/local/opt/qt@5/bin:/Users/runner/.local/bin:$PATH" && lrelease -version
- name: Run build script (Linux or Windows)
if: runner.os != 'macOS'
run: make dist
shell: bash
- name: Run build script (OS X)
if: runner.os == 'macOS'
run: export PATH="/usr/local/opt/qt@5/bin:/Users/runner/.local/bin:$PATH" && make dmg
shell: bash
- name: Archive built binaries (Linux)
if: runner.os == 'Linux'
uses: actions/upload-artifact@v3
with:
name: airrohr-flasher-dist-${{ matrix.os }}-python${{ matrix.python-version }}
path: dist/airrohr-flasher
- name: Archive built binaries (OS X)
if: runner.os == 'macOS'
uses: actions/upload-artifact@v3
with:
name: airrohr-flasher-dist-${{ matrix.os }}-python${{ matrix.python-version }}
path: dist/airrohr-flasher.dmg
- name: Archive built binaries (Windows)
if: runner.os == 'Windows'
uses: actions/upload-artifact@v3
with:
name: airrohr-flasher-dist-${{ matrix.os }}-python${{ matrix.python-version }}
path: dist/airrohr-flasher.exe
2 changes: 1 addition & 1 deletion .gitignore
@@ -1,7 +1,7 @@
.ropeproject
*.py[oc]
*.swp

.idea/**
_buildid.py

build/
Expand Down
1 change: 1 addition & 0 deletions .python-version
@@ -0,0 +1 @@
airrohr_dev
20 changes: 18 additions & 2 deletions deploy/dmgbuild_settings.py
@@ -1,8 +1,24 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

import biplist
import os.path
import sys

# Before Python 3.4, use biplist; afterwards, use plistlib
# Fix based on this issue of dmgbuild,
# see https://github.com/dmgbuild/dmgbuild/issues/35
# for additional details.
if sys.version_info < (3, 4):
import biplist

def read_plist(path):
return biplist.readPlist(path)
else:
import plistlib

def read_plist(path):
with open(path, 'rb') as f:
return plistlib.load(f)

#
# Example settings file for dmgbuild
Expand All @@ -22,7 +38,7 @@

def icon_from_app(app_path):
plist_path = os.path.join(app_path, 'Contents', 'Info.plist')
plist = biplist.readPlist(plist_path)
plist = read_plist(plist_path)
icon_name = plist['CFBundleIconFile']
icon_root,icon_ext = os.path.splitext(icon_name)
if not icon_ext:
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Expand Up @@ -6,11 +6,11 @@ ecdsa==0.13.3
esptool==2.5.0
future==0.16.0
idna==2.7
macholib==1.11
macholib==1.16
netifaces==0.10.7
pefile==2018.8.8
pyaes==1.6.1
pyinstaller==3.6
pyinstaller==4.10
pyqt5-sip==12.9.1
pyqt5==5.15.2
pyserial==3.4
Expand Down