-
Notifications
You must be signed in to change notification settings - Fork 93
116 lines (106 loc) · 3.8 KB
/
programs.yml
File metadata and controls
116 lines (106 loc) · 3.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
on:
push:
branches:
- main
paths:
- "programs/**"
- "program-tests/**"
- "program-libs/**"
- "prover/client/**"
- ".github/workflows/light-system-programs-tests.yml"
pull_request:
branches:
- "*"
paths:
- "programs/**"
- "program-tests/**"
- "program-libs/**"
- "prover/client/**"
- ".github/workflows/light-system-programs-tests.yml"
types:
- opened
- synchronize
- reopened
- ready_for_review
name: programs
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
system-programs:
name: programs
if: github.event.pull_request.draft == false
runs-on: warp-ubuntu-latest-x64-4x
timeout-minutes: 90
services:
redis:
image: redis:8.0.1
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
REDIS_URL: redis://localhost:6379
strategy:
matrix:
include:
- program: account-compression-and-registry
test-targets: '["test-account-compression", "test-registry"]'
- program: light-system-program-address
test-targets: '["test-system-address", "test-e2e", "test-compressed-token-light-token"]'
- program: light-system-program-compression
test-targets: '["test-system-compression", "test-system-re-init"]'
- program: compressed-token-and-e2e
test-targets: '["test-compressed-token-unit", "test-compressed-token-v1", "test-compressed-token-mint"]'
- program: compressed-token-batched-tree
test-targets: '["test-compressed-token-batched-tree"]'
- program: system-cpi-test
test-targets: '["test-system-cpi", "test-system-program-pinocchio", "test-system-cpi-v2", "test-system-cpi-v2-event-parse", "test-compressed-token-transfer2"]'
- program: system-cpi-test-v2-functional-read-only
test-targets: '["test-system-cpi-v2-functional-read-only"]'
- program: system-cpi-test-v2-functional-account-infos
test-targets: '["test-system-cpi-v2-functional-account-infos"]'
steps:
- name: Checkout sources
uses: actions/checkout@v6
- name: Setup and build
uses: ./.github/actions/setup-and-build
with:
skip-components: "redis,disk-cleanup"
cache-key: "rust"
- name: Build CLI
run: |
just cli::build
- name: ${{ matrix.program }}
run: |
IFS=',' read -r -a test_targets <<< "${{ join(fromJSON(matrix['test-targets']), ', ') }}"
for target in "${test_targets[@]}"
do
echo "Running: just program-tests::$target"
# Retry logic for flaky batched-tree test
if [[ "$target" == "test-compressed-token-batched-tree" ]]; then
echo "Running flaky test with retry logic (max 3 attempts)..."
attempt=1
max_attempts=3
until just program-tests::"$target"; do
attempt=$((attempt + 1))
if [ $attempt -gt $max_attempts ]; then
echo "Test failed after $max_attempts attempts"
exit 1
fi
echo "Attempt $attempt/$max_attempts failed, retrying..."
sleep 5
done
echo "Test passed on attempt $attempt"
else
just program-tests::"$target"
# Run additional e2e-all test after e2e test
if [ "$target" == "test-e2e" ]; then
echo "Running: just program-tests::test-e2e-all"
just program-tests::test-e2e-all
fi
fi
done