Skip to content

Commit 1a4b167

Browse files
feat: start exporting for arm (#469)
* initial test for arm build Update build-cli.yml Update pyproject.toml Update uv.lock * Update pyproject.toml
1 parent be69bcd commit 1a4b167

4 files changed

Lines changed: 111 additions & 108 deletions

File tree

.github/workflows/build-cli.yml

Lines changed: 39 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,30 @@ on:
1414
workflow_dispatch:
1515

1616
jobs:
17-
build-linux:
18-
runs-on: ubuntu-latest
17+
build:
18+
name: Build (${{ matrix.target }})
19+
runs-on: ${{ matrix.os }}
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
include:
24+
# Linux AMD64
25+
- os: ubuntu-latest
26+
target: linux-amd64
27+
build_cmd: nuitka-linux
28+
# Linux ARM64
29+
- os: ubuntu-latest-arm
30+
target: linux-arm64
31+
build_cmd: nuitka-linux
32+
# Windows AMD64
33+
- os: windows-latest
34+
target: windows-amd64
35+
build_cmd: nuitka-windows
36+
# Windows ARM64
37+
- os: windows-11-arm
38+
target: windows-arm64
39+
build_cmd: nuitka-windows
40+
1941
defaults:
2042
run:
2143
working-directory: ./src/cli
@@ -25,68 +47,33 @@ jobs:
2547
uses: actions/checkout@v6
2648

2749
- name: Install uv
28-
uses: astral-sh/setup-uv@v7
50+
uses: astral-sh/setup-uv@v5
2951

3052
- name: Install deps with uv
3153
run: uv sync --frozen
3254

33-
- name: Build
34-
run: uv run poe nuitka-linux
55+
- name: Build Binary
56+
run: uv run poe ${{ matrix.build_cmd }}
3557

3658
- name: Show build outputs
37-
run: ls -la
59+
shell: bash # Use bash for consistent listing across OS
60+
run: ls -R .
3861

39-
- name: Verify Linux artifact exists
62+
- name: Verify artifact exists
63+
shell: bash
4064
run: |
4165
if ! ls ./app* >/dev/null 2>&1; then
4266
echo "No artifact found"; exit 1
4367
else
4468
echo "Found artifact(s):"; ls ./app*
4569
fi
4670
47-
- name: Upload Linux CLI artifact
48-
uses: actions/upload-artifact@v7
49-
with:
50-
name: cli-linux
51-
path: ./src/cli/**/app*
52-
53-
build-windows:
54-
runs-on: windows-latest
55-
defaults:
56-
run:
57-
working-directory: ./src/cli
58-
59-
steps:
60-
- name: Checkout repository
61-
uses: actions/checkout@v6
62-
63-
- name: Install uv
64-
uses: astral-sh/setup-uv@v7
65-
66-
- name: Install deps with uv
67-
run: uv sync --frozen
68-
69-
- name: Build (Windows) via poe
70-
run: uv run poe nuitka-windows
71-
72-
- name: Show build outputs
73-
run: |
74-
Get-ChildItem -Path . -Recurse -File | Select-Object FullName
75-
shell: powershell
76-
77-
- name: Verify Windows artifact exists
78-
run: |
79-
$files = Get-ChildItem -Path . -Filter 'app*.exe' -Recurse -File
80-
if ($files.Count -eq 0) {
81-
Write-Error 'No exe found'
82-
exit 1
83-
} else {
84-
$files | ForEach-Object { Write-Host "Found: $($_.FullName)" }
85-
}
86-
shell: powershell
87-
88-
- name: Upload Windows CLI artifact
89-
uses: actions/upload-artifact@v7
71+
- name: Upload CLI artifact
72+
uses: actions/upload-artifact@v4
9073
with:
91-
name: cli-windows
92-
path: ./src/cli/**/app*.exe
74+
name: cli-${{ matrix.target }}
75+
path: |
76+
src/cli/app
77+
src/cli/app.bin
78+
src/cli/app.exe
79+
if-no-files-found: error

.github/workflows/release-cli.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,28 @@ jobs:
1212
strategy:
1313
matrix:
1414
include:
15+
# Linux
1516
- os: ubuntu-latest
16-
target: linux
17+
target: linux-amd64
1718
asset_name: chithi-cli-linux-amd64
1819
build_cmd: nuitka-linux
20+
21+
- os: ubuntu-24.04-arm
22+
target: linux-arm64
23+
asset_name: chithi-cli-linux-arm64
24+
build_cmd: nuitka-linux
25+
26+
# Windows
1927
- os: windows-latest
20-
target: windows
28+
target: windows-amd64
2129
asset_name: chithi-cli-windows-amd64.exe
2230
build_cmd: nuitka-windows
2331

32+
- os: windows-11-arm
33+
target: windows-arm64
34+
asset_name: chithi-cli-windows-arm64.exe
35+
build_cmd: nuitka-windows
36+
2437
runs-on: ${{ matrix.os }}
2538

2639
steps:

src/cli/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ dependencies = [
1010
# Http Client
1111
"requests>=2.32.0",
1212
# Encryption (AES-256-GCM + Argon2id KDF)
13-
"cryptography>=44.0.0",
13+
"cryptography==46.0.3",
1414
# ZIP with WinZip AES-256 support (matches web front-end)
1515
"pyzipper>=0.3.6",
1616
# Progress bars
@@ -31,7 +31,7 @@ build = ["nuitka>=2.8.9", "zstandard>=0.25.0"]
3131
dev = ["poethepoet>=0.39.0"]
3232

3333
[tool.poe.tasks]
34-
nuitka-windows = "nuitka --standalone --onefile --clang --lto=yes --python-flag=-m --python-flag=-OO --disable-bytecode-cache --assume-yes-for-downloads --windows-icon-from-ico=./assets/logo.ico ./app"
34+
nuitka-windows = "nuitka --standalone --onefile --lto=yes --python-flag=-m --python-flag=-OO --disable-bytecode-cache --assume-yes-for-downloads --windows-icon-from-ico=./assets/logo.ico ./app"
3535
nuitka-linux = "nuitka --standalone --onefile --clang --lto=yes --python-flag=-m --python-flag=-OO --disable-bytecode-cache --assume-yes-for-downloads ./app"
3636
nuitka-debug = "nuitka --standalone --onefile --clang --lto=yes --debug --python-flag=-m --python-flag=-OO --disable-bytecode-cache --assume-yes-for-downloads ./app"
3737

0 commit comments

Comments
 (0)