-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
867 additions
and
254 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ on: | |
- v*.*.* | ||
|
||
jobs: | ||
|
||
build-linux: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
@@ -15,7 +15,7 @@ jobs: | |
with: | ||
python-version: '3.9' | ||
- name: checkout repository | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
- name: install dependencies | ||
run: | | ||
pip install setuptools wheel pyinstaller && \ | ||
|
@@ -37,6 +37,40 @@ jobs: | |
path: ./dist/GraXpert-linux | ||
retention-days: 5 | ||
|
||
build-linux-zip: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: setup python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.9' | ||
- name: checkout repository | ||
uses: actions/checkout@v3 | ||
- name: install dependencies | ||
run: | | ||
pip install setuptools wheel pyinstaller && \ | ||
pip install -r requirements.txt | ||
- name: patch version | ||
run: | | ||
chmod u+x ./releng/patch_version.sh && \ | ||
./releng/patch_version.sh | ||
- name: test version | ||
run: cat ./src/version.py | ||
- name: create GraXpert-linux bundle | ||
run: | | ||
pyinstaller \ | ||
./GraXpert-linux-zip.spec \ | ||
- name: zip GraXpert-linux bundle | ||
run: | | ||
cd ./dist && \ | ||
zip -r ./GraXpert-linux.zip ./GraXpert-linux | ||
- name: store artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: GraXpert-linux.zip | ||
path: ./dist/GraXpert-linux.zip | ||
retention-days: 5 | ||
|
||
build-windows: | ||
runs-on: windows-latest | ||
steps: | ||
|
@@ -45,10 +79,24 @@ jobs: | |
with: | ||
python-version: '3.9' | ||
- name: checkout repository | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
- name: checkout pyinstaller | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: pyinstaller/pyinstaller | ||
path: ./pyinstaller | ||
ref: v5.0 | ||
- name: install dependencies | ||
run: | | ||
pip install setuptools wheel pyinstaller && ` | ||
pip install setuptools wheel && ` | ||
cd .\pyinstaller\bootloader && ` | ||
(Get-Content .\src\main.c) -Replace 'pyi_main\(', 'my_pyi_main(' | Set-Content .\src\main.c && ` | ||
(Get-Content .\src\pyi_main.h) -Replace 'pyi_main\(', 'my_pyi_main(' | Set-Content .\src\pyi_main.h && ` | ||
(Get-Content .\src\pyi_main.c) -Replace 'pyi_main\(', 'my_pyi_main(' | Set-Content .\src\pyi_main.c && ` | ||
python ./waf all && ` | ||
cd .. && ` | ||
python setup.py install && ` | ||
cd .. && ` | ||
pip install -r requirements.txt | ||
- name: patch version | ||
run: ./releng/patch_version.ps1 | ||
|
@@ -65,13 +113,57 @@ jobs: | |
path: ./dist/GraXpert-win64.exe | ||
retention-days: 5 | ||
|
||
build-windows-zip: | ||
runs-on: windows-latest | ||
steps: | ||
- name: setup python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.9' | ||
- name: checkout repository | ||
uses: actions/checkout@v3 | ||
- name: checkout pyinstaller | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: pyinstaller/pyinstaller | ||
path: ./pyinstaller | ||
ref: v5.0 | ||
- name: install dependencies | ||
run: | | ||
pip install setuptools wheel && ` | ||
cd .\pyinstaller\bootloader && ` | ||
(Get-Content .\src\main.c) -Replace 'pyi_main\(', 'my_pyi_main(' | Set-Content .\src\main.c && ` | ||
(Get-Content .\src\pyi_main.h) -Replace 'pyi_main\(', 'my_pyi_main(' | Set-Content .\src\pyi_main.h && ` | ||
(Get-Content .\src\pyi_main.c) -Replace 'pyi_main\(', 'my_pyi_main(' | Set-Content .\src\pyi_main.c && ` | ||
python ./waf all && ` | ||
cd .. && ` | ||
python setup.py install && ` | ||
cd .. && ` | ||
pip install -r requirements.txt | ||
- name: patch version | ||
run: ./releng/patch_version.ps1 | ||
- name: test version | ||
run: type ./src/version.py | ||
- name: create GraXpert-win64 bundle | ||
run: | | ||
pyinstaller ` | ||
./GraXpert-win64-zip.spec ` | ||
- name: zip GraXpert-win64 bundle | ||
run: Compress-Archive -Path .\dist\GraXpert-win64 -DestinationPath .\dist\GraXpert-win64.zip | ||
- name: store artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: GraXpert-win64.zip | ||
path: ./dist/GraXpert-win64.zip | ||
retention-days: 5 | ||
|
||
build-macos-x86_64: | ||
runs-on: macos-10.15 | ||
steps: | ||
- name: setup python | ||
run: brew install [email protected] | ||
- name: checkout repository | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
- name: install dependencies | ||
run: | | ||
pip3 install setuptools wheel pyinstaller && \ | ||
|
@@ -107,16 +199,24 @@ jobs: | |
|
||
release: | ||
runs-on: ubuntu-latest | ||
needs: [build-linux, build-windows, build-macos-x86_64] | ||
needs: [build-linux, build-linux-zip, build-windows, build-windows-zip, build-macos-x86_64] | ||
steps: | ||
- name: download linux artifacts | ||
- name: download linux binary | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: GraXpert-linux | ||
- name: download windows artifacts | ||
- name: download linux zip | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: GraXpert-linux.zip | ||
- name: download windows exe | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: GraXpert-win64.exe | ||
- name: download windows zip | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: GraXpert-win64.zip | ||
- name: download macos artifacts | ||
uses: actions/download-artifact@v2 | ||
with: | ||
|
@@ -127,4 +227,6 @@ jobs: | |
files: | | ||
GraXpert-linux | ||
GraXpert-win64.exe | ||
GraXpert-linux.zip | ||
GraXpert-win64.zip | ||
GraXpert-macos-x86_64.dmg |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# -*- mode: python ; coding: utf-8 -*- | ||
|
||
|
||
block_cipher = None | ||
|
||
|
||
a = Analysis(['./src/gui.py'], | ||
pathex=[], | ||
binaries=[], | ||
datas=[('./img/*', './img/'), ('./forest-dark.tcl', './'), ('./forest-dark/*', './forest-dark/')], | ||
hiddenimports=['PIL._tkinter_finder'], | ||
hookspath=['./releng'], | ||
hooksconfig={}, | ||
runtime_hooks=[], | ||
excludes=[], | ||
win_no_prefer_redirects=False, | ||
win_private_assemblies=False, | ||
cipher=block_cipher, | ||
noarchive=False) | ||
|
||
pyz = PYZ(a.pure, a.zipped_data, | ||
cipher=block_cipher) | ||
|
||
exe = EXE(pyz, | ||
a.scripts, | ||
[], | ||
exclude_binaries=True, | ||
name='GraXpert', | ||
debug=False, | ||
bootloader_ignore_signals=False, | ||
strip=False, | ||
upx=True, | ||
console=True, | ||
disable_windowed_traceback=False, | ||
argv_emulation=False, | ||
target_arch=None, | ||
codesign_identity=None, | ||
entitlements_file=None , icon='./img/Icon.ico') | ||
coll = COLLECT( | ||
exe, | ||
a.binaries, | ||
Tree('locales', prefix='locales/'), | ||
a.zipfiles, | ||
a.datas, | ||
strip=False, | ||
upx=True, | ||
upx_exclude=[], | ||
name='GraXpert-linux', | ||
) |
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
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
Oops, something went wrong.