diff --git a/.flake8 b/.flake8 index c750ae3..22ef100 100644 --- a/.flake8 +++ b/.flake8 @@ -2,4 +2,6 @@ max-line-length = 110 exclude = .venv/* - app.build/* \ No newline at end of file + app.build/* + app.dist/* + app.onefile-build/* diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9db9755..7464a91 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,3 +25,22 @@ jobs: - name: Run flake8 run: | flake8 . + + multiarch-build: + runs-on: ubuntu-latest + strategy: + matrix: + arch: [amd64, arm64] + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Build Docker image + run: | + docker build --platform linux/${{ matrix.arch }} -t protodesk . diff --git a/.gitignore b/.gitignore index ca9982c..85a4aed 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,7 @@ .vscode/ .venv/ __pycache__/ +app.build/ +app.dist/ +app.onefile-build/ +protodesk diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..92838b4 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +FROM python:3.12-bullseye + +WORKDIR /app + +RUN apt-get update && apt-get install -y patchelf + +COPY . /app + +# create and activate a virtual environment +RUN python -m venv .venv && chmod +x .venv/bin/activate && .venv/bin/activate + +# install project dependencies +RUN pip3 install -r requirements.txt + +# build the app with Nuitka +RUN nuitka --enable-plugin=pyside6 --include-data-dir=./assets=./assets --standalone --onefile --lto=yes --output-filename=protodesk app.py diff --git a/requirements.txt b/requirements.txt index fb16300..746f89a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,6 @@ flake8==7.1.1 mccabe==0.7.0 +Nuitka==2.5 ordered-set==4.1.0 pycodestyle==2.12.1 pyflakes==3.2.0