forked from digital-asset/daml
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: test for platform independent dars (digital-asset#10535)
We add a CI test to check that dars don't depend on the underlying operating system where the dar is build. CHANGELOG_BEGIN CHANGELOG_END
- Loading branch information
Robin Krom
authored
Aug 17, 2021
1 parent
3822a8c
commit 0c18785
Showing
9 changed files
with
124 additions
and
3 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
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Copyright (c) 2021 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
parameters: | ||
platform: '' | ||
|
||
steps: | ||
- task: PublishBuildArtifacts@1 | ||
inputs: | ||
pathtoPublish: bazel-bin/compiler/damlc/tests/platform-independence.dar | ||
artifactName: platform-independence-dar-${{parameters.platform}} | ||
|
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
-- Copyright (c) 2021 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. | ||
-- SPDX-License-Identifier: Apache-2.0 | ||
|
||
module PlatformIndependence where | ||
|
||
import DA.Stack | ||
|
||
type AssetId = ContractId Asset | ||
|
||
data ADT | ||
= Foo | ||
| Bar | ||
| Baz | ||
|
||
give : HasCallStack => Party -> Party -> Text -> Update (ContractId Asset) | ||
give issuer owner name = do | ||
let fs = [ srcLocFile srcLoc | (_t, srcLoc) <- getCallStack callStack] | ||
trace (show fs) $ create Asset{..} | ||
|
||
incompletePattternMatch : ADT -> Update () | ||
incompletePattternMatch adt = | ||
case adt of | ||
Foo -> pure () | ||
Bar -> pure () | ||
|
||
template Asset | ||
with | ||
issuer : Party | ||
owner : Party | ||
name : Text | ||
where | ||
ensure name /= "" | ||
signatory issuer | ||
controller owner can | ||
Give : AssetId | ||
with | ||
newOwner : Party | ||
do | ||
incompletePattternMatch Baz | ||
create this with | ||
owner = newOwner |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
../lib/dade-exec-nix-tool |
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