Skip to content

Commit 0d7f89f

Browse files
chore: remove inlined lake-build-with-retry.sh from workflow
1 parent f955171 commit 0d7f89f

4 files changed

Lines changed: 0 additions & 204 deletions

File tree

.github/build.in.yml

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -148,57 +148,6 @@ jobs:
148148
ls .lake/build/bin/check-yaml
149149
ls .lake/packages/importGraph/.lake/build/bin/graph
150150
151-
# TEMPORARY: remove everything below this after #27691 is merged
152-
cat << 'EOF' > scripts/lake-build-with-retry.sh
153-
#!/bin/bash
154-
# Script to run lake build on a target until --no-build succeeds
155-
# Usage: ./lake-build-with-retry.sh <target_name> [max_tries, default: 5]
156-
157-
# Make this script robust against unintentional errors.
158-
# See e.g. http://redsymbol.net/articles/unofficial-bash-strict-mode/ for explanation.
159-
set -euo pipefail
160-
IFS=$'\n\t'
161-
162-
TARGET_NAME="$1"
163-
MAX_TRIES="${2:-5}"
164-
165-
if [ -z "$TARGET_NAME" ]; then
166-
echo "Usage: $0 <target_name> [max_tries, default: 5]"
167-
echo "Example: $0 Mathlib 5"
168-
exit 1
169-
fi
170-
171-
echo "Building $TARGET_NAME with up to $MAX_TRIES attempts..."
172-
173-
counter=0
174-
while true; do
175-
counter=$((counter + 1))
176-
177-
echo "::group::{lake build: attempt $counter}"
178-
bash -o pipefail -c "env LEAN_ABORT_ON_PANIC=1 lake build --wfail -KCI $TARGET_NAME"
179-
echo "::endgroup::"
180-
181-
echo "::group::{lake build --no-build: attempt $counter}"
182-
set +e
183-
lake build --no-build -v "$TARGET_NAME"
184-
result=$?
185-
set -e
186-
echo "::endgroup::"
187-
188-
if [ $result -eq 0 ]; then
189-
echo "lake build --no-build succeeded!"
190-
exit 0
191-
fi
192-
193-
if [ $counter -ge $MAX_TRIES ]; then
194-
echo "Failed to build good oleans for $TARGET_NAME after $MAX_TRIES attempts!"
195-
exit 1
196-
fi
197-
done
198-
EOF
199-
200-
chmod 755 scripts/lake-build-with-retry.sh
201-
202151
- name: cleanup .cache/mathlib
203152
# This needs write access to .cache/mathlib, so can't be run inside landrun.
204153
# However it is only using the `master` version of `cache`, so is safe to run outside landrun.

.github/workflows/bors.yml

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -158,57 +158,6 @@ jobs:
158158
ls .lake/build/bin/check-yaml
159159
ls .lake/packages/importGraph/.lake/build/bin/graph
160160
161-
# TEMPORARY: remove everything below this after #27691 is merged
162-
cat << 'EOF' > scripts/lake-build-with-retry.sh
163-
#!/bin/bash
164-
# Script to run lake build on a target until --no-build succeeds
165-
# Usage: ./lake-build-with-retry.sh <target_name> [max_tries, default: 5]
166-
167-
# Make this script robust against unintentional errors.
168-
# See e.g. http://redsymbol.net/articles/unofficial-bash-strict-mode/ for explanation.
169-
set -euo pipefail
170-
IFS=$'\n\t'
171-
172-
TARGET_NAME="$1"
173-
MAX_TRIES="${2:-5}"
174-
175-
if [ -z "$TARGET_NAME" ]; then
176-
echo "Usage: $0 <target_name> [max_tries, default: 5]"
177-
echo "Example: $0 Mathlib 5"
178-
exit 1
179-
fi
180-
181-
echo "Building $TARGET_NAME with up to $MAX_TRIES attempts..."
182-
183-
counter=0
184-
while true; do
185-
counter=$((counter + 1))
186-
187-
echo "::group::{lake build: attempt $counter}"
188-
bash -o pipefail -c "env LEAN_ABORT_ON_PANIC=1 lake build --wfail -KCI $TARGET_NAME"
189-
echo "::endgroup::"
190-
191-
echo "::group::{lake build --no-build: attempt $counter}"
192-
set +e
193-
lake build --no-build -v "$TARGET_NAME"
194-
result=$?
195-
set -e
196-
echo "::endgroup::"
197-
198-
if [ $result -eq 0 ]; then
199-
echo "lake build --no-build succeeded!"
200-
exit 0
201-
fi
202-
203-
if [ $counter -ge $MAX_TRIES ]; then
204-
echo "Failed to build good oleans for $TARGET_NAME after $MAX_TRIES attempts!"
205-
exit 1
206-
fi
207-
done
208-
EOF
209-
210-
chmod 755 scripts/lake-build-with-retry.sh
211-
212161
- name: cleanup .cache/mathlib
213162
# This needs write access to .cache/mathlib, so can't be run inside landrun.
214163
# However it is only using the `master` version of `cache`, so is safe to run outside landrun.

