add build workflow
This commit is contained in:
parent
76c9ce8fe5
commit
bb2ca02401
25
.github/workflows/build-release.yml
vendored
Normal file
25
.github/workflows/build-release.yml
vendored
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
name: Build and release
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
tags:
|
||||||
|
- v*
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
pyinstaller-build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Create Executable
|
||||||
|
uses: sayyid5416/pyinstaller@v1
|
||||||
|
with:
|
||||||
|
python_ver: '3.12'
|
||||||
|
spec: 'build.spec'
|
||||||
|
requirements: 'requirements.txt'
|
||||||
|
upload_exe_with_name: 'ai-suite-rocm-${{ github.ref_name }}'
|
||||||
|
- name: Release
|
||||||
|
uses: softprops/action-gh-release@v2
|
||||||
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
|
with:
|
||||||
|
files: dist/*
|
18
build.sh
Normal file
18
build.sh
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
VERSION=1.0.0
|
||||||
|
|
||||||
|
rm -rf buildenv build dist *.spec
|
||||||
|
python -m venv buildenv
|
||||||
|
source buildenv/bin/activate
|
||||||
|
#pip install -r requirements.txt # more junk
|
||||||
|
CFLAGS="-g0 -Wl,--strip-all" \
|
||||||
|
pip install \
|
||||||
|
--no-cache-dir \
|
||||||
|
--compile \
|
||||||
|
--global-option=build_ext \
|
||||||
|
--global-option="-j 4" \
|
||||||
|
-r requirements.txt # cleaner (less junk)
|
||||||
|
pip install pyinstaller
|
||||||
|
|
||||||
|
pyinstaller --noconfirm --onefile --console --add-data services:services --name ai-suite-rocm_${VERSION}_linux_x86_64 "main.py"
|
||||||
|
deactivate
|
||||||
|
rm -rf buildenv
|
2
requirements.txt
Normal file
2
requirements.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
questionary~=2.0.1
|
||||||
|
psutil~=6.0.0
|
Loading…
Reference in New Issue
Block a user