Skip to content

Commit e2903c2

Browse files
feat: improve CLI build (#218)
* add * Update build-cli.yml * add * Update build-cli.yml Update build-cli.yml Update build-cli.yml
1 parent d65fcd5 commit e2903c2

2 files changed

Lines changed: 33 additions & 1 deletion

File tree

.github/workflows/build-cli.yml

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414
workflow_dispatch:
1515

1616
jobs:
17-
build-docker:
17+
build-linux:
1818
runs-on: ubuntu-latest
1919
defaults:
2020
run:
@@ -31,4 +31,35 @@ jobs:
3131
run: uv sync --frozen
3232

3333
- name: Build
34+
run: uv run poe nuitka-linux
35+
36+
- name: Upload Linux CLI artifact
37+
uses: actions/upload-artifact@v4
38+
with:
39+
name: cli-linux
40+
path: ./src/cli/app.bin
41+
42+
build-windows:
43+
runs-on: windows-latest
44+
defaults:
45+
run:
46+
working-directory: ./src/cli
47+
48+
steps:
49+
- name: Checkout repository
50+
uses: actions/checkout@v6
51+
52+
- name: Install uv
53+
uses: astral-sh/setup-uv@v7
54+
55+
- name: Install deps with uv
56+
run: uv sync --frozen
57+
58+
- name: Build (Windows) via poe
3459
run: uv run poe nuitka
60+
61+
- name: Upload Windows CLI artifact
62+
uses: actions/upload-artifact@v4
63+
with:
64+
name: cli-windows
65+
path: ./src/cli/app.exe

src/cli/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ dev = ["poethepoet>=0.39.0"]
2323
[tool.poe.tasks]
2424
# Is not possible to build due to type hint error
2525
nuitka = "nuitka --standalone --onefile --clang --lto=yes --python-flag=-m --python-flag=-OO --disable-bytecode-cache ./app"
26+
nuitka-linux = "nuitka --standalone --onefile --clang --lto=yes --python-flag=-m --python-flag=-OO --disable-bytecode-cache ./app"
2627
nuitka-debug = "nuitka --standalone --onefile --clang --lto=yes --debug --python-flag=-m --python-flag=-OO --disable-bytecode-cache ./app"
2728

2829

0 commit comments

Comments
 (0)