.github/workflows/build.yml

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -165,57 +165,6 @@ jobs:
165165
ls .lake/build/bin/check-yaml
166166
ls .lake/packages/importGraph/.lake/build/bin/graph
167167
168-
# TEMPORARY: remove everything below this after #27691 is merged
169-
cat << 'EOF' > scripts/lake-build-with-retry.sh
170-
#!/bin/bash
171-
# Script to run lake build on a target until --no-build succeeds
172-
# Usage: ./lake-build-with-retry.sh <target_name> [max_tries, default: 5]
173-
174-
# Make this script robust against unintentional errors.
175-
# See e.g. http://redsymbol.net/articles/unofficial-bash-strict-mode/ for explanation.
176-
set -euo pipefail
177-
IFS=$'\n\t'
178-
179-
TARGET_NAME="$1"
180-
MAX_TRIES="${2:-5}"
181-
182-
if [ -z "$TARGET_NAME" ]; then
183-
echo "Usage: $0 <target_name> [max_tries, default: 5]"
184-
echo "Example: $0 Mathlib 5"
185-
exit 1
186-
fi
187-
188-
echo "Building $TARGET_NAME with up to $MAX_TRIES attempts..."
189-
190-
counter=0
191-
while true; do
192-
counter=$((counter + 1))
193-
194-
echo "::group::{lake build: attempt $counter}"
195-
bash -o pipefail -c "env LEAN_ABORT_ON_PANIC=1 lake build --wfail -KCI $TARGET_NAME"
196-
echo "::endgroup::"
197-
198-
echo "::group::{lake build --no-build: attempt $counter}"
199-
set +e
200-
lake build --no-build -v "$TARGET_NAME"
201-
result=$?
202-
set -e
203-
echo "::endgroup::"
204-
205-
if [ $result -eq 0 ]; then
206-
echo "lake build --no-build succeeded!"
207-
exit 0
208-
fi
209-
210-
if [ $counter -ge $MAX_TRIES ]; then
211-
echo "Failed to build good oleans for $TARGET_NAME after $MAX_TRIES attempts!"
212-
exit 1
213-
fi
214-
done
215-
EOF
216-
217-
chmod 755 scripts/lake-build-with-retry.sh
218-
219168
- name: cleanup .cache/mathlib
220169
# This needs write access to .cache/mathlib, so can't be run inside landrun.
221170
# However it is only using the `master` version of `cache`, so is safe to run outside landrun.

.github/workflows/build_fork.yml

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -162,57 +162,6 @@ jobs:
162162
ls .lake/build/bin/check-yaml
163163
ls .lake/packages/importGraph/.lake/build/bin/graph
164164
165-
# TEMPORARY: remove everything below this after #27691 is merged
166-
cat << 'EOF' > scripts/lake-build-with-retry.sh
167-
#!/bin/bash
168-
# Script to run lake build on a target until --no-build succeeds
169-
# Usage: ./lake-build-with-retry.sh <target_name> [max_tries, default: 5]
170-
171-
# Make this script robust against unintentional errors.
172-
# See e.g. http://redsymbol.net/articles/unofficial-bash-strict-mode/ for explanation.
173-
set -euo pipefail
174-
IFS=$'\n\t'
175-
176-
TARGET_NAME="$1"
177-
MAX_TRIES="${2:-5}"
178-
179-
if [ -z "$TARGET_NAME" ]; then
180-
echo "Usage: $0 <target_name> [max_tries, default: 5]"
181-
echo "Example: $0 Mathlib 5"
182-
exit 1
183-
fi
184-
185-
echo "Building $TARGET_NAME with up to $MAX_TRIES attempts..."
186-
187-
counter=0
188-
while true; do
189-
counter=$((counter + 1))
190-
191-
echo "::group::{lake build: attempt $counter}"
192-
bash -o pipefail -c "env LEAN_ABORT_ON_PANIC=1 lake build --wfail -KCI $TARGET_NAME"
193-
echo "::endgroup::"
194-
195-
echo "::group::{lake build --no-build: attempt $counter}"
196-
set +e
197-
lake build --no-build -v "$TARGET_NAME"
198-
result=$?
199-
set -e
200-
echo "::endgroup::"
201-
202-
if [ $result -eq 0 ]; then
203-
echo "lake build --no-build succeeded!"
204-
exit 0
205-
fi
206-
207-
if [ $counter -ge $MAX_TRIES ]; then
208-
echo "Failed to build good oleans for $TARGET_NAME after $MAX_TRIES attempts!"
209-
exit 1
210-
fi
211-
done
212-
EOF
213-
214-
chmod 755 scripts/lake-build-with-retry.sh
215-
216165
- name: cleanup .cache/mathlib
217166
# This needs write access to .cache/mathlib, so can't be run inside landrun.
218167
# However it is only using the `master` version of `cache`, so is safe to run outside landrun.

0 commit comments

Comments
 (0)