Corrected mistakes
This commit is contained in:
@@ -7,83 +7,66 @@ on:
|
|||||||
- completed
|
- completed
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-x86_64:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
arch: [x86_64, arm64]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python (x86_64)
|
||||||
|
if: matrix.arch == 'x86_64'
|
||||||
uses: actions/setup-python@v6
|
uses: actions/setup-python@v6
|
||||||
with:
|
with:
|
||||||
python-version: '3.14'
|
python-version: '3.14'
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install QEMU (arm)
|
||||||
run: |
|
if: matrix.arch == 'arm64'
|
||||||
python -m pip install --upgrade pip
|
|
||||||
pip install -r requirements.txt
|
|
||||||
|
|
||||||
- name: Build with PyInstaller
|
|
||||||
run: |
|
|
||||||
cd app
|
|
||||||
pyinstaller --onefile --add-data "ui:ui" wolServer.py
|
|
||||||
|
|
||||||
- name: Upload x86_64 Artifact
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: executable-x86_64
|
|
||||||
path: app/dist/wolServer
|
|
||||||
|
|
||||||
build-arm:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v5
|
|
||||||
|
|
||||||
- name: Install QEMU
|
|
||||||
uses: docker/setup-qemu-action@v3
|
uses: docker/setup-qemu-action@v3
|
||||||
with:
|
with:
|
||||||
platforms: arm64
|
platforms: arm64
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx (arm)
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
with:
|
with:
|
||||||
platforms: linux/arm64
|
platforms: linux/arm64
|
||||||
|
|
||||||
- name: Build ARM Executable
|
- name: Build Executable
|
||||||
run: |
|
run: |
|
||||||
docker buildx build --platform linux/arm64/v8 -t arm-builder --load --file - . <<EOF
|
if [ "${{ matrix.arch }}" = "x86_64" ]; then
|
||||||
FROM arm64v8/python:3.13-slim-bullseye
|
pip install -r requirements.txt
|
||||||
WORKDIR /app
|
cd app
|
||||||
COPY requirements.txt /app/requirements.txt
|
pyinstaller --onefile --add-data "ui:ui" wolServer.py
|
||||||
COPY app /app/app
|
else
|
||||||
ENV PIP_ROOT_USER_ACTION=ignore
|
docker buildx build --platform linux/arm64/v8 -t arm-builder --load --file - . <<EOF
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
FROM arm64v8/python:3.13-slim-bullseye
|
||||||
binutils \
|
WORKDIR /app
|
||||||
&& pip install -r /app/requirements.txt \
|
COPY requirements.txt /app/requirements.txt
|
||||||
&& cd /app/app \
|
COPY app /app/app
|
||||||
&& pyinstaller --onefile --add-data "ui:ui" wolServer.py
|
ENV PIP_ROOT_USER_ACTION=ignore
|
||||||
EOF
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
|
binutils \
|
||||||
|
&& pip install -r /app/requirements.txt \
|
||||||
|
&& cd /app/app \
|
||||||
|
&& pyinstaller --onefile --add-data "ui:ui" wolServer.py
|
||||||
|
EOF
|
||||||
|
mkdir -p app/dist
|
||||||
|
container_id=$(docker create --platform linux/arm64/v8 arm-builder)
|
||||||
|
docker cp $container_id:/app/app/dist/wolServer app/dist/wolServer
|
||||||
|
docker rm $container_id
|
||||||
|
fi
|
||||||
|
|
||||||
- name: Create Dist Directory
|
- name: Upload Artifact
|
||||||
run: mkdir -p app/dist
|
|
||||||
|
|
||||||
- name: Extract ARM Executable
|
|
||||||
run: |
|
|
||||||
container_id=$(docker create --platform linux/arm64/v8 arm-builder)
|
|
||||||
docker cp $container_id:/app/app/dist/wolServer app/dist/wolServer
|
|
||||||
docker rm $container_id
|
|
||||||
|
|
||||||
- name: Upload ARM Artifact
|
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: executable-arm
|
name: executable-${{ matrix.arch }}
|
||||||
path: app/dist/wolServer
|
path: app/dist/wolServer
|
||||||
|
|
||||||
release:
|
release:
|
||||||
needs: [build-x86_64, build-arm]
|
needs: build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
@@ -93,31 +76,17 @@ jobs:
|
|||||||
- name: Create Dist Directory
|
- name: Create Dist Directory
|
||||||
run: mkdir -p app/dist
|
run: mkdir -p app/dist
|
||||||
|
|
||||||
- name: Download x86_64 Artifact
|
- name: Download Artifacts
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: executable-x86_64
|
|
||||||
path: app/dist
|
path: app/dist
|
||||||
|
|
||||||
- name: Verify x86_64 Artifact
|
- name: Rename Artifacts
|
||||||
run: ls -la app/dist
|
run: |
|
||||||
|
mv app/dist/executable-x86_64/wolServer app/dist/wolServer-x86_64 || true
|
||||||
|
mv app/dist/executable-arm64/wolServer app/dist/wolServer-arm || true
|
||||||
|
|
||||||
- name: Rename x86_64 Artifact
|
- name: Generate Tag
|
||||||
run: mv app/dist/wolServer app/dist/wolServer-x86_64
|
|
||||||
|
|
||||||
- name: Download ARM Artifact
|
|
||||||
uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
name: executable-arm
|
|
||||||
path: app/dist
|
|
||||||
|
|
||||||
- name: Verify ARM Artifact
|
|
||||||
run: ls -la app/dist
|
|
||||||
|
|
||||||
- name: Rename ARM Artifact
|
|
||||||
run: mv app/dist/wolServer app/dist/wolServer-arm
|
|
||||||
|
|
||||||
- name: Generate Tag Name
|
|
||||||
id: tag
|
id: tag
|
||||||
run: echo "TAG=v$(TZ='Europe/Athens' date +'%d%m%Y%H%M%S')" >> $GITEA_ENV
|
run: echo "TAG=v$(TZ='Europe/Athens' date +'%d%m%Y%H%M%S')" >> $GITEA_ENV
|
||||||
|
|
||||||
@@ -130,10 +99,10 @@ jobs:
|
|||||||
body: "Automated push release"
|
body: "Automated push release"
|
||||||
token: ${{ secrets.mytoken }}
|
token: ${{ secrets.mytoken }}
|
||||||
files: |-
|
files: |-
|
||||||
app/dist/**
|
app/dist/wolServer-*
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
needs: [release]
|
needs: release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
Reference in New Issue
Block a user