Skip to content

Commit

Permalink
Ariel
Browse files Browse the repository at this point in the history
  • Loading branch information
schmelly committed Dec 29, 2023
2 parents 36697b1 + a24ce8f commit 42a32f9
Show file tree
Hide file tree
Showing 110 changed files with 3,018 additions and 3,055 deletions.
96 changes: 58 additions & 38 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ env:
on:
push:
tags:
- v*.*.*
- "*.*.*"

jobs:

build-linux:
build-linux-deb:
runs-on: ubuntu-20.04
steps:
- name: setup python
Expand All @@ -30,21 +30,56 @@ jobs:
echo "bucket_name = \"$ai_s3_bucket_name\"" >> ./graxpert/s3_secrets.py
- name: install dependencies
run: |
pip install setuptools wheel pyinstaller && \
sudo apt install alien -y && \
pip install "cx_freeze>=6.16.0.dev" && \
pip install -r requirements.txt
- name: patch version
run: |
chmod u+x ./releng/patch_version.sh && \
./releng/patch_version.sh
- name: create GraXpert-linux bundle
run: python ./setup.py bdist_deb
- name: store artifacts
uses: actions/upload-artifact@v2
with:
name: graxpert_${{github.ref_name}}-1_amd64.deb
path: ./dist/graxpert_${{github.ref_name}}-1_amd64.deb
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: configure ai s3 secrets
run: |
pyinstaller \
./GraXpert-linux.spec \
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 cx_freeze && \
pip install -r requirements.txt
- name: patch version
run: |
chmod u+x ./releng/patch_version.sh && \
./releng/patch_version.sh
- name: create GraXpert-linux bundle
run: python ./setup.py install_exe --install-dir=./dist/GraXpert-linux
- 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
path: ./dist/GraXpert-linux
name: GraXpert-linux.zip
path: ./dist/GraXpert-linux.zip
retention-days: 5

build-windows:
Expand All @@ -56,12 +91,6 @@ 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: v6.1.0
- name: configure ai s3 secrets
run: |
$PSDefaultParameterValues['Out-File:Encoding']='UTF8' ; `
Expand All @@ -71,32 +100,17 @@ jobs:
"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 ; `
pushd ; `
python setup.py sdist ; `
popd ; `
pip install ./dist/pyinstaller-6.1.0.tar.gz ; `
cd .. ; `
pip install setuptools wheel cx_freeze; `
pip install -r requirements.txt
- name: patch version
run: ./releng/patch_version.ps1
- name: create GraXpert-win64 bundle
run: |
pyinstaller `
./GraXpert-win64.spec `
run: python ./setup.py bdist_msi
- name: store artifacts
uses: actions/upload-artifact@v2
with:
name: GraXpert-win64.exe
path: ./dist/GraXpert-win64.exe
name: GraXpert-${{github.ref_name}}-win64.msi
path: ./dist/GraXpert-${{github.ref_name}}-win64.msi
retention-days: 5

build-macos-x86_64:
Expand Down Expand Up @@ -126,6 +140,7 @@ jobs:
chmod u+x ./releng/patch_version.sh && \
./releng/patch_version.sh
- name: create GraXpert-macos-x86_64 bundle
# TODO migrato to cx_freeze
run: |
pyinstaller \
./GraXpert-macos-x86_64.spec
Expand All @@ -151,16 +166,20 @@ jobs:

release:
runs-on: ubuntu-latest
needs: [build-linux, build-windows, build-macos-x86_64]
needs: [build-linux-deb, build-linux-zip, build-windows, build-macos-x86_64]
steps:
- name: download linux binary
- name: download linux deb
uses: actions/download-artifact@v2
with:
name: graxpert_${{github.ref_name}}-1_amd64.deb
- name: download linux zip
uses: actions/download-artifact@v2
with:
name: GraXpert-linux
name: GraXpert-linux.zip
- name: download windows exe
uses: actions/download-artifact@v2
with:
name: GraXpert-win64.exe
name: GraXpert-${{github.ref_name}}-win64.msi
- name: download macos artifacts
uses: actions/download-artifact@v2
with:
Expand All @@ -169,6 +188,7 @@ jobs:
uses: softprops/action-gh-release@v1
with:
files: |
GraXpert-linux
GraXpert-win64.exe
graxpert_${{github.ref_name}}-1_amd64.deb
GraXpert-linux.zip
GraXpert-${{github.ref_name}}-win64.msi
GraXpert-macos-x86_64.dmg
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"black-formatter.args": [
"--line-length",
"200"
]
}
42 changes: 0 additions & 42 deletions GraXpert-linux.spec

This file was deleted.

2 changes: 1 addition & 1 deletion GraXpert-macos-arm64.spec
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ block_cipher = None
a = Analysis(['./graxpert/main.py'],
pathex=[],
binaries=[],
datas=[('./img/*', './img/'), ('./forest-dark.tcl', './'), ('./forest-dark/*', './forest-dark/')],
datas=[('./img/*', './img/'), ('./graxpert-dark-blue.json', './')],
hiddenimports=['PIL._tkinter_finder', 'tkinter'],
hookspath=['./releng'],
hooksconfig={},
Expand Down
2 changes: 1 addition & 1 deletion GraXpert-macos-x86_64.spec
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ block_cipher = None
a = Analysis(['./graxpert/main.py'],
pathex=[],
binaries=[],
datas=[('./img/*', './img/'), ('./forest-dark.tcl', './'), ('./forest-dark/*', './forest-dark/')],
datas=[('./img/*', './img/'), ('./graxpert-dark-blue.json', './')],
hiddenimports=['PIL._tkinter_finder', 'tkinter'],
hookspath=['./releng'],
hooksconfig={},
Expand Down
2 changes: 1 addition & 1 deletion GraXpert-win64.spec
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ block_cipher = None
a = Analysis(['./graxpert/main.py'],
pathex=[],
binaries=[],
datas=[('./img/*', './img/'), ('./forest-dark.tcl', './'), ('./forest-dark/*', './forest-dark/')],
datas=[('./img/*', './img/'), ('./graxpert-dark-blue.json', './')],
hiddenimports=['PIL._tkinter_finder', 'tkinter'],
hookspath=['./releng'],
hooksconfig={},
Expand Down
Loading

0 comments on commit 42a32f9

Please sign in to comment.