Skip to content

Commit

Permalink
ci: try to build windows and linux executable
Browse files Browse the repository at this point in the history
  • Loading branch information
rrooij committed Jan 23, 2021
1 parent 18330ab commit 71c92b2
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
20 changes: 19 additions & 1 deletion .github/workflows/pythonapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,15 @@ on: [push]
jobs:
build:

runs-on: ubuntu-latest
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
include:
- os: ubuntu-latest
ARTIFACT_NAME: sd3save_editor_linux
- os: windows-latest
ARTIFACT_NAME: sd3save_editor_windows

steps:
- uses: actions/checkout@v1
Expand All @@ -16,7 +24,10 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install wheel
pip install pyinstaller pyqt5
pip install -r requirements-dev.txt
shell: bash
- name: Lint with flake8
run: |
pip install flake8
Expand All @@ -26,3 +37,10 @@ jobs:
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Run pytest
run: python -m pytest
- name: Build executable
run: make
shell: bash
- uses: actions/upload-artifact@v2
with:
name: ${{matrix.ARTIFACT_NAME}}
path: dist/sd3save_editor*
13 changes: 12 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
VERSION=0.5.3
PACKAGE_NAME=python3-sd3save-editor_$(VERSION)_all
FOLDER_SEPERATOR=":"
TARGET=dist/sd3save_editor

.PHONY: package_deb
ifeq ($(OS),Windows_NT)
FOLDER_SEPERATOR=";"
TARGET=dist/sd3save_editor.exe
endif

$(TARGET):
pyinstaller sd3save_editor/gui/__main__.py -n sd3save_editor \
--add-data "sd3save_editor/data"$(FOLDER_SEPERATOR)"sd3save_editor/data" -F

.PHONY: $(TARGET)

package_deb:
dpkg-buildpackage -us -uc
Expand Down

0 comments on commit 71c92b2

Please sign in to comment.