mirror of
https://github.com/digital-asset/daml.git
synced 2024-11-09 15:37:05 +03:00
fix local canton for compat (#17146)
This commit is contained in:
parent
a6cb39d545
commit
03a2d336d2
45
ci/build-local-canton.yml
Normal file
45
ci/build-local-canton.yml
Normal file
@ -0,0 +1,45 @@
|
||||
# Copyright (c) 2023 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
jobs:
|
||||
- job: build_canton
|
||||
timeoutInMinutes: 60
|
||||
pool:
|
||||
name: 'ubuntu_20_04'
|
||||
demands: assignment -equals default
|
||||
steps:
|
||||
- checkout: self
|
||||
- bash: |
|
||||
set -euo pipefail
|
||||
touch canton_sha
|
||||
if [ -f arbitrary_canton_sha ]; then
|
||||
cp arbitrary_canton_sha canton_sha
|
||||
fi
|
||||
- task: Cache@2
|
||||
inputs:
|
||||
key: '"canton-v3-" | ./canton_sha'
|
||||
path: $(Build.StagingDirectory)/canton_lib
|
||||
- bash: |
|
||||
set -euo pipefail
|
||||
mkdir -p "$(Build.StagingDirectory)/canton_lib"
|
||||
touch "$(Build.StagingDirectory)/canton_lib/.keep"
|
||||
if [ -f arbitrary_canton_sha ] && ! [ -f "$(Build.StagingDirectory)/canton_lib/canton.jar" ]; then
|
||||
sha=$(cat arbitrary_canton_sha)
|
||||
cd $(mktemp -d)
|
||||
git clone https://$GITHUB_TOKEN@github.com/DACH-NY/canton
|
||||
cd canton
|
||||
git checkout $sha
|
||||
sed -i 's|git@github.com:|https://github.com/|' .gitmodules
|
||||
git submodule init
|
||||
git submodule update
|
||||
nix-shell --max-jobs 2 --run "sbt community-app/assembly"
|
||||
cp community/app/target/scala-*/canton-open-source-*.jar "$(Build.StagingDirectory)/canton_lib/canton.jar"
|
||||
nix-shell --max-jobs 2 --run "sbt enterprise-app/assembly"
|
||||
cp enterprise/app/target/scala-*/canton-enterprise-*.jar "$(Build.StagingDirectory)/canton_lib/canton-ee.jar"
|
||||
fi
|
||||
env:
|
||||
GITHUB_TOKEN: $(CANTON_READONLY_TOKEN)
|
||||
- task: PublishBuildArtifacts@1
|
||||
inputs:
|
||||
pathToPublish: $(Build.StagingDirectory)/canton_lib
|
||||
artifactName: canton_jar
|
42
ci/build.yml
42
ci/build.yml
@ -25,47 +25,7 @@ jobs:
|
||||
fi
|
||||
name: out
|
||||
|
||||
- job: build_canton
|
||||
timeoutInMinutes: 60
|
||||
pool:
|
||||
name: 'ubuntu_20_04'
|
||||
demands: assignment -equals default
|
||||
steps:
|
||||
- checkout: self
|
||||
- bash: |
|
||||
set -euo pipefail
|
||||
touch canton_sha
|
||||
if [ -f arbitrary_canton_sha ]; then
|
||||
cp arbitrary_canton_sha canton_sha
|
||||
fi
|
||||
- task: Cache@2
|
||||
inputs:
|
||||
key: '"canton-v3-" | ./canton_sha'
|
||||
path: $(Build.StagingDirectory)/canton_lib
|
||||
- bash: |
|
||||
set -euo pipefail
|
||||
mkdir -p "$(Build.StagingDirectory)/canton_lib"
|
||||
touch "$(Build.StagingDirectory)/canton_lib/.keep"
|
||||
if [ -f arbitrary_canton_sha ] && ! [ -f "$(Build.StagingDirectory)/canton_lib/canton.jar" ]; then
|
||||
sha=$(cat arbitrary_canton_sha)
|
||||
cd $(mktemp -d)
|
||||
git clone https://$GITHUB_TOKEN@github.com/DACH-NY/canton
|
||||
cd canton
|
||||
git checkout $sha
|
||||
sed -i 's|git@github.com:|https://github.com/|' .gitmodules
|
||||
git submodule init
|
||||
git submodule update
|
||||
nix-shell --max-jobs 2 --run "sbt community-app/assembly"
|
||||
cp community/app/target/scala-*/canton-open-source-*.jar "$(Build.StagingDirectory)/canton_lib/canton.jar"
|
||||
nix-shell --max-jobs 2 --run "sbt enterprise-app/assembly"
|
||||
cp enterprise/app/target/scala-*/canton-enterprise-*.jar "$(Build.StagingDirectory)/canton_lib/canton-ee.jar"
|
||||
fi
|
||||
env:
|
||||
GITHUB_TOKEN: $(CANTON_READONLY_TOKEN)
|
||||
- task: PublishBuildArtifacts@1
|
||||
inputs:
|
||||
pathToPublish: $(Build.StagingDirectory)/canton_lib
|
||||
artifactName: canton_jar
|
||||
- template: build-local-canton.yml
|
||||
|
||||
- job: Linux
|
||||
dependsOn:
|
||||
|
@ -23,6 +23,7 @@ schedules:
|
||||
always: true
|
||||
|
||||
jobs:
|
||||
- template: ../build-local-canton.yml
|
||||
- job: compatibility_ts_libs
|
||||
timeoutInMinutes: 60
|
||||
pool:
|
||||
@ -34,7 +35,9 @@ jobs:
|
||||
- template: ../compatibility_ts_libs.yml
|
||||
|
||||
- job: compatibility
|
||||
dependsOn: compatibility_ts_libs
|
||||
dependsOn:
|
||||
- compatibility_ts_libs
|
||||
- build_canton
|
||||
timeoutInMinutes: 720
|
||||
strategy:
|
||||
matrix:
|
||||
@ -47,19 +50,23 @@ jobs:
|
||||
demands: assignment -equals default
|
||||
steps:
|
||||
- checkout: self
|
||||
- template: ../get-local-canton.yml
|
||||
- ${{ if eq(variables['pool'], 'macos-pool') }}:
|
||||
- template: ../clear-shared-segments-macos.yml
|
||||
- template: ../clean-up.yml
|
||||
- template: ../compatibility.yml
|
||||
|
||||
- job: compatibility_windows
|
||||
dependsOn: compatibility_ts_libs
|
||||
dependsOn:
|
||||
- compatibility_ts_libs
|
||||
- build_canton
|
||||
timeoutInMinutes: 720
|
||||
pool:
|
||||
name: windows-pool
|
||||
demands: assignment -equals default
|
||||
steps:
|
||||
- checkout: self
|
||||
- template: ../get-local-canton.yml
|
||||
- template: ../compatibility-windows.yml
|
||||
- task: PublishBuildArtifacts@1
|
||||
condition: succeededOrFailed()
|
||||
|
Loading…
Reference in New Issue
Block a user