Skip to content

Commit 12b6934

Browse files
authored
ci(release): fix MSI release build rootfs path (runfinch#1009)
Issue #, if available: - MSI release builds are broken, as seen in [this automated run](https://github.com/runfinch/finch/actions/runs/9764308833/job/26959973907) - Debugged by looking at the lima stderr logs and found: ``` {"level":"fatal","msg":"failed to download \"file://C:/actions-runner/_work/finch/finch/_output/os/finch-rootfs-production-amd64-1719439880.tar.gz\": open C:/actions-runner/_work/finch/finch/_output/os/finch-rootfs-production-amd64-1719439880.tar.gz: The system cannot find the path specified.","time":"2024-07-02T19:14:36Z"} ``` *Description of changes:* - This regression occurred because `FINCH_ROOTFS_LOCATION_ROOT` was removed from the Makefile during recent refactoring. `FINCH_ROOTFS_LOCATION_ROOT` was used to override the path of the rootfs file used at runtime by Lima. Removing it means that release builds, which are installed to different locations than dev builds, will not function. This PR makes it so Windows follows the macOS Makefile variable name (`FINCH_OS_IMAGE_LOCATION_ROOT`), as seen in runfinch#1007 *Testing done:* - [x] I've reviewed the guidance in CONTRIBUTING.md #### License Acceptance By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. --------- Signed-off-by: Justin Alvarez <[email protected]>
1 parent 9b2daf5 commit 12b6934

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

.github/workflows/build-and-test-msi.yaml

+5-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ name: Build, test and upload .msi to S3
33
# TODO: add scheduler and tests
44
on:
55
workflow_dispatch:
6+
inputs:
7+
ref_name:
8+
required: true
9+
type: string
610
workflow_call:
711
inputs:
812
ref_name:
@@ -92,7 +96,7 @@ jobs:
9296
cd deps/finch-core && make clean
9397
- name: Build project
9498
run: |
95-
make FINCH_ROOTFS_LOCATION_ROOT=/__INSTALLFOLDER__
99+
make FINCH_OS_IMAGE_LOCATION_ROOT=__INSTALLFOLDER__
96100
- name: generate and download signed msi
97101
run: |
98102
$version="${{ needs.get-tag-name.outputs.version }}"

Makefile.darwin

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ FINCH_OS_BASENAME=$(AARCH64_ARTIFACT)
1212
FINCH_OS_DIGEST=$(AARCH64_512_DIGEST)
1313
endif
1414

15-
# This variable is used to generate release builds, where the OS iamge path should be overwritten
15+
# This variable is used to generate release builds, where the OS image path should be overwritten
1616
# to /Applications/Finch/...
1717
FINCH_OS_IMAGE_LOCATION_ROOT ?= $(DEST)
1818
FINCH_IMAGE_LOCATION := $(FINCH_OS_IMAGE_LOCATION_ROOT)/os/$(FINCH_OS_BASENAME)

Makefile.windows

+4-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ else
1111
$(error Finch on Windows ARM not supported)
1212
endif
1313

14-
FINCH_IMAGE_LOCATION := $(OS_OUTDIR)/$(FINCH_ROOTFS_BASENAME)
14+
# This variable is used to generate release builds, where the OS rootfs path should be overwritten
15+
# to C:/Program Files/Finch/...
16+
FINCH_OS_IMAGE_LOCATION_ROOT ?= $(OUTDIR)
17+
FINCH_IMAGE_LOCATION := $(FINCH_OS_IMAGE_LOCATION_ROOT)/os/$(FINCH_ROOTFS_BASENAME)
1518
FINCH_IMAGE_DIGEST := "sha512:$(FINCH_ROOTFS_DIGEST)"
1619

1720
$(OS_OUTDIR)/finch.yaml: $(OS_OUTDIR) finch.yaml.d/common.yaml finch.yaml.d/windows.yaml

msi-builder/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Finch Windows MSI Tool to generate MSI installer from Finch build
44

55
## Instructions
66

7-
[1] Build finch: `make FINCH_ROOTFS_LOCATION_ROOT=/__INSTALLFOLDER__`
7+
[1] Build finch: `make FINCH_OS_IMAGE_LOCATION_ROOT=__INSTALLFOLDER__`
88

99
- It will inject the placeholder `__INSTALLFOLDER__` into `os\finch.yaml` for the rootfs location
1010

0 commit comments

Comments
 (0)