Skip to content

Commit

Permalink
Ariel
Browse files Browse the repository at this point in the history
  • Loading branch information
Steffenhir committed Oct 21, 2023
2 parents 8da923e + 53bffa3 commit da2ed3c
Show file tree
Hide file tree
Showing 30 changed files with 976 additions and 350 deletions.
150 changes: 32 additions & 118 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
name: build-release

env:
ai_s3_endpoint: ${{ secrets.AI_S3_ENDPOINT }}
ai_s3_access_key: ${{ secrets.AI_S3_ACCESS_KEY }}
ai_s3_secret_key: ${{ secrets.AI_S3_SECRET_KEY }}
ai_s3_bucket_name: ${{ secrets.AI_S3_BUCKET_NAME }}

on:
push:
tags:
Expand All @@ -16,16 +22,20 @@ jobs:
python-version: '3.10'
- name: checkout repository
uses: actions/checkout@v3
- name: configure ai s3 secrets
run: |
echo "endpoint = \"$ai_s3_endpoint\"" >> ./graxpert/s3_secrets.py && \
echo "ro_access_key = \"$ai_s3_access_key\"" >> ./graxpert/s3_secrets.py && \
echo "ro_secret_key = \"$ai_s3_secret_key\"" >> ./graxpert/s3_secrets.py && \
echo "bucket_name = \"$ai_s3_bucket_name\"" >> ./graxpert/s3_secrets.py
- name: install dependencies
run: |
pip install setuptools wheel pyinstaller==5.6.2 && \
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 ./graxpert/version.py
- name: create GraXpert-linux bundle
run: |
pyinstaller \
Expand All @@ -37,40 +47,6 @@ jobs:
path: ./dist/GraXpert-linux
retention-days: 5

