Skip to content

Commit 714f1df

Browse files
committed
workflows: Build CLI for ARM64 Windows
1 parent 557ec2a commit 714f1df

File tree

9 files changed

+1823
-3
lines changed

9 files changed

+1823
-3
lines changed

.github/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
ROOT = $(dir $(realpath $(firstword $(MAKEFILE_LIST))))
44

5-
all: workflows/nightly.yml workflows/release.yml workflows/testing.yml
5+
all: workflows/nightly.yml workflows/release.yml workflows/testing.yml workflows/dryrun.yml
66

77
workflows/%.yml: workflows.src/%.tpl.yml workflows.src/%.targets.yml workflows.src/build.inc.yml
88
$(ROOT)/workflows.src/render.py $* $*.targets.yml

.github/workflows.src/build.inc.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
default: "master"
1010
<%- endmacro %>
1111

12-
<% macro workflow(targets, subdist="", publish_all=True) %>
12+
<% macro workflow(targets, subdist="", publish_all=True, dryrun=False) %>
1313
prep:
1414
runs-on: ubuntu-latest
1515
outputs:
@@ -213,7 +213,7 @@
213213
<% for tgt in targets.win %>
214214
<% set plat_id = tgt.platform + ("{}".format(tgt.platform_libc) if tgt.platform_libc else "") + ("-{}".format(tgt.platform_version) if tgt.platform_version else "") %>
215215
build-<< tgt.name >>:
216-
runs-on: windows-2025
216+
runs-on: << "windows-11-arm" if tgt.arch == "aarch64" else "windows-2025" >>
217217
needs: prep
218218
<% if subdist == "nightly" %>
219219
if: needs.prep.outputs.if_<< tgt.name.replace('-', '_') >> == 'true'
@@ -231,6 +231,10 @@
231231
with:
232232
toolchain: 1.88
233233

234+
- name: Install Zstandard
235+
run: |
236+
winget install Meta.Zstandard --disable-interactivity --accept-source-agreements
237+
234238
- name: Set up Python
235239
uses: actions/setup-python@v4
236240
with:
@@ -284,6 +288,7 @@
284288
- run: echo 'All builds passed, ready to publish now!'
285289
<%- endif %>
286290

291+
<% if not dryrun %>
287292
<% for tgt in targets.linux %>
288293
<% set plat_id = tgt.platform + ("{}".format(tgt.platform_libc) if tgt.platform_libc else "") + ("-{}".format(tgt.platform_version) if tgt.platform_version else "") %>
289294
publish-<< tgt.name >>:
@@ -524,4 +529,5 @@
524529
<%- endfor %>subdist=<< subdist >>
525530
platforms: << docker_tgts|map(attribute="docker_arch")|join(",") >>
526531
<% endif %>
532+
<% endif %>
527533
<%- endmacro %>

.github/workflows.src/build.targets.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,3 +141,8 @@ targets:
141141
platform: win
142142
platform_version: x86_64
143143
arch: x86_64
144+
145+
- name: win-aarch64
146+
platform: win
147+
platform_version: aarch64
148+
arch: aarch64
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
build.targets.yml
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<% from "build.inc.yml" import workflow, workflow_dispatch -%>
2+
name: Package Build Dry Run
3+
4+
on:
5+
<<- workflow_dispatch() ->>
6+
7+
jobs:
8+
<<- workflow(targets, subdist="nightly", dryrun=True) ->>

0 commit comments

Comments
 (0)