Skip to content

Added shortcuts for loading, calculating and saving #183

Added shortcuts for loading, calculating and saving

Added shortcuts for loading, calculating and saving #183

Workflow file for this run

name: build-release
on:
push:
tags:
- v*.*.*
jobs:
build-linux:
runs-on: ubuntu-latest
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 && \
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.spec \
- name: store artifacts
uses: actions/upload-artifact@v2
with:
name: GraXpert-linux
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.10'
- 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 ./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:
- 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.spec `
- name: store artifacts
uses: actions/upload-artifact@v2
with:
name: GraXpert-win64.exe
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-11
steps:
- name: setup python
run: brew install [email protected]
- name: checkout repository
uses: actions/checkout@v3
- name: install dependencies
run: |
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 \
./GraXpert-macos-x86_64.spec
- name: install create-dmg
run: brew install create-dmg
- name: create .dmg
run: |
create-dmg \
--volname "GraXpert-macos-x86_64" \
--window-pos 50 50 \
--window-size 1920 1080 \
--icon-size 100 \
--icon "GraXpert.app" 200 190 \
"dist/GraXpert-macos-x86_64.dmg" \
"dist/GraXpert.app/"
- name: store artifacts
uses: actions/upload-artifact@v2
with:
name: GraXpert-macos-x86_64.dmg
path: ./dist/GraXpert-macos-x86_64.dmg
retention-days: 5
release:
runs-on: ubuntu-latest
needs: [build-linux, build-linux-zip, build-windows, build-windows-zip, 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:
name: GraXpert-macos-x86_64.dmg
- name: create release
uses: softprops/action-gh-release@v1
with:
files: |
GraXpert-linux
GraXpert-win64.exe
GraXpert-linux.zip
GraXpert-win64.zip
GraXpert-macos-x86_64.dmg