build-linux-zip:
runs-on: ubuntu-20.04
steps:
- name: setup python
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: checkout repository
uses: actions/checkout@v3
- name: install dependencies
run: |
pip install setuptools wheel pyinstaller==5.6.2 && \
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 ./graxpert/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:
Expand All @@ -80,30 +56,19 @@ jobs:
python-version: '3.10'
- name: checkout repository
uses: actions/checkout@v3
- name: checkout pyinstaller
uses: actions/checkout@v3
with:
repository: pyinstaller/pyinstaller
path: ./pyinstaller
ref: v5.6.2
- name: configure ai s3 secrets
run: |
$PSDefaultParameterValues['Out-File:Encoding']='UTF8' ; `
"endpoint = `"$env:ai_s3_endpoint`"" | Out-File -Append .\graxpert\s3_secrets.py ; `
"ro_access_key = `"$env:ai_s3_access_key`"" | Out-File -Append .\graxpert\s3_secrets.py ; `
"ro_secret_key = `"$env:ai_s3_secret_key`"" | Out-File -Append .\graxpert\s3_secrets.py ; `
"bucket_name = `"$env:ai_s3_bucket_name`"" | Out-File -Append .\graxpert\s3_secrets.py
- name: install dependencies
run: |
pip install setuptools wheel && `
cd .\pyinstaller\bootloader && `
(Get-Content .\wscript) -Replace "'run'", "'graxpert'" | Set-Content .\wscript && `
(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 .. && `
(Get-Content .\setup.py) -Replace 'run.exe', 'graxpert.exe' | Set-Content .\setup.py && `
python setup.py install && `
cd .. && `
pip install setuptools wheel pyinstaller && `
pip install -r requirements.txt
- name: patch version
run: ./releng/patch_version.ps1
- name: test version
run: type ./graxpert/version.py
- name: create GraXpert-win64 bundle
run: |
pyinstaller `
Expand All @@ -115,69 +80,27 @@ 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.10'
- name: checkout repository
uses: actions/checkout@v3
- name: checkout pyinstaller
uses: actions/checkout@v3
with:
repository: pyinstaller/pyinstaller
path: ./pyinstaller
ref: v5.6.2
- name: install dependencies
run: |
pip install setuptools wheel && `
cd .\pyinstaller\bootloader && `
(Get-Content .\wscript) -Replace "'run'", "'graxpert'" | Set-Content .\wscript && `
(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 .. && `
(Get-Content .\setup.py) -Replace 'run.exe', 'graxpert.exe' | Set-Content .\setup.py && `
python setup.py install && `
cd .. && `
pip install -r requirements.txt
- name: patch version
run: ./releng/patch_version.ps1
- name: test version
run: type ./graxpert/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
runs-on: macos-11
steps:
- name: setup python
run: brew install python-tk@3.10
run: brew install python-tk@3.11
- name: checkout repository
uses: actions/checkout@v3
- name: configure ai s3 secrets
run: |
echo "endpoint = \"$ai_s3_endpoint\"" >> ./graxpert/s3_secrets.py && \
echo "ro_access_key = \"$ai_s3_access_key\"" >> ./graxpert/s3_secrets.py && \
echo "ro_secret_key = \"$ai_s3_secret_key\"" >> ./graxpert/s3_secrets.py && \
echo "bucket_name = \"$ai_s3_bucket_name\"" >> ./graxpert/s3_secrets.py
- name: install dependencies
run: |
pip3 install setuptools wheel pyinstaller==5.6.2 && \
pip3 install setuptools wheel pyinstaller && \
pip3 install -r requirements.txt
- name: patch version
run: |
chmod u+x ./releng/patch_version.sh && \
./releng/patch_version.sh
- name: test version
run: cat ./graxpert/version.py
- name: create GraXpert-macos-x86_64 bundle
run: |
pyinstaller \
Expand All @@ -192,6 +115,7 @@ jobs:
--window-size 1920 1080 \
--icon-size 100 \
--icon "GraXpert.app" 200 190 \
--app-drop-link 400 190 \
"dist/GraXpert-macos-x86_64.dmg" \
"dist/GraXpert.app/"
- name: store artifacts
Expand All @@ -203,24 +127,16 @@ jobs:

release:
runs-on: ubuntu-latest
needs: [build-linux, build-linux-zip, build-windows, build-windows-zip, build-macos-x86_64]
needs: [build-linux, build-windows, build-macos-x86_64]
steps:
- name: download linux binary
uses: actions/download-artifact@v2
with:
name: GraXpert-linux
- 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:
Expand All @@ -231,6 +147,4 @@ jobs:
files: |
GraXpert-linux
GraXpert-win64.exe
GraXpert-linux.zip
GraXpert-win64.zip
GraXpert-macos-x86_64.dmg
2 changes: 1 addition & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
run: python -m pytest --import-mode=append tests/

test-macos-x86_64:
runs-on: macos-10.15
runs-on: macos-11
steps:
- name: setup python
run: brew install [email protected]
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
*-scaled.png
__pycache__
graxpert/s3_secrets.py
python-venv
build
dist
2 changes: 1 addition & 1 deletion GraXpert-linux.spec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
block_cipher = None


a = Analysis(['./graxpert/gui.py'],
a = Analysis(['./graxpert/main.py'],
pathex=[],
binaries=[],
datas=[('./img/*', './img/'), ('./forest-dark.tcl', './'), ('./forest-dark/*', './forest-dark/')],
Expand Down
21 changes: 15 additions & 6 deletions GraXpert-linux-zip.spec → GraXpert-macos-arm64.spec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
block_cipher = None


a = Analysis(['./graxpert/gui.py'],
a = Analysis(['./graxpert/main.py'],
pathex=[],
binaries=[],
datas=[('./img/*', './img/'), ('./forest-dark.tcl', './'), ('./forest-dark/*', './forest-dark/')],
Expand All @@ -17,8 +17,7 @@ a = Analysis(['./graxpert/gui.py'],
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)

pyz = PYZ(a.pure, a.zipped_data,
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)

exe = EXE(pyz,
Expand All @@ -33,9 +32,10 @@ exe = EXE(pyz,
console=False,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
target_arch='arm64',
codesign_identity=None,
entitlements_file=None , icon='./img/Icon.ico')

coll = COLLECT(
exe,
a.binaries,
Expand All @@ -45,5 +45,14 @@ coll = COLLECT(
strip=False,
upx=True,
upx_exclude=[],
name='GraXpert-linux',
)
name='GraXpert')

app = BUNDLE(coll,
name='GraXpert.app',
icon='./img/Icon.ico',
bundle_identifier=None,
info_plist={
'CFBundleShortVersionString': 'Beta-Release (v1.0.6cAI)',
'NSHighResolutionCapable': 'True'
}
)
2 changes: 1 addition & 1 deletion GraXpert-macos-x86_64.spec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
block_cipher = None


a = Analysis(['./graxpert/gui.py'],
a = Analysis(['./graxpert/main.py'],
pathex=[],
binaries=[],
datas=[('./img/*', './img/'), ('./forest-dark.tcl', './'), ('./forest-dark/*', './forest-dark/')],
Expand Down
56 changes: 0 additions & 56 deletions GraXpert-win64-zip.spec

This file was deleted.

4 changes: 2 additions & 2 deletions GraXpert-win64.spec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
block_cipher = None


a = Analysis(['./graxpert/gui.py'],
a = Analysis(['./graxpert/main.py'],
pathex=[],
binaries=[],
datas=[('./img/*', './img/'), ('./forest-dark.tcl', './'), ('./forest-dark/*', './forest-dark/')],
Expand All @@ -20,7 +20,7 @@ a = Analysis(['./graxpert/gui.py'],
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
splash = Splash(
'img/graXpert_Startbadge_Dione.png',
'img/graXpert_Startbadge_Ariel.png',
binaries=a.binaries,
datas=a.datas,
text_pos=None,
Expand Down
Loading

0 comments on commit da2ed3c

Please sign in to comment.