Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# This is a basic workflow to help you get started with Actions

name: build-and-release

# Controls when the workflow will run
on:

# Trigger on a push
#push:

# Trigger on a published release
release:
types: [published]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# Build the installer on mac
call-macos-build:
uses: ./.github/workflows/build-macos.yml

call-linux-build:
uses: ./.github/workflows/build-linux.yml

call-windows-build:
uses: ./.github/workflows/build-windows.yml

call-python-build:
uses: ./.github/workflows/build-python.yml

# Using the outputs of the build
deploy-builds:

# Only do this on a release - note - filtering release types in the above "on:" statement
if: github.event_name == 'release'
runs-on: ubuntu-latest
needs: [call-macos-build, call-linux-build, call-windows-build, call-python-build]
steps:
# Download the generated app files that are part of the release
- uses: actions/download-artifact@v3
with:
name: ${{ needs.call-macos-build.outputs.build-file }}
- uses: actions/download-artifact@v3
with:
name: ${{ needs.call-linux-build.outputs.build-file }}
- uses: actions/download-artifact@v3
with:
name: ${{ needs.call-windows-build.outputs.build-file }}
- uses: actions/download-artifact@v3
with:
name: ${{ needs.call-python-build.outputs.build-file }}
- name: Output Listing
run: ls -la

- name: Publish Release
uses: softprops/action-gh-release@v1
with:
files: |
${{ needs.call-macos-build.outputs.build-file }}
${{ needs.call-linux-build.outputs.build-file }}
${{ needs.call-windows-build.outputs.build-file }}
${{ needs.call-python-build.outputs.build-package }}

53 changes: 53 additions & 0 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# This is a basic workflow to help you get started with Actions

name: build-linux

# Controls when the workflow will run
on:
# this is a called workflow
workflow_call:
outputs:
build-file:
description: "The output of this build procsss"
value: ${{ jobs.linux-build-job.outputs.install-file }}

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# Build the installer on mac
linux-build-job:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Output
outputs:
install-file: ${{ steps.output-installer.outputs.filename }}

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'

# Setup python
- name: System Setup
run: |
pip3 install pyserial pycryptodome pyinstaller pyqt5 darkdetect

# Build the installer
- name: Build Linux Installer
run: |
pyinstaller --onefile --name ArtemisUploader --noconsole --distpath=. --icon=artemis_uploader/resource/artemis-uploader.ico --add-data="artemis_uploader/resource/*:resource/" artemis_upload.py
gzip ArtemisUploader
mv ArtemisUploader.gz ArtemisUploader.linux.gz

- uses: actions/upload-artifact@v3
with:
name: ArtemisUploader.linux.gz
path: ArtemisUploader.linux.gz

- id: output-installer
run: echo "::set-output name=filename::ArtemisUploader.linux.gz"


55 changes: 55 additions & 0 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# This is a basic workflow to help you get started with Actions

name: build-macos

# Controls when the workflow will run
on:
# this is a called workflow
workflow_call:
outputs:
build-file:
description: "The output of this build procsss"
value: ${{ jobs.macos-build-job.outputs.install-file }}

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# Build the installer on mac
macos-build-job:
# The type of runner that the job will run on
runs-on: macos-latest

# Output
outputs:
install-file: ${{ steps.output-installer.outputs.filename }}

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'

# Setup python
- name: System Setup
run: |
pip3 install pyserial pycryptodome pyinstaller Pillow pyqt5 darkdetect
brew install create-dmg

# Build the installer
- name: Build Mac Installer
run: |
pyinstaller --windowed -n ArtemisUploader --noconsole --distpath=. --icon=artemis_uploader/resource/artemis-uploader.ico --add-data="artemis_uploader/resource/*:resource/" artemis_upload.py
mkdir tmp
mv "ArtemisUploader.app" "tmp/"
create-dmg --volicon "artemis_uploader/resource/sparkdisk.icns" --background "artemis_uploader/resource/sfe_logo_med.png" --hide-extension "ArtemisUploader.app" --icon "ArtemisUploader.app" 100 100 --window-size 600 440 --app-drop-link 400 100 "ArtemisUploader.dmg" "tmp/"

- uses: actions/upload-artifact@v3
with:
name: ArtemisUploader.dmg
path: ArtemisUploader.dmg

- id: output-installer
run: echo "::set-output name=filename::ArtemisUploader.dmg"


60 changes: 60 additions & 0 deletions .github/workflows/build-python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# This is a basic workflow to help you get started with Actions

name: build-python

# Controls when the workflow will run
on:
# this is a called workflow
workflow_call:
outputs:
build-file:
description: "The output of this build procsss"
value: ${{ jobs.python-build-job.outputs.install-file }}
build-package:
description: "The output of this build procsss"
value: ${{ jobs.python-build-job.outputs.install-package }}

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# Build the installer on mac
python-build-job:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Output
outputs:
install-file: ${{ steps.output-installer.outputs.filename }}
install-package: ${{ steps.output-installer.outputs.packagename }}

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'

# Setup python
- name: System Setup
run: |
pip3 install setuptools

# Build the installer
- name: Build Python Installer
run: |
python setup.py sdist

- uses: actions/upload-artifact@v3
with:
name: python-install-package
path: dist

- name: Extract package name
run: |
cd dist
echo "PACKAGE_NAME=$(ls *.tar.gz)" >> $GITHUB_ENV

- id: output-installer
run: |
echo "filename=python-install-package" >> $GITHUB_OUTPUT
echo "packagename=${{ env.PACKAGE_NAME }}" >> $GITHUB_OUTPUT
62 changes: 62 additions & 0 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# This is a basic workflow to help you get started with Actions

name: build-windows

# Controls when the workflow will run
on:
# this is a called workflow
workflow_call:
outputs:
build-file:
description: "The output of this build procsss"
value: ${{ jobs.windows-build-job.outputs.install-file }}

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# Build the installer on mac
windows-build-job:
# The type of runner that the job will run on
runs-on: windows-latest

# Output
outputs:
install-file: ${{ steps.output-installer.outputs.filename }}

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'

# Setup python
- name: System Setup
run: |
pip3 install pyserial pycryptodome pyinstaller pyqt5 darkdetect

# Build the installer
- name: Build Windows Installer
run: |
pyinstaller --onefile --name ArtemisUploader --noconsole --distpath=. --icon=artemis_uploader\resource\artemis-uploader.ico --add-data="artemis_uploader\resource\*;resource\" artemis_upload.py

- name: Compress Installer
shell: powershell
run: |
$compress = @{
Path = ".\ArtemisUploader.exe"
CompressionLevel = "Fastest"
DestinationPath = ".\ArtemisUploader.win.zip"
}
Compress-Archive @compress

- uses: actions/upload-artifact@v3
with:
name: ArtemisUploader.win.zip
path: ArtemisUploader.win.zip

- id: output-installer
run: echo "::set-output name=filename::ArtemisUploader.win.zip"



32 changes: 32 additions & 0 deletions .github/workflows/non-release-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Workflow that builds the application, but doens't add to a release.
#
# This will run on a push that doesn't have a vesion (release) tag

name: non-release-build

# Controls when the workflow will run
on:
# Trigger on push - when a version tag isn't set
# push:
# branches:
# - master
# tags-ignore:
# - "v*.*.*"

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Run each plaform build workflows as seperate jobs
jobs:
# Build the installer on mac
call-macos-build:
uses: ./.github/workflows/build-macos.yml

call-linux-build:
uses: ./.github/workflows/build-linux.yml

call-windows-build:
uses: ./.github/workflows/build-windows.yml

call-python-build:
uses: ./.github/workflows/build-python.yml
1 change: 1 addition & 0 deletions DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The Artemis Firmware Uploader (AFU) is a simple to use GUI for updating firmware and the bootloader on Artemis based products.
Binary file removed Linux/artemis_firmware_uploader_gui
Binary file not shown.
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include artemis_uploader/resource/*.*
include DESCRIPTION.md
Binary file removed OSX/artemis_firmware_uploader_gui
Binary file not shown.
Loading