mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 01:07:18 +03:00
234d003f0c
* 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
53 lines
2.1 KiB
PowerShell
53 lines
2.1 KiB
PowerShell
Set-StrictMode -Version latest
|
|
$ErrorActionPreference = 'Stop'
|
|
# Copyright (c) 2022 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
|
# 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.
|
|
|
|
# See https://github.com/lukesampson/scoop/issues/3859
|
|
Set-Strictmode -Off
|
|
.\dev-env\windows\bin\dadew.ps1 install
|
|
Set-StrictMode -Version latest
|
|
.\dev-env\windows\bin\dadew.ps1 sync
|
|
.\dev-env\windows\bin\dadew.ps1 enable
|
|
|
|
if (Test-Path -Path $env:appdata\stack\pantry\hackage\hackage-security-lock) {
|
|
Write-Output ">> Nuking stack directory"
|
|
Remove-Item -ErrorAction Continue -Force -Recurse -Path $env:appdata\stack
|
|
}
|
|
|
|
$ARTIFACT_DIRS = if ("$env:BUILD_ARTIFACTSTAGINGDIRECTORY") { $env:BUILD_ARTIFACTSTAGINGDIRECTORY } else { Get-Location }
|
|
|
|
function bazel() {
|
|
Write-Output ">> bazel $args"
|
|
$global:lastexitcode = 0
|
|
$backupErrorActionPreference = $script:ErrorActionPreference
|
|
$script:ErrorActionPreference = "Continue"
|
|
& bazel.exe @args 2>&1 | %{ "$_" }
|
|
$script:ErrorActionPreference = $backupErrorActionPreference
|
|
if ($global:lastexitcode -ne 0 -And $args[0] -ne "shutdown") {
|
|
Write-Output "<< bazel $args (failed, exit code: $global:lastexitcode)"
|
|
throw ("Bazel returned non-zero exit code: $global:lastexitcode")
|
|
}
|
|
Write-Output "<< bazel $args (ok)"
|
|
}
|
|
|
|
|
|
bazel shutdown
|
|
bazel fetch @nodejs_dev_env//...
|
|
bazel build `
|
|
`-`-experimental_execution_log_file ${ARTIFACT_DIRS}/build_execution_windows.log `
|
|
//release:sdk-release-tarball `
|
|
//ledger-test-tool/tool:ledger-api-test-tool_distribute.jar `
|
|
//daml-assistant:daml
|
|
|
|
git clean -fxd -e 'daml-*.tgz' compatibility/head_sdk
|
|
|
|
cp -Force bazel-bin\release\sdk-release-tarball-ce.tar.gz compatibility/head_sdk
|
|
cp -Force bazel-bin\ledger-test-tool\tool\ledger-api-test-tool_distribute.jar compatibility/head_sdk
|
|
cp -Force bazel-bin\daml-assistant\daml.exe compatibility/head_sdk
|
|
cp -Force templates\create-daml-app-test-resources\messaging.patch compatibility/head_sdk
|