diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml new file mode 100644 index 0000000..62e2b99 --- /dev/null +++ b/.github/workflows/build-release.yml @@ -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/* \ No newline at end of file diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..5af54fa --- /dev/null +++ b/build.sh @@ -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 \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..9a6aae3 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +questionary~=2.0.1 +psutil~=6.0.0 \ No newline at end of file