-
Notifications
You must be signed in to change notification settings - Fork 28
115 lines (92 loc) · 3.33 KB
/
Copy pathbootstrap.yml
File metadata and controls
115 lines (92 loc) · 3.33 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
name: Bootstrap ya-bin
on:
push:
branches: [main]
paths: ['devtools/ya/bootstrap/graph.json']
workflow_dispatch: # allow manual runs for debugging
jobs:
bootstrap:
runs-on: self-hosted
if: github.ref == 'refs/heads/main'
timeout-minutes: 180
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Run bootstrap (stage 1 + stage 2)
run: |
mkdir -p "$RUNNER_TEMP/ya-bootstrap-result"
python3 devtools/ya/bootstrap/run_bootstrap.py \
--source-root "$GITHUB_WORKSPACE" \
--result-root "$RUNNER_TEMP/ya-bootstrap-result" \
--all-platforms-build \
--cleanup
- name: Verify stage 1 artifacts
run: |
set -euo pipefail
STAGE1="$RUNNER_TEMP/ya-bootstrap-result/stage1"
echo "=== Checking stage1 artifacts in $STAGE1 ==="
for bin in ya-bin ymake; do
path="$STAGE1/$bin"
if [ ! -f "$path" ]; then
echo "ERROR: $path not found"
exit 1
fi
echo "--- Running $bin --help ---"
"$path" --help
echo "OK: $bin exited with code $?"
done
- name: Verify stage 2 artifacts
run: |
set -euo pipefail
STAGE2="$RUNNER_TEMP/ya-bootstrap-result/stage2"
PLATFORM_LIST="$GITHUB_WORKSPACE/devtools/ya/bootstrap/platform_list"
MAIN_BINS="ya-bin ymake ya-tc"
EXISTENCE_ONLY_BINS="test_tool"
ADDITIONAL_BINS="yexport"
LINUX_X86_PLATFORM="default-linux-x86_64"
echo "=== Checking stage2 artifacts in $STAGE2 ==="
while IFS= read -r platform || [ -n "$platform" ]; do
[ -z "$platform" ] && continue
echo "--- Platform: $platform ---"
# Check main binaries exist
for bin in $MAIN_BINS; do
path="$STAGE2/$platform/$bin"
if [ ! -f "$path" ]; then
echo "ERROR: $path not found"
exit 1
fi
echo "EXISTS: $path"
done
# Check existence-only binaries (no --help)
for bin in $EXISTENCE_ONLY_BINS; do
path="$STAGE2/$platform/$bin"
if [ ! -f "$path" ]; then
echo "ERROR: $path not found"
exit 1
fi
echo "EXISTS: $path"
done
# Check additional binaries exist (no --help)
for bin in $ADDITIONAL_BINS; do
path="$STAGE2/additional/$platform/$bin"
if [ ! -f "$path" ]; then
echo "ERROR: $path not found"
exit 1
fi
echo "EXISTS: $path"
done
# For linux-x86_64 also run --help and check exit code
if [ "$platform" = "$LINUX_X86_PLATFORM" ]; then
echo "--- Running --help checks for $platform ---"
for bin in $MAIN_BINS; do
path="$STAGE2/$platform/$bin"
echo "Running: $path --help"
"$path" --help
echo "OK: $bin exited with code $?"
done
fi
done < "$PLATFORM_LIST"
- name: Cleanup podman containers and images
if: always()
run: |
podman system reset -f