From 67c493f1a85b2eeb7b55d6863d771c84e88bed18 Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Sat, 27 Apr 2024 17:43:58 +1000 Subject: [PATCH] Fix example building --- v3/Taskfile.yaml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/v3/Taskfile.yaml b/v3/Taskfile.yaml index 98c76dfb4..4c0d4e28d 100644 --- a/v3/Taskfile.yaml +++ b/v3/Taskfile.yaml @@ -132,8 +132,10 @@ tasks: - task: format # - task: docs:update:api - test:example: + test:example:darwin: dir: 'examples/{{.DIR}}' + platforms: + - darwin cmds: - echo "Building example {{.DIR}}" - go mod tidy @@ -142,6 +144,16 @@ tasks: CGO_LDFLAGS: -framework UniformTypeIdentifiers -mmacosx-version-min=10.13 CGO_CFLAGS: -mmacosx-version-min=10.13 + test:example:notdarwin: + dir: 'examples/{{.DIR}}' + platforms: + - linux + - windows + cmds: + - echo "Building example {{.DIR}}" + - go mod tidy + - go build -o "testbuild-{{.DIR}}{{exeExt}}" + test:examples: summary: Builds the examples @@ -169,6 +181,10 @@ tasks: wml cmds: - for: { var: EXAMPLEDIRS } - task: test:example + task: test:example:darwin + vars: + DIR: "{{.ITEM}}" + - for: { var: EXAMPLEDIRS } + task: test:example:notdarwin vars: DIR: "{{.ITEM}}"