Skip to content

Commit 2a89172

Browse files
authored
Merge pull request #605 from gojimmypi/pr-timeout
Address workflow timeout, full apt-get source replacements
2 parents 62ce4cf + 92c765e commit 2a89172

File tree

7 files changed

+131
-17
lines changed

7 files changed

+131
-17
lines changed

.github/workflows/test-build-aarch64.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919
build:
2020
runs-on: ubuntu-24.04
21-
timeout-minutes: 15
21+
timeout-minutes: 30
2222

2323
steps:
2424
- uses: actions/checkout@v4

.github/workflows/test-build-lms.yml

Lines changed: 42 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919
build:
2020
runs-on: ubuntu-latest
21-
timeout-minutes: 15
21+
timeout-minutes: 30
2222

2323
steps:
2424
- uses: actions/checkout@v4
@@ -27,10 +27,48 @@ jobs:
2727

2828
- name: Workaround for sources.list
2929
run: |
30-
# workaround disabled, splitting the load between azure and arizona.edu to avoid timeouts
30+
# Replace sources
3131
32-
# See reference code in test-build.yml for various sources that may be updated. Enable as needed here.
33-
echo "Workaround for sources.list disabled for this workflow"
32+
set -euxo pipefail
33+
34+
# Peek (what repos are active now)
35+
apt-cache policy
36+
grep -RInE '^(deb|Types|URIs)' /etc/apt || true
37+
38+
# Enable nullglob so *.list/*.sources that don't exist don't break sed
39+
shopt -s nullglob
40+
41+
echo "Replace sources.list (legacy)"
42+
sudo sed -i \
43+
-e "s|https\?://azure\.archive\.ubuntu\.com/ubuntu/?|http://mirror.arizona.edu/ubuntu/|g" \
44+
/etc/apt/sources.list || true
45+
46+
echo "Replace sources.list.d/*.list (legacy)"
47+
for f in /etc/apt/sources.list.d/*.list; do
48+
sudo sed -i \
49+
-e "s|https\?://azure\.archive\.ubuntu\.com/ubuntu/?|http://mirror.arizona.edu/ubuntu/|g" \
50+
"$f"
51+
done
52+
53+
echo "Replace sources.list.d/*.sources (deb822)"
54+
for f in /etc/apt/sources.list.d/*.sources; do
55+
sudo sed -i \
56+
-e "s|https\?://azure\.archive\.ubuntu\.com/ubuntu/?|http://mirror.arizona.edu/ubuntu/|g" \
57+
-e "s|https\?://azure\.archive\.ubuntu\.com|http://mirror.arizona.edu|g" \
58+
"$f"
59+
done
60+
61+
echo "Fix /etc/apt/apt-mirrors.txt (used by URIs: mirror+file:...)"
62+
if grep -qE '^[[:space:]]*https?://azure\.archive\.ubuntu\.com/ubuntu/?' /etc/apt/apt-mirrors.txt; then
63+
# Replace azure with our mirror (idempotent)
64+
sudo sed -i 's|https\?://azure\.archive\.ubuntu\.com/ubuntu/|http://mirror.arizona.edu/ubuntu/|g' /etc/apt/apt-mirrors.txt
65+
fi
66+
67+
# Peek (verify changes)
68+
grep -RIn "azure.archive.ubuntu.com" /etc/apt || true
69+
grep -RInE '^(deb|Types|URIs)' /etc/apt || true
70+
echo "--- apt-mirrors.txt ---"
71+
cat /etc/apt/apt-mirrors.txt || true
3472
3573
- name: Update repository
3674
run: sudo apt-get update

.github/workflows/test-build-mcux-sdk.yml

Lines changed: 42 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919
build:
2020
runs-on: ubuntu-latest
21-
timeout-minutes: 15
21+
timeout-minutes: 30
2222

2323
steps:
2424
- uses: actions/checkout@v4
@@ -37,10 +37,48 @@ jobs:
3737

3838
- name: Workaround for sources.list
3939
run: |
40-
# workaround disabled, splitting the load between azure and arizona.edu to avoid timeouts
40+
# Replace sources
4141
42-
# See reference code in test-build.yml for various sources that may be updated. Enable as needed here.
43-
echo "Workaround for sources.list disabled for this workflow"
42+
set -euxo pipefail
43+
44+
# Peek (what repos are active now)
45+
apt-cache policy
46+
grep -RInE '^(deb|Types|URIs)' /etc/apt || true
47+
48+
# Enable nullglob so *.list/*.sources that don't exist don't break sed
49+
shopt -s nullglob
50+
51+
echo "Replace sources.list (legacy)"
52+
sudo sed -i \
53+
-e "s|https\?://azure\.archive\.ubuntu\.com/ubuntu/?|http://mirror.arizona.edu/ubuntu/|g" \
54+
/etc/apt/sources.list || true
55+
56+
echo "Replace sources.list.d/*.list (legacy)"
57+
for f in /etc/apt/sources.list.d/*.list; do
58+
sudo sed -i \
59+
-e "s|https\?://azure\.archive\.ubuntu\.com/ubuntu/?|http://mirror.arizona.edu/ubuntu/|g" \
60+
"$f"
61+
done
62+
63+
echo "Replace sources.list.d/*.sources (deb822)"
64+
for f in /etc/apt/sources.list.d/*.sources; do
65+
sudo sed -i \
66+
-e "s|https\?://azure\.archive\.ubuntu\.com/ubuntu/?|http://mirror.arizona.edu/ubuntu/|g" \
67+
-e "s|https\?://azure\.archive\.ubuntu\.com|http://mirror.arizona.edu|g" \
68+
"$f"
69+
done
70+
71+
echo "Fix /etc/apt/apt-mirrors.txt (used by URIs: mirror+file:...)"
72+
if grep -qE '^[[:space:]]*https?://azure\.archive\.ubuntu\.com/ubuntu/?' /etc/apt/apt-mirrors.txt; then
73+
# Replace azure with our mirror (idempotent)
74+
sudo sed -i 's|https\?://azure\.archive\.ubuntu\.com/ubuntu/|http://mirror.arizona.edu/ubuntu/|g' /etc/apt/apt-mirrors.txt
75+
fi
76+
77+
# Peek (verify changes)
78+
grep -RIn "azure.archive.ubuntu.com" /etc/apt || true
79+
grep -RInE '^(deb|Types|URIs)' /etc/apt || true
80+
echo "--- apt-mirrors.txt ---"
81+
cat /etc/apt/apt-mirrors.txt || true
4482
4583
- name: Update repository
4684
run: sudo apt-get update

.github/workflows/test-build-pico-sdk.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121

2222
build:
2323
runs-on: ubuntu-latest
24-
timeout-minutes: 15
24+
timeout-minutes: 30
2525

2626
steps:
2727
- uses: actions/checkout@v3

.github/workflows/test-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919
build:
2020
runs-on: ubuntu-24.04
21-
timeout-minutes: 15
21+
timeout-minutes: 30
2222

2323
steps:
2424
- uses: actions/checkout@v4

.github/workflows/test-sunnyday-simulator.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
jobs:
1010
simulator_tests:
1111
runs-on: ubuntu-latest
12-
timeout-minutes: 15
12+
timeout-minutes: 30
1313

1414
steps:
1515
- uses: actions/checkout@v4

.github/workflows/test-wolfhsm-simulator.yml

Lines changed: 43 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
fail-fast: false
2727

2828
runs-on: ubuntu-latest
29-
timeout-minutes: 15
29+
timeout-minutes: 30
3030

3131
steps:
3232
- uses: actions/checkout@v4
@@ -35,10 +35,48 @@ jobs:
3535

3636
- name: Workaround for sources.list
3737
run: |
38-
# workaround disabled, splitting the load between azure and arizona.edu to avoid timeouts
39-
40-
# See reference code in test-build.yml for various sources that may be updated. Enable as needed here.
41-
echo "Workaround for sources.list disabled for this workflow"
38+
# Replace sources
39+
40+
set -euxo pipefail
41+
42+
# Peek (what repos are active now)
43+
apt-cache policy
44+
grep -RInE '^(deb|Types|URIs)' /etc/apt || true
45+
46+
# Enable nullglob so *.list/*.sources that don't exist don't break sed
47+
shopt -s nullglob
48+
49+
echo "Replace sources.list (legacy)"
50+
sudo sed -i \
51+
-e "s|https\?://azure\.archive\.ubuntu\.com/ubuntu/?|http://mirror.arizona.edu/ubuntu/|g" \
52+
/etc/apt/sources.list || true
53+
54+
echo "Replace sources.list.d/*.list (legacy)"
55+
for f in /etc/apt/sources.list.d/*.list; do
56+
sudo sed -i \
57+
-e "s|https\?://azure\.archive\.ubuntu\.com/ubuntu/?|http://mirror.arizona.edu/ubuntu/|g" \
58+
"$f"
59+
done
60+
61+
echo "Replace sources.list.d/*.sources (deb822)"
62+
for f in /etc/apt/sources.list.d/*.sources; do
63+
sudo sed -i \
64+
-e "s|https\?://azure\.archive\.ubuntu\.com/ubuntu/?|http://mirror.arizona.edu/ubuntu/|g" \
65+
-e "s|https\?://azure\.archive\.ubuntu\.com|http://mirror.arizona.edu|g" \
66+
"$f"
67+
done
68+
69+
echo "Fix /etc/apt/apt-mirrors.txt (used by URIs: mirror+file:...)"
70+
if grep -qE '^[[:space:]]*https?://azure\.archive\.ubuntu\.com/ubuntu/?' /etc/apt/apt-mirrors.txt; then
71+
# Replace azure with our mirror (idempotent)
72+
sudo sed -i 's|https\?://azure\.archive\.ubuntu\.com/ubuntu/|http://mirror.arizona.edu/ubuntu/|g' /etc/apt/apt-mirrors.txt
73+
fi
74+
75+
# Peek (verify changes)
76+
grep -RIn "azure.archive.ubuntu.com" /etc/apt || true
77+
grep -RInE '^(deb|Types|URIs)' /etc/apt || true
78+
echo "--- apt-mirrors.txt ---"
79+
cat /etc/apt/apt-mirrors.txt || true
4280
4381
- name: Update repository
4482
run: sudo apt-get update

0 commit comments

Comments
 (0)