Skip to content

Commit ef39d4f

Browse files
committed
Merge branch 'main' into feat/aleo-sdk
2 parents 514c469 + 20c24dc commit ef39d4f

132 files changed

Lines changed: 1807 additions & 563 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: 'Check Path Changes'
2+
description: 'Check if specific paths have changed between commits'
3+
inputs:
4+
base_sha:
5+
description: 'Base commit SHA to compare from'
6+
required: true
7+
head_sha:
8+
description: 'Head commit SHA to compare to'
9+
required: true
10+
path_pattern:
11+
description: 'Path pattern to check for changes (e.g., "rust/", "solidity/")'
12+
required: true
13+
path_pattern_only:
14+
description: 'If true, checks if ONLY the specified path changed. If false, checks if ANY files in the path changed.'
15+
required: false
16+
default: 'false'
17+
outputs:
18+
has_changes:
19+
description: 'Whether the specified path has any changes'
20+
value: ${{ steps.check-changes.outputs.has_changes }}
21+
only_changes:
22+
description: 'Whether ONLY the specified path has changes (only set if path_pattern_only=true)'
23+
value: ${{ steps.check-changes.outputs.only_changes }}
24+
runs:
25+
using: 'composite'
26+
steps:
27+
- name: Check for path changes
28+
id: check-changes
29+
shell: bash
30+
run: |
31+
# Check if the specified path has any changes
32+
if git diff ${{ inputs.base_sha }}..${{ inputs.head_sha }} --name-only | grep -qE '^${{ inputs.path_pattern }}'; then
33+
echo "has_changes=true" >> $GITHUB_OUTPUT
34+
35+
# If path_pattern_only is requested, also check if ONLY this path changed
36+
if [[ "${{ inputs.path_pattern_only }}" == "true" ]]; then
37+
if ! git diff ${{ inputs.base_sha }}..${{ inputs.head_sha }} --name-only | grep -qvE '^${{ inputs.path_pattern }}'; then
38+
echo "only_changes=true" >> $GITHUB_OUTPUT
39+
echo "Only ${{ inputs.path_pattern }} changes detected."
40+
else
41+
echo "only_changes=false" >> $GITHUB_OUTPUT
42+
echo "${{ inputs.path_pattern }} changes detected along with other changes."
43+
fi
44+
fi
45+
else
46+
echo "has_changes=false" >> $GITHUB_OUTPUT
47+
if [[ "${{ inputs.path_pattern_only }}" == "true" ]]; then
48+
echo "only_changes=false" >> $GITHUB_OUTPUT
49+
fi
50+
echo "No ${{ inputs.path_pattern }} changes detected."
51+
fi
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: 'Determine Base SHA'
2+
description: 'Determine base and current SHA for different GitHub events'
3+
outputs:
4+
base_sha:
5+
description: 'The base commit SHA'
6+
value: ${{ steps.determine-base-sha.outputs.base_sha }}
7+
current_sha:
8+
description: 'The current commit SHA'
9+
value: ${{ steps.determine-base-sha.outputs.current_sha }}
10+
runs:
11+
using: 'composite'
12+
steps:
13+
- name: Determine BASE_SHA
14+
id: determine-base-sha
15+
shell: bash
16+
run: |
17+
if [ "${{ github.event_name }}" == "pull_request" ]; then
18+
echo "base_sha=${{ github.event.pull_request.base.sha }}" >> $GITHUB_OUTPUT
19+
echo "current_sha=${{ github.event.pull_request.head.sha }}" >> $GITHUB_OUTPUT
20+
elif [ "${{ github.event_name }}" == "merge_group" ]; then
21+
echo "base_sha=${{ github.event.merge_group.base_sha }}" >> $GITHUB_OUTPUT
22+
echo "current_sha=${{ github.event.merge_group.head_sha }}" >> $GITHUB_OUTPUT
23+
elif [ "${{ github.event_name }}" == "push" ]; then
24+
echo "base_sha=${{ github.event.before }}" >> $GITHUB_OUTPUT
25+
echo "current_sha=${{ github.event.after }}" >> $GITHUB_OUTPUT
26+
else
27+
echo "base_sha=$(git rev-parse HEAD^)" >> $GITHUB_OUTPUT
28+
echo "current_sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
29+
fi

.github/workflows/agent-release-artifacts.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
name: Agent Release Artifacts
22

33
on:
4-
release:
5-
types: [published]
64
# Allows you to run this workflow manually from the Actions tab
75
workflow_dispatch:
86

@@ -17,17 +15,13 @@ env:
1715
jobs:
1816
prepare:
1917
runs-on: ubuntu-latest
18+
# Only run for agents-v* tags
19+
if: startsWith(github.ref_name, 'agents-v')
2020
outputs:
21-
tag_date: ${{ steps.taggen.outputs.TAG_DATE }}
22-
tag_sha: ${{ steps.taggen.outputs.TAG_SHA }}
23-
steps:
24-
- name: generate tag data
25-
id: taggen
26-
run: |
27-
echo "TAG_DATE=$(date +'%Y%m%d-%H%M%S')" >> $GITHUB_OUTPUT
28-
echo "TAG_SHA=$(echo '${{ github.sha }}' | cut -b 1-7)" >> $GITHUB_OUTPUT
21+
tag_name: ${{ github.ref_name }}
2922
build:
3023
needs: prepare
24+
timeout-minutes: 30
3125
strategy:
3226
fail-fast: false
3327
matrix:
@@ -80,7 +74,7 @@ jobs:
8074
- name: upload binaries
8175
uses: actions/upload-artifact@v4
8276
with:
83-
name: ${{ matrix.TARGET }}-${{ needs.prepare.outputs.tag_sha }}-${{ needs.prepare.outputs.tag_date }}
77+
name: ${{ matrix.TARGET }}-${{ needs.prepare.outputs.tag_name }}
8478
path: |
8579
rust/main/target/${{ matrix.TARGET }}/release/relayer
8680
rust/main/target/${{ matrix.TARGET }}/release/relayer.exe

.github/workflows/rust-release.yml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ jobs:
100100
needs: check-release-status
101101
if: |
102102
github.event_name == 'push' &&
103-
needs.check-release-status.outputs.has_changes == 'true'
103+
needs.check-release-status.outputs.has_changes == 'true' &&
104+
needs.check-release-status.outputs.should_release == 'false'
104105
steps:
105106
- uses: actions/checkout@v5
106107
with:
@@ -355,7 +356,25 @@ jobs:
355356
$PRERELEASE_FLAG \
356357
--repo "${{ github.repository }}"
357358
359+
# Trigger dependent workflows
360+
# Note: We trigger explicitly because git push with GITHUB_TOKEN doesn't trigger workflows
361+
echo "Triggering agent-release-artifacts workflow for $TAG_NAME..."
362+
gh workflow run agent-release-artifacts.yml \
363+
--ref "$TAG_NAME" \
364+
--repo "${{ github.repository }}" || {
365+
echo "Warning: Failed to trigger agent-release-artifacts workflow."
366+
}
367+
368+
echo "Triggering rust-docker workflow for $TAG_NAME (including arm64)..."
369+
gh workflow run rust-docker.yml \
370+
--ref "$TAG_NAME" \
371+
--field include_arm64=true \
372+
--repo "${{ github.repository }}" || {
373+
echo "Warning: Failed to trigger rust-docker workflow."
374+
}
375+
358376
echo "$RELEASE_TYPE $TAG_NAME published successfully!" >> $GITHUB_STEP_SUMMARY
359377
[ "$IS_PRERELEASE" = "true" ] && echo "This is marked as a pre-release on GitHub." >> $GITHUB_STEP_SUMMARY
360378
echo "" >> $GITHUB_STEP_SUMMARY
361-
echo "Binary artifacts will be built automatically by the agent-release-artifacts workflow." >> $GITHUB_STEP_SUMMARY
379+
echo "Binary artifacts will be built by the agent-release-artifacts workflow." >> $GITHUB_STEP_SUMMARY
380+
echo "Docker images will be built by the rust-docker workflow." >> $GITHUB_STEP_SUMMARY

.github/workflows/rust.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ concurrency:
1818
env:
1919
CARGO_TERM_COLOR: always
2020
RUST_BACKTRACE: full
21-
MIN_LANDERCOVERAGE_PERCENTAGE: 19
21+
MIN_LANDERCOVERAGE_PERCENTAGE: 15
2222
RUSTC_WRAPPER: sccache
2323

2424
jobs:

0 commit comments

Comments
 (0)