Refactor build configuration to optimize Nuitka installation and remo… #5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| os: | |
| - ubuntu-latest | |
| - windows-latest | |
| - macos-latest | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: astral-sh/setup-uv@v6 | |
| - name: Install dependencies | |
| run: uv sync --no-dev | |
| - name: Install Nuitka extras | |
| run: uv add "nuitka[onefile]" | |
| # Linux/macOS | |
| - name: Build Unix | |
| if: runner.os != 'Windows' | |
| run: | | |
| uv run python -m nuitka \ | |
| --standalone \ | |
| --onefile \ | |
| --python-flag=-m \ | |
| --output-filename=crow-client \ | |
| src/client | |
| # Windows | |
| - name: Build Windows | |
| if: runner.os == 'Windows' | |
| shell: pwsh | |
| run: | | |
| uv run python -m nuitka ` | |
| --standalone ` | |
| --onefile ` | |
| --python-flag=-m ` | |
| --output-filename=crow-client ` | |
| src/client | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: crow-client-${{ runner.os }} | |
| path: | | |
| *.exe | |
| *.bin | |
| crow-client |