2020-04-24 15:43:35 +03:00
|
|
|
#!/usr/bin/env bash
|
2023-01-04 20:21:15 +03:00
|
|
|
# Copyright (c) 2023 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
2020-04-24 15:43:35 +03:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
|
|
|
|
|
|
|
# Build the release artifacts required for running the compatibility
|
|
|
|
# tests against HEAD. At the moment this includes the SDK release tarball
|
|
|
|
# and the ledger-api-test-tool fat JAR.
|
|
|
|
|
|
|
|
set -eou pipefail
|
|
|
|
|
|
|
|
cd "$(dirname "$0")/.."
|
|
|
|
|
|
|
|
eval "$(./dev-env/bin/dade-assist)"
|
|
|
|
|
|
|
|
# We allow overwriting this since on CI we build this in a separate step and upload it first
|
|
|
|
# before fetching it in another step.
|
|
|
|
HEAD_TARGET_DIR=${1:-compatibility/head_sdk}
|
|
|
|
|
2021-03-11 18:13:49 +03:00
|
|
|
git clean -fxd -e 'daml-*.tgz' $HEAD_TARGET_DIR
|
|
|
|
|
2020-04-24 15:43:35 +03:00
|
|
|
bazel build \
|
2023-09-01 16:15:36 +03:00
|
|
|
--java_language_version=11 \
|
|
|
|
--java_runtime_version=nixpkgs_java_11 \
|
|
|
|
--tool_java_runtime_version=nixpkgs_java_11 \
|
|
|
|
--tool_java_language_version=11 \
|
2020-04-24 15:43:35 +03:00
|
|
|
//release:sdk-release-tarball \
|
Supporting version splitting in Daml Assistant and Daml Compiler (#17682)
* initial implementation supporting version splitting in assistant
stubbed out implementations of resolveReleaseVersion/other resolution
* implement resolveReleaseVersionFromGithub
* continue work on fixing SDK/release version split
* First commit that successfully runs `daml-head install <split version>`
* fix tests
* Ignore snapshot/metadata for isHeadVersion
* remove log debugging
* Fix tests for getSdk
* refactor DA.Daml.Project.Types.defaultSdkPath
* enable incremental changes to version cache
* Allow resolveReleaseVersionFromGithub to fail via Either
* Split getSdkVersionFromSdkPath into get{Sdk,Release}VersionFromSdkPath
* Add resolveReleaseVersionFromDamlPath/Github to resolveReleaseVersion
* Add mock sdk config with version
* Remove getInstalledSdkVersions dependency on Cache
* add override for github version api endpoint, useful for mocking
* Add alternate-download to provide alternate tarball install resolution
* initial work on comprehensive autotester
* Copyright header
* fix build generation to have valid Main.daml
* improve error message for check_daml_install_nonzero
* Make killing miniserve processes more robust
* remove breakpoint
* Implement `daml build` tests
* Solve TODO in installExtracted to resolve sourceSdkVersion coherently
Supply useful error message with it.
* Return SdkVersion from sdkVersionFromReleaseVersion for typechecking
* Finish tests for tarball build, drop installed_already_behaviour
* Try to force-reload cache on tar failure, fix `Possible fix:` notes
* Add AllowInstallNonRelease as a flag
* Test allow_nonrelease, refactor, clean up setup_sandbox
* Move no_cache_override_github_endpoint API response into file
* Remove dead code, vestigial code
* Remove TODOs that no longer are relevant
* fix iAllowInstallNonRelease in InstallOptions for autoInstall
* Refactor alternateVersionLocation
* (Try to) lint language-support/ts/codegen/BUILD.bazel
* fix daml-assistant/test
* Enable allow_nonrelease post-build checks
* Remove writeFile debugging from DA.Daml.Assistant.Version
* Replace ../test-daml-yaml-install/test.sh with test-all-installs.sh
* lint
* more lint
run-full-compat: true
* Stop tracking API response in test-daml-yaml-install
* Move ReleaseResolution into Version
* remove extra deps, fixes daml-project-config-cabal-file-matches
* Move InstallLocation to minimize changes to DA.Daml.Project.Types
run-full-compat: true
* Create cachePath in daml-assistant tests that need it
* Bind to unused ports in test-all-installs.sh
run-full-compat: true
* Override via files instead of just URLs
run-full-compat: true
* Remove unused RELEASES_ENDPOINT
* Use dict keys instead of hardcoding in test-all-installs listing
* Refactor to remove check_daml_install_from_tarball_after_cache_reload
* Improve comment on update_cache
* Move shift before cases
* Add comment for unsafeParseReleaseVersion
* Rename unsafeParseReleaseVersion into unsafeParseOldReleaseVersion
* remove done todo
* Add some hungarian notation to resolveReleaseVersionFromDamlPath
* drop redundant let
* Define ordering over ReleaseVersion
run-full-compat: true
* use sdkVersion for codegen
* Use `urls` attribute in http_file, `url` is unsupported on Windows (!)
run-full-compat: true
* Remove unnecessary check for cache reload
run-full-compat: true
* Try use daml executable directly without daml-sdk-0.0.0
run-full-compat: true
* try force daml.exe to daml
run-full-compat: true
* Use daml.exe when windows is detected
* add windows tarballs for snapshots
* Fix most tests on windows, "line too long" breaks some tarball tests
run-full-compat: true
* Point to more recent snapshot post Moises's fixes
* Add os-specific tarball paths and alternate-download
run-full-compat: true
* Fix windows autoinstall with 0.0.0
run-full-compat: true
* Fix error message, remove daml_install_output catching
* Detect "The input line is too long" in other post_failed commands
* Fix missing releases endpoint, handle "cannot find the path specified"
run-full-compat: true
2023-11-22 17:24:13 +03:00
|
|
|
//ledger-test-tool/tool:ledger-api-test-tool_distribute.jar \
|
|
|
|
//daml-assistant:daml
|
2020-04-24 15:43:35 +03:00
|
|
|
|
2021-03-11 16:49:48 +03:00
|
|
|
cp -f bazel-bin/release/sdk-release-tarball-ce.tar.gz "$HEAD_TARGET_DIR"
|
2023-08-22 17:56:29 +03:00
|
|
|
cp -f bazel-bin/ledger-test-tool/tool/ledger-api-test-tool_distribute.jar "$HEAD_TARGET_DIR"
|
Supporting version splitting in Daml Assistant and Daml Compiler (#17682)
* initial implementation supporting version splitting in assistant
stubbed out implementations of resolveReleaseVersion/other resolution
* implement resolveReleaseVersionFromGithub
* continue work on fixing SDK/release version split
* First commit that successfully runs `daml-head install <split version>`
* fix tests
* Ignore snapshot/metadata for isHeadVersion
* remove log debugging
* Fix tests for getSdk
* refactor DA.Daml.Project.Types.defaultSdkPath
* enable incremental changes to version cache
* Allow resolveReleaseVersionFromGithub to fail via Either
* Split getSdkVersionFromSdkPath into get{Sdk,Release}VersionFromSdkPath
* Add resolveReleaseVersionFromDamlPath/Github to resolveReleaseVersion
* Add mock sdk config with version
* Remove getInstalledSdkVersions dependency on Cache
* add override for github version api endpoint, useful for mocking
* Add alternate-download to provide alternate tarball install resolution
* initial work on comprehensive autotester
* Copyright header
* fix build generation to have valid Main.daml
* improve error message for check_daml_install_nonzero
* Make killing miniserve processes more robust
* remove breakpoint
* Implement `daml build` tests
* Solve TODO in installExtracted to resolve sourceSdkVersion coherently
Supply useful error message with it.
* Return SdkVersion from sdkVersionFromReleaseVersion for typechecking
* Finish tests for tarball build, drop installed_already_behaviour
* Try to force-reload cache on tar failure, fix `Possible fix:` notes
* Add AllowInstallNonRelease as a flag
* Test allow_nonrelease, refactor, clean up setup_sandbox
* Move no_cache_override_github_endpoint API response into file
* Remove dead code, vestigial code
* Remove TODOs that no longer are relevant
* fix iAllowInstallNonRelease in InstallOptions for autoInstall
* Refactor alternateVersionLocation
* (Try to) lint language-support/ts/codegen/BUILD.bazel
* fix daml-assistant/test
* Enable allow_nonrelease post-build checks
* Remove writeFile debugging from DA.Daml.Assistant.Version
* Replace ../test-daml-yaml-install/test.sh with test-all-installs.sh
* lint
* more lint
run-full-compat: true
* Stop tracking API response in test-daml-yaml-install
* Move ReleaseResolution into Version
* remove extra deps, fixes daml-project-config-cabal-file-matches
* Move InstallLocation to minimize changes to DA.Daml.Project.Types
run-full-compat: true
* Create cachePath in daml-assistant tests that need it
* Bind to unused ports in test-all-installs.sh
run-full-compat: true
* Override via files instead of just URLs
run-full-compat: true
* Remove unused RELEASES_ENDPOINT
* Use dict keys instead of hardcoding in test-all-installs listing
* Refactor to remove check_daml_install_from_tarball_after_cache_reload
* Improve comment on update_cache
* Move shift before cases
* Add comment for unsafeParseReleaseVersion
* Rename unsafeParseReleaseVersion into unsafeParseOldReleaseVersion
* remove done todo
* Add some hungarian notation to resolveReleaseVersionFromDamlPath
* drop redundant let
* Define ordering over ReleaseVersion
run-full-compat: true
* use sdkVersion for codegen
* Use `urls` attribute in http_file, `url` is unsupported on Windows (!)
run-full-compat: true
* Remove unnecessary check for cache reload
run-full-compat: true
* Try use daml executable directly without daml-sdk-0.0.0
run-full-compat: true
* try force daml.exe to daml
run-full-compat: true
* Use daml.exe when windows is detected
* add windows tarballs for snapshots
* Fix most tests on windows, "line too long" breaks some tarball tests
run-full-compat: true
* Point to more recent snapshot post Moises's fixes
* Add os-specific tarball paths and alternate-download
run-full-compat: true
* Fix windows autoinstall with 0.0.0
run-full-compat: true
* Fix error message, remove daml_install_output catching
* Detect "The input line is too long" in other post_failed commands
* Fix missing releases endpoint, handle "cannot find the path specified"
run-full-compat: true
2023-11-22 17:24:13 +03:00
|
|
|
cp -f bazel-bin/daml-assistant/daml "$HEAD_TARGET_DIR"
|
2020-05-18 15:37:16 +03:00
|
|
|
cp -f templates/create-daml-app-test-resources/messaging.patch "$HEAD_TARGET_DIR"
|