Skip to content

Commit d1fcffd

Browse files
canton-network-daDA Automation
andauthored
Update Splice from CCI (#411)
Signed-off-by: DA Automation <splice-maintainers@digitalasset.com> Co-authored-by: DA Automation <splice-maintainers@digitalasset.com>
1 parent fb5ad6b commit d1fcffd

File tree

140 files changed

+34811
-288
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

140 files changed

+34811
-288
lines changed

.github/actionlint.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
self-hosted-runner:
2+
labels:
3+
- self-hosted-docker-tiny
4+
- self-hosted-docker-medium
5+
- self-hosted-docker-large
6+
- self-hosted-k8s-x-small
7+
- self-hosted-k8s-small
8+
- self-hosted-k8s-medium
9+
- self-hosted-k8s-large
10+
- self-hosted-k8s-x-large
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: "Restore Daml artifacts"
2+
description: "Restore the Daml artifacts cache"
3+
inputs:
4+
cache_version:
5+
description: "Version of the cache"
6+
required: true
7+
outputs:
8+
cache_hit:
9+
description: "Cache hit"
10+
value: ${{ steps.restore.outputs.cache-hit }}
11+
12+
runs:
13+
using: "composite"
14+
steps:
15+
- name: Restore Daml artifacts cache
16+
id: restore
17+
uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
18+
with:
19+
path: |
20+
/tmp/daml
21+
apps/common/frontend/daml.js
22+
key: daml-artifacts-${{ inputs.cache_version }} branch:${{ github.ref_name }} dependencies:${{ hashFiles('project/build.properties', 'project/BuildCommon.scala', 'project/DamlPlugin.scala', 'build.sbt', 'daml/dars.lock', 'nix/canton-sources.json') }} rev:${{ github.sha }}
23+
restore-keys: |
24+
daml-artifacts-${{ inputs.cache_version }} branch:${{ github.ref_name }} dependencies:${{ hashFiles('project/build.properties', 'project/BuildCommon.scala', 'project/DamlPlugin.scala', 'build.sbt', 'daml/dars.lock', 'nix/canton-sources.json') }}
25+
daml-artifacts-${{ inputs.cache_version }} branch:main dependencies:${{ hashFiles('project/build.properties', 'project/BuildCommon.scala', 'project/DamlPlugin.scala', 'build.sbt', 'daml/dars.lock', 'nix/canton-sources.json') }}
26+
- name: Extract Daml artifacts
27+
shell: bash
28+
run: |
29+
if [[ -e /tmp/daml/daml.tar.gz ]]; then
30+
tar --use-compress-program=pigz -xf /tmp/daml/daml.tar.gz
31+
else
32+
echo "No cached daml artifacts files found. Skipping..."
33+
fi
34+
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: "Save Daml artifacts"
2+
description: "Saves the Daml artifacts to the cache"
3+
inputs:
4+
cache_version:
5+
description: "Version of the cache"
6+
required: true
7+
load_cache_hit:
8+
description: "Cache hit from the restore Daml artifacts job (should be the cache_hit output from the restore Daml artifacts job)"
9+
required: true
10+
11+
runs:
12+
using: "composite"
13+
steps:
14+
- name: Archive Daml artifacts
15+
if: ${{ ! fromJson(inputs.load_cache_hit) }}
16+
shell: bash
17+
run: |
18+
mkdir -p /tmp/daml
19+
find . -type d -name ".daml" | tar --use-compress-program=pigz -cf /tmp/daml/daml.tar.gz -T -
20+
- name: Not archiving Daml artifacts
21+
if: ${{ fromJson(inputs.load_cache_hit) }}
22+
shell: bash
23+
run: |
24+
echo "Skipping Daml artifacts cache, as there was a cache hit"
25+
- name: Cache precompiled classes
26+
if: ${{ ! fromJson(inputs.load_cache_hit) }}
27+
uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
28+
with:
29+
path: |
30+
/tmp/daml
31+
apps/common/frontend/daml.js
32+
key: daml-artifacts-${{ inputs.cache_version }} branch:${{ github.ref_name }} dependencies:${{ hashFiles('project/build.properties', 'project/BuildCommon.scala', 'project/DamlPlugin.scala', 'build.sbt', 'daml/dars.lock', 'nix/canton-sources.json') }} rev:${{ github.sha }}

.github/actions/cache/frontend_node_modules/restore/action.yml

Lines changed: 32 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/actions/cache/frontend_node_modules/save/action.yml

Lines changed: 31 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: "Restore Precompiled Classes"
2+
description: "Restore the precompiled classes from the cache"
3+
inputs:
4+
cache_version:
5+
description: "Version of the cache"
6+
required: true
7+
outputs:
8+
cache_hit:
9+
description: "Cache hit"
10+
value: ${{ steps.restore.outputs.cache-hit }}
11+
12+
runs:
13+
using: "composite"
14+
steps:
15+
- name: Restore precompiled classes
16+
id: restore
17+
uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
18+
with:
19+
path: /tmp/classes
20+
key: classes-${{ inputs.cache_version }} branch:${{ github.ref_name }} dependencies:${{ hashFiles('project/build.properties', 'project/BuildCommon.scala', 'project/DamlPlugin.scala', 'project/Dependencies.scala', 'project/CantonDependencies.scala', 'project/Houserules.scala', 'project/plugins.sbt', 'build.sbt', 'daml/dars.lock', 'openapi-cache-key.txt') }} rev:${{ github.sha }}
21+
restore-keys: |
22+
classes-${{ inputs.cache_version }} branch:${{ github.ref_name }} dependencies:${{ hashFiles('project/build.properties', 'project/BuildCommon.scala', 'project/DamlPlugin.scala', 'project/Dependencies.scala', 'project/CantonDependencies.scala', 'project/Houserules.scala', 'project/plugins.sbt', 'build.sbt', 'daml/dars.lock', 'openapi-cache-key.txt') }}
23+
classes-${{ inputs.cache_version }} branch:main dependencies:${{ hashFiles('project/build.properties', 'project/BuildCommon.scala', 'project/DamlPlugin.scala', 'project/Dependencies.scala', 'project/CantonDependencies.scala', 'project/Houserules.scala', 'project/plugins.sbt', 'build.sbt', 'daml/dars.lock', 'openapi-cache-key.txt') }}
24+
- name: Extract precompiled classes
25+
shell: bash
26+
run: ./.github/actions/scripts/extract_precompiled_classes.sh
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: "Save Precompiled Classes"
2+
description: "Saves the precompiled classes to the cache"
3+
inputs:
4+
cache_version:
5+
description: "Version of the cache"
6+
required: true
7+
load_cache_hit:
8+
description: "Cache hit from the load precompiled classes job (should be the cache_hit output from the load precompiled classes job)"
9+
required: true
10+
11+
runs:
12+
using: "composite"
13+
steps:
14+
- name: Archive precompiled classes
15+
if: ${{ ! fromJson(inputs.load_cache_hit) }}
16+
shell: bash
17+
run: ./.github/actions/scripts/archive_precompiled_classes.sh
18+
- name: Not archiving preceompiled classes
19+
if: ${{ fromJson(inputs.load_cache_hit) }}
20+
shell: bash
21+
run: |
22+
echo "Skipping precompiled classes cache, as there was a cache hit"
23+
- name: Cache precompiled classes
24+
if: ${{ ! fromJson(inputs.load_cache_hit) }}
25+
uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
26+
with:
27+
path: /tmp/classes
28+
key: classes-${{ inputs.cache_version }} branch:${{ github.ref_name }} dependencies:${{ hashFiles('project/build.properties', 'project/BuildCommon.scala', 'project/DamlPlugin.scala', 'project/Dependencies.scala', 'project/CantonDependencies.scala', 'project/Houserules.scala', 'project/plugins.sbt', 'build.sbt', 'daml/dars.lock', 'openapi-cache-key.txt') }} rev:${{ github.sha }}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: "Restore SBT Cacht"
2+
description: "Restore the SBT cache"
3+
inputs:
4+
cache_version:
5+
description: "Version of the cache"
6+
required: true
7+
outputs:
8+
cache_hit:
9+
description: "Cache hit"
10+
value: ${{ steps.restore.outputs.cache-hit }}
11+
12+
runs:
13+
using: "composite"
14+
steps:
15+
- name: Restore SBT cache
16+
id: restore
17+
uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
18+
with:
19+
path: |
20+
/github/home/.ivy2/cache
21+
/github/home/.sbt
22+
key: sbt-${{ inputs.cache_version }} job=${{ github.job }} dependencies=${{ hashFiles('project/Dependencies.scala', 'project/CantonDependencies.scala') }}-${{ hashFiles('project/BuildCommon.scala', 'project/build.properties', 'project/Houserules.scala', 'project/plugins.sbt', 'build.sbt') }}
23+
restore-keys: |
24+
sbt-${{ inputs.cache_version }} job=${{ github.job }} dependencies=${{ hashFiles('project/Dependencies.scala', 'project/CantonDependencies.scala') }}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: "Save SBT Cache"
2+
description: "Saves the SBT cache"
3+
inputs:
4+
cache_version:
5+
description: "Version of the cache"
6+
required: true
7+
load_cache_hit:
8+
description: "Cache hit from the restore SBT job (should be the cache_hit output from the restore SBT job)"
9+
required: true
10+
11+
runs:
12+
using: "composite"
13+
steps:
14+
- name: Store SBT cache
15+
if: ${{ ! fromJson(inputs.load_cache_hit) }}
16+
uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
17+
with:
18+
path: |
19+
/github/home/.ivy2/cache
20+
/github/home/.sbt
21+
key: sbt-${{ inputs.cache_version }} job=${{ github.job }} dependencies=${{ hashFiles('project/Dependencies.scala', 'project/CantonDependencies.scala') }}-${{ hashFiles('project/BuildCommon.scala', 'project/build.properties', 'project/Houserules.scala', 'project/plugins.sbt', 'build.sbt') }}
22+
- name: Not storing SBT cache
23+
if: ${{ fromJson(inputs.load_cache_hit) }}
24+
shell: bash
25+
run: |
26+
echo "Skipping SBT cache, as there was a cache hit"

0 commit comments

Comments
 (0)