AtlatestRepositorysigil-geometry

sigil-geometry / tree / harnesspackage.sgl

1;;; sigil-geometry-harness - run sigil-geometry's tests on every target
2;;;
3;;; Not part of the library. A small app that compiles the package's
4;;; test files (turned into libraries by scripts/check-targets) together
5;;; with an allocation check of every `!` form, so the same code runs as
6;;; bytecode (dev), a native ELF (release) and native wasm (web).
7;;;
8;;; Use scripts/check-targets from the package root rather than building
9;;; this directly: it generates src/geometry-harness/suite/ first.
11(package
12 name: "sigil-geometry-harness"
13 version: "0.0.0"
14 sigil: "0.22"
15 description: "Target harness for sigil-geometry (tests and allocation check)"
16 license: "BSD-3-Clause"
17 entry: '(geometry-harness main)
18 bundle-name: "geometry-harness"
20 configs: (list
21 (config name: 'dev output-dir: "build/dev" debug?: #t optimize: 0 bundle?: #t)
22 (config name: 'release output-dir: "build/release" debug?: #f optimize: 2
23 backend: 'native bundle?: #t)
24 (config name: 'web output-dir: "build/web" toolchain: 'zig target: "wasm32-wasi"
25 backend: 'native debug?: #f optimize: 2 bundle?: #t features: '(web wasm)))
27 dependencies: (list
28 (from-path dir: ".." package: "sigil-geometry")
29 (from-git url: "codeberg:sigil/sigil" package: "sigil-test" version: ">=0.22.5")
30 (from-git url: "codeberg:sigil/sigil" package: "sigil-wasm-runtime" version: ">=0.22.5"
31 configs: '(web)))
33 tasks: (list
34 (task
35 name: 'build
36 description: "Compile the harness (and link the wasm on the web config)"
37 steps: (list
38 (compile-sigil-modules sources: "src/**/*.sgl")
39 (lambda (ctx)
40 (if (memq (target-os ctx) '(wasm wasi))
41 ((link-web-application name: "geometry-harness") ctx)
42 ctx))))))