From f6c013d5ee1ea00c597efd53eb2ef88bc74d3892 Mon Sep 17 00:00:00 2001 From: NinjaCheetah <58050615+NinjaCheetah@users.noreply.github.com> Date: Sun, 23 Jun 2024 19:35:01 -0400 Subject: [PATCH] Add GitHub Actions workflow to build with Nuitka --- .github/workflows/python-build.yaml | 97 +++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 .github/workflows/python-build.yaml diff --git a/.github/workflows/python-build.yaml b/.github/workflows/python-build.yaml new file mode 100644 index 0000000..2700a79 --- /dev/null +++ b/.github/workflows/python-build.yaml @@ -0,0 +1,97 @@ +# This workflow will install Python dependencies, run tests and lint with a single version of Python +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: Python application + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +permissions: + contents: read + +jobs: + build-linux: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Install ccache for Nuitka + run: sudo apt update && sudo apt install -y ccache libicu70 + - name: Set up Python 3.11 + uses: actions/setup-python@v5 + with: + python-version: "3.11" + - name: Install Dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Build Package + run: | + nuitka3 --show-progress --assume-yes-for-downloads --onefile wiipy.py + - name: Prepare Package for Upload + run: | + mv wiipy.bin ~/wiipy + cd ~ + tar cvf WiiPy.tar wiipy + - name: Upload Package + uses: actions/upload-artifact@v4.3.0 + with: + path: ~/WiiPy.tar + name: WiiPy-linux-bin + + build-macos: + + runs-on: macos-12 + + steps: + - uses: actions/checkout@v4 + - name: Set up Python 3.11 + uses: actions/setup-python@v5 + with: + python-version: "3.11" + - name: Install Dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Build Package + run: | + nuitka3 --show-progress --assume-yes-for-downloads --standalone wiipy.py + - name: Prepare Package for Upload + run: | + mv wiipy.bin ~/wiipy + cd ~ + tar cvf WiiPy.tar wiipy + - name: Upload Package + uses: actions/upload-artifact@v4.3.0 + with: + path: ~/WiiPy.tar + name: WiiPy-macos-bin + + build-windows: + + runs-on: windows-latest + + steps: + - uses: actions/checkout@v4 + - name: Enable Developer Command Prompt + uses: ilammy/msvc-dev-cmd@v1.13.0 + - name: Set up Python 3.11 + uses: actions/setup-python@v5 + with: + python-version: "3.11" + - name: Install Dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Build Package + run: | + nuitka --show-progress --assume-yes-for-downloads --onefile wiipy.py + - name: Upload Package + uses: actions/upload-artifact@v4.3.0 + with: + path: D:\a\WiiPy\WiiPy\wiipy.exe + name: WiiPy-windows-bin