Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move to subdir 3.0 #18520

Merged
merged 2 commits into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
82 changes: 0 additions & 82 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,83 +1 @@
# private configuration
.envrc.private

# local development
## these are sometimes defined as symlinks for local development,
## but should never be checked in because they break
## `git clone --recursive` for repos that have `daml` as a submodule.
/daml-ghcide

# Artifacts
dist
.interfaces
*.log
target
*.tgz
*.hi
*.o

# Daml
.daml/

# dev-env
/dev-env/jdk
/dev-env/var/

# Bazel
.bazel-cache
/bazel-*
!/bazel-haskell-deps.bzl
!/bazel-java-deps.bzl
/compatibility/bazel-*
!/compatibility/bazel-haskell-deps.bzl
/compatibility/head_sdk/
.bazelrc.local
.bazelproject

# node.js
node_modules/


### Operating Systems ###

# macOS
.DS_Store
._.DS_Store


### Editors ###

# Eclipse
.classpath
.factorypath
.project
.settings

# Emacs
\#*\#
.\#*\#
*~

# Ensime
.ensime
.ensime_cache

# IntelliJ IDEA
.idea
.ijwb
*.iml
*.ipr
*.iws
out

# Vim
*~
*.swo
*.swp

# Visual Studio Code
.vscode/*
!.vscode/settings.json.default

/.tmp-pg/
/.canton
13 changes: 10 additions & 3 deletions azure-cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
var_name: bash-lib
- bash: |
set -euo pipefail
cd sdk
eval "$(dev-env/bin/dade assist)"

bazel build //ci/cron:cron
Expand All @@ -67,7 +68,8 @@ jobs:
- bash: |
set -euo pipefail

eval "$(dev-env/bin/dade-assist)"
eval "$(sdk/dev-env/bin/dade-assist)"

HEAD=$(git rev-parse HEAD)
while ! nix-build --no-out-link -A tools.sed -A tools.jq -A tools.curl -A tools.base64 nix; do :; done

Expand Down Expand Up @@ -123,7 +125,7 @@ jobs:
- bash: |
set -euo pipefail

eval "$(dev-env/bin/dade-assist)"
eval "$(sdk/dev-env/bin/dade-assist)"

AUTH=$(echo -n "OAuth:${MARKETPLACE_TOKEN}" | base64 -w0)
MARKET=$(curl -H "Authorization: Basic $AUTH" \
Expand Down Expand Up @@ -164,6 +166,10 @@ jobs:
if [[ "$GITHUB" != "$MARKET" ]] && git merge-base --is-ancestor 798e96c9b9034eac85ace786b9e1955cf380285c v$GITHUB; then
echo "Publishing $GITHUB to VSCode Marketplace"
git checkout v$GITHUB
(
if [ -d sdk ]; then
cd sdk
fi
cp LICENSE compiler/daml-extension
trap "rm -rf $PWD/compiler/daml-extension/LICENSE" EXIT
cd compiler/daml-extension
Expand All @@ -172,6 +178,7 @@ jobs:
bazel run --run_under="cd $PWD &&" @nodejs//:yarn install
bazel run --run_under="cd $PWD &&" @nodejs//:yarn compile
bazel run --run_under="cd $PWD && " @daml_extension_deps//vsce/bin:vsce -- publish --yarn $GITHUB -p $MARKETPLACE_TOKEN
)
else
if [[ "$GITHUB" == "$MARKET" ]]; then
echo "Version on marketplace is already the latest ($GITHUB)."
Expand All @@ -193,7 +200,7 @@ jobs:
- bash: |
set -euo pipefail

eval "$(dev-env/bin/dade-assist)"
eval "$(sdk/dev-env/bin/dade-assist)"

STATS=$(mktemp)
curl https://api.github.com/repos/digital-asset/daml/releases -sSfL | gzip -9 > $STATS
Expand Down
12 changes: 12 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,9 @@ jobs:
condition: and(succeeded(), not(eq(variables['skip-github'], 'TRUE')))
- bash: |
set -euo pipefail
if [ -d sdk ]; then
cd sdk
fi
# Note: this gets dev-env from the release commit, not the trigger commit
eval "$(./dev-env/bin/dade-assist)"
KEY_FILE=$(mktemp)
Expand Down Expand Up @@ -113,6 +116,9 @@ jobs:
condition: and(succeeded(), not(eq(variables['skip-github'], 'TRUE')))
- bash: |
set -euo pipefail
if [ -d sdk ]; then
cd sdk
fi
# Note: this gets dev-env from the release commit, not the trigger commit
eval "$(./dev-env/bin/dade-assist)"
./ci/publish-artifactory.sh $(Build.StagingDirectory) $(release_tag)
Expand All @@ -122,6 +128,9 @@ jobs:
- bash: |
set -euo pipefail

if [ -d sdk ]; then
cd sdk
fi
# Note: this gets dev-env from the release commit, not the trigger commit
eval "$(./dev-env/bin/dade-assist)"
source $(bash-lib)
Expand All @@ -142,6 +151,9 @@ jobs:
- bash: |
set -euo pipefail
source $(bash-lib)
if [ -d sdk ]; then
cd sdk
fi
# Note: this gets dev-env from the release commit, not the trigger commit
eval "$(./dev-env/bin/dade-assist)"
msg=$(git log -n1 --format=%b HEAD | head -1)
Expand Down
8 changes: 8 additions & 0 deletions ci/blackduck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
displayName: 'Build/Install the Developer Environment'
- bash: |
set -euo pipefail
cd sdk
eval "$(dev-env/bin/dade assist)"
export LC_ALL=en_US.UTF-8

Expand All @@ -30,6 +31,7 @@ jobs:
displayName: 'Build'
- bash: |
set -euo pipefail
cd sdk
eval "$(dev-env/bin/dade-assist)"

#needs to be specified since blackduck can not scan all bazel
Expand All @@ -51,6 +53,7 @@ jobs:
BLACKDUCK_HUBDETECT_TOKEN: $(BLACKDUCK_HUBDETECT_TOKEN)
- bash: |
set -euo pipefail
cd sdk
eval "$(dev-env/bin/dade-assist)"

#needs to be specified since blackduck can not scan all bazel
Expand All @@ -72,6 +75,7 @@ jobs:
BLACKDUCK_HUBDETECT_TOKEN: $(BLACKDUCK_HUBDETECT_TOKEN)
- bash: |
set -euo pipefail
cd sdk
eval "$(dev-env/bin/dade-assist)"

(cd language-support/ts && yarn install)
Expand All @@ -95,6 +99,7 @@ jobs:
BLACKDUCK_HUBDETECT_TOKEN: $(BLACKDUCK_HUBDETECT_TOKEN)
- bash: |
set -euo pipefail
cd sdk
eval "$(dev-env/bin/dade-assist)"

bash <(curl -s https://raw.githubusercontent.com/DACH-NY/security-blackduck/$(blackduck_script_sha)/synopsys-detect) \
Expand All @@ -114,6 +119,7 @@ jobs:
BLACKDUCK_HUBDETECT_TOKEN: $(BLACKDUCK_HUBDETECT_TOKEN)
- bash: |
set -euo pipefail
cd sdk
eval "$(dev-env/bin/dade-assist)"

bash <(curl -s https://raw.githubusercontent.com/DACH-NY/security-blackduck/$(blackduck_script_sha)/synopsys-detect) \
Expand All @@ -136,6 +142,7 @@ jobs:
var_name: bash_lib
- bash: |
set -euo pipefail
cd sdk
eval "$(./dev-env/bin/dade-assist)"
source $(bash_lib)

Expand Down Expand Up @@ -174,6 +181,7 @@ jobs:
var_name: bash_lib
- bash: |
set -euo pipefail
cd sdk
eval "$(dev-env/bin/dade-assist)"
source $(bash_lib)

Expand Down
24 changes: 14 additions & 10 deletions ci/build-unix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ parameters:
steps:
- bash: |
set -euo pipefail
major=$(cat NIGHTLY_PREFIX | awk -F. '{print $1}')
minor=$(cat NIGHTLY_PREFIX | awk -F. '{print $2}')
major=$(cat sdk/NIGHTLY_PREFIX | awk -F. '{print $1}')
minor=$(cat sdk/NIGHTLY_PREFIX | awk -F. '{print $2}')
setvar() {
echo "Setting '$1' to '$2'"
echo "##vso[task.setvariable variable=$1]$2"
Expand All @@ -32,6 +32,7 @@ steps:
ne(${{parameters.name_exp}}, 'm1')))

- bash: |
cd sdk
source dev-env/lib/ensure-nix
ci/dev-env-push.py
displayName: 'Push Developer Environment build results'
Expand All @@ -45,7 +46,8 @@ steps:
GOOGLE_APPLICATION_CREDENTIALS_CONTENT: $(GOOGLE_APPLICATION_CREDENTIALS_CONTENT)
NIX_SECRET_KEY_CONTENT: $(NIX_SECRET_KEY_CONTENT)

- bash: ci/configure-bazel.sh
- bash: |
ci/configure-bazel.sh
displayName: 'Configure Bazel'
env:
IS_FORK: $(System.PullRequest.IsFork)
Expand All @@ -56,23 +58,23 @@ steps:
or(eq(${{parameters.is_release}}, 'false'),
ne(${{parameters.name_exp}}, 'm1')))

- bash: ./fmt.sh --test
- bash: |
sdk/fmt.sh --test
displayName: 'Platform-agnostic lints and checks'
condition: and(succeeded(),
eq(variables.skip, 'false'),
eq(${{parameters.name_exp}}, 'linux-intel'))

- bash: |
set -euo pipefail
if [ -e bazel-testlogs ]; then
rm -rf bazel-testlogs/
fi
rm -rf sdk/bazel-testlogs/
displayName: delete old logs
condition: and(succeeded(),
eq(variables.skip, 'false'))

- bash: |
set -euo pipefail
cd sdk
eval "$(dev-env/bin/dade-assist)"
p="_${{parameters.name_str}}"
a="_$(Build.BuildNumber)_$(System.JobAttempt)"
t="${{parameters.test_mode}}"
Expand Down Expand Up @@ -113,11 +115,12 @@ steps:
ne(${{parameters.name_exp}}, 'm1')))
displayName: 'Publish the bazel test logs'
inputs:
pathtoPublish: 'bazel-testlogs/'
pathtoPublish: 'sdk/bazel-testlogs/'
artifactName: 'Test logs ${{parameters.name_str}}'

- bash: |
set -euo pipefail
cd sdk
eval "$(./dev-env/bin/dade-assist)"
./bazel-bin/release/release --release-dir "$(mktemp -d)" --upload
env:
Expand All @@ -143,8 +146,9 @@ steps:
ne(${{parameters.name_exp}}, 'm1')))
- bash: |
set -euo pipefail
eval "$(./dev-env/bin/dade-assist)"
cd sdk
mkdir -p $(Build.StagingDirectory)/release
eval "$(dev-env/bin/dade-assist)"
./ci/copy-unix-release-artifacts.sh ${{parameters.release_tag}} ${{parameters.name_str}} $(Build.StagingDirectory)/release
env:
DAML_SDK_RELEASE_VERSION: ${{parameters.release_tag}}
Expand Down
37 changes: 31 additions & 6 deletions ci/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,44 @@ parameters:
test_mode: ''

steps:
- bash: ci/configure-bazel.sh
- bash: |
if [ -f ci/configure-bazel.sh ]; then
ci/configure-bazel.sh
else
sdk/ci/configure-bazel.sh
fi
displayName: 'Configure Bazel'
env:
IS_FORK: $(System.PullRequest.IsFork)
# to upload to the bazel cache
GOOGLE_APPLICATION_CREDENTIALS_CONTENT: $(GOOGLE_APPLICATION_CREDENTIALS_CONTENT)

- powershell: '.\ci\windows-diagnostics.ps1'
- powershell: |
if (Test-Path .\ci\windows-diagnostics.ps1) {
.\ci\windows-diagnostics.ps1
} else {
cd sdk
.\ci\windows-diagnostics.ps1
}
displayName: 'Agent diagnostics'

- bash: |
set -euo pipefail
if [ -e bazel-testlogs ]; then
rm -rf bazel-testlogs/
rm -rf bazel-testlogs/
fi
if [ -e sdk/bazel-testlogs ]; then
rm -rf sdk/bazel-testlogs
fi
displayName: delete old logs

- powershell: '.\build.ps1'
- powershell: |
if (Test-Path .\build.ps1) {
.\build.ps1
} else {
cd sdk
.\build.ps1
}
displayName: 'Build'
env:
DAML_SDK_RELEASE_VERSION: ${{parameters.release_tag}}
Expand All @@ -53,7 +73,7 @@ steps:
condition: failed()
displayName: 'Publish the bazel test logs'
inputs:
pathtoPublish: 'bazel-testlogs/'
pathtoPublish: '$(Build.StagingDirectory)/bazel-testlogs/'
artifactName: 'Test logs Windows'

- template: bash-lib.yml
Expand All @@ -63,7 +83,12 @@ steps:
- bash: |
set -euo pipefail
mkdir -p '$(Build.StagingDirectory)'/release
./ci/copy-windows-release-artifacts.sh \
if [ -f ./ci/copy-windows-release-artifacts.sh ]; then
p=.
else
p=sdk
fi
$p/ci/copy-windows-release-artifacts.sh \
${{parameters.release_tag}} \
'$(Build.StagingDirectory)'/release \
"${{ parameters.is_split_release }}"
Expand Down
Loading