-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Updates to use shared makefile (#129)
- Loading branch information
Showing
6 changed files
with
30 additions
and
533 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,97 +1,13 @@ | ||
# Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
DAFNY_ROOT := $(shell pwd) | ||
CORES=2 | ||
|
||
# Note: This build target fails. polymorph.smithydafny does not support generation for BigDecimal types. | ||
polymorph_dafny : | ||
cd ../../../smithy-polymorph;\ | ||
./gradlew run --args="\ | ||
--output-dafny \ | ||
--include-dafny $(DAFNY_ROOT)/../../dafny-dependencies/StandardLibrary/src/Index.dfy \ | ||
--model $(DAFNY_ROOT)/Model \ | ||
--dependent-model $(DAFNY_ROOT)/../../dafny-dependencies/Model \ | ||
--namespace simple.types.bigDecimal"; \ | ||
./gradlew run --args="\ | ||
--output-dafny \ | ||
--output-local-service-test $(DAFNY_ROOT)/Model \ | ||
--include-dafny $(DAFNY_ROOT)/../../dafny-dependencies/StandardLibrary/src/Index.dfy \ | ||
--model $(DAFNY_ROOT)/Model \ | ||
--dependent-model $(DAFNY_ROOT)/../../dafny-dependencies/Model \ | ||
--namespace simple.types.bigDecimal"; \ | ||
include ../../SharedMakefile.mk | ||
|
||
# Note: This build target fails. polymorph.smithydotnet does not support generation for BigDecimal types. | ||
polymorph_net : | ||
cd ../../../smithy-polymorph;\ | ||
./gradlew run --args="\ | ||
--output-dafny \ | ||
--include-dafny $(DAFNY_ROOT)/../../dafny-dependencies/StandardLibrary/src/Index.dfy \ | ||
--output-dotnet $(DAFNY_ROOT)/runtimes/net/Generated/ \ | ||
--model $(DAFNY_ROOT)/Model \ | ||
--dependent-model $(DAFNY_ROOT)/../../dafny-dependencies/Model \ | ||
--namespace simple.types.bigDecimal"; \ | ||
./gradlew run --args="\ | ||
--output-dafny \ | ||
--output-local-service-test $(DAFNY_ROOT)/Model \ | ||
--include-dafny $(DAFNY_ROOT)/../../dafny-dependencies/StandardLibrary/src/Index.dfy \ | ||
--output-dotnet $(DAFNY_ROOT)/runtimes/net/Generated/Wrapped \ | ||
--model $(DAFNY_ROOT)/Model \ | ||
--dependent-model $(DAFNY_ROOT)/../../dafny-dependencies/Model \ | ||
--namespace simple.types.bigDecimal"; \ | ||
|
||
verify: | ||
dafny \ | ||
-vcsCores:$(CORES) \ | ||
-compile:0 \ | ||
-definiteAssignment:3 \ | ||
-verificationLogger:csv \ | ||
-timeLimit:300 \ | ||
-trace \ | ||
`find . -name '*.dfy'` | ||
|
||
dafny-reportgenerator: | ||
dafny-reportgenerator \ | ||
summarize-csv-results \ | ||
--max-resource-count 10000000 \ | ||
TestResults/*.csv | ||
|
||
transpile_net: | transpile_implementation_net transpile_test_net transpile_net_dependencies | ||
|
||
transpile_implementation_net: | ||
dafny \ | ||
-vcsCores:$(CORES) \ | ||
-compileTarget:cs \ | ||
-spillTargetCode:3 \ | ||
-runAllTests:1 \ | ||
-compile:0 \ | ||
-optimizeErasableDatatypeWrapper:0 \ | ||
-useRuntimeLib \ | ||
-out runtimes/net/ImplementationFromDafny \ | ||
./src/Index.dfy \ | ||
-library:../../dafny-dependencies/StandardLibrary/src/Index.dfy \ | ||
|
||
|
||
transpile_test_net: | ||
dafny \ | ||
-vcsCores:$(CORES) \ | ||
-compileTarget:cs \ | ||
-spillTargetCode:3 \ | ||
-runAllTests:1 \ | ||
-compile:0 \ | ||
-optimizeErasableDatatypeWrapper:0 \ | ||
-useRuntimeLib \ | ||
-out runtimes/net/tests/TestsFromDafny \ | ||
`find ./test -name '*.dfy'` \ | ||
-library:src/Index.dfy | ||
NAMESPACE=simple.types.bigDecimal | ||
|
||
# This project has no dependencies | ||
# DEPENDENT-MODELS:= | ||
# LIBRARIES := | ||
transpile_net_dependencies: | ||
$(MAKE) -C ../../dafny-dependencies/StandardLibrary transpile_implementation_net \ | ||
|
||
test_net: | ||
dotnet run \ | ||
--project runtimes/net/tests/ \ | ||
--framework net6.0 | ||
|
||
setup_net: | ||
dotnet restore runtimes/net/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.