Skip to content

Commit

Permalink
Wire up inspection testing into CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisPenner committed Nov 27, 2024
1 parent 73c1b9d commit 1e9f863
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/bundle-ucm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ jobs:
--ghc-options='-O2' \
--local-bin-path ucm-bin \
--copy-bins \
--flag unison-runtime:optchecks \
&& break;
done
Expand Down
11 changes: 9 additions & 2 deletions unison-runtime/package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ flags:
stackchecks:
manual: true
default: false

# Run optimization assertion tests, make sure this runs with O2
optchecks:
manual: true
default: false

# Dumps core for debugging to unison-runtime/.stack-work/dist/<arch>/ghc-x.y.z/build/
dumpcore:
manual: true
default: false
Expand All @@ -21,9 +28,9 @@ when:
cpp-options: -DARRAY_CHECK
- condition: flag(stackchecks)
cpp-options: -DSTACK_CHECK
# Run optimization assertion tests, make sure this runs with O2
- condition: flag(optchecks)
ghc-options: -O2 -DOPT_CHECK
ghc-options: -O2
cpp-options: -DOPT_CHECK
- condition: flag(dumpcore)
ghc-options: -ddump-simpl -ddump-stg-final -ddump-to-file -dsuppress-coercions -dsuppress-idinfo -dsuppress-module-prefixes -ddump-str-signatures -ddump-simpl-stats # -dsuppress-type-applications -dsuppress-type-signatures

Expand Down
10 changes: 10 additions & 0 deletions unison-runtime/unison-runtime.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ flag dumpcore
manual: True
default: False

flag optchecks
manual: True
default: False

flag stackchecks
manual: True
default: False
Expand Down Expand Up @@ -148,6 +152,9 @@ library
cpp-options: -DARRAY_CHECK
if flag(stackchecks)
cpp-options: -DSTACK_CHECK
if flag(optchecks)
ghc-options: -O2
cpp-options: -DOPT_CHECK
if flag(dumpcore)
ghc-options: -ddump-simpl -ddump-stg-final -ddump-to-file -dsuppress-coercions -dsuppress-idinfo -dsuppress-module-prefixes -ddump-str-signatures -ddump-simpl-stats

Expand Down Expand Up @@ -232,5 +239,8 @@ test-suite runtime-tests
cpp-options: -DARRAY_CHECK
if flag(stackchecks)
cpp-options: -DSTACK_CHECK
if flag(optchecks)
ghc-options: -O2
cpp-options: -DOPT_CHECK
if flag(dumpcore)
ghc-options: -ddump-simpl -ddump-stg-final -ddump-to-file -dsuppress-coercions -dsuppress-idinfo -dsuppress-module-prefixes -ddump-str-signatures -ddump-simpl-stats

0 comments on commit 1e9f863

Please sign in to comment.