Skip to content

Commit 20cb1eb

Browse files
committed
CI: retry apt-get and time-limit install steps
Every workflow that installs packages now passes Acquire::Retries=3 to apt-get, and each install step gets its own timeout, sized to fit inside its job's limit, so a stalled mirror fails fast under a step name that says what went wrong. - cppcheck runs apt-get update before installing, and installs with -y - sftp-test and sshd-test move their inline installs into their own steps - test-fatfs job timeout goes from 4 to 10 minutes to hold its installs
1 parent 1ddd486 commit 20cb1eb

11 files changed

Lines changed: 48 additions & 27 deletions

‎.github/workflows/code-coverage.yml‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,10 @@ jobs:
5656

5757
# clang 18 is the min: -fcoverage-mcdc does not exist before it.
5858
- name: Install clang and LLVM coverage tools
59+
timeout-minutes: 5
5960
run: |
60-
sudo apt-get update
61-
sudo apt-get install -y clang-18 llvm-18 libclang-rt-18-dev
61+
sudo apt-get -o Acquire::Retries=3 update
62+
sudo apt-get -o Acquire::Retries=3 install -y clang-18 llvm-18 libclang-rt-18-dev
6263
6364
- name: Download wolfSSL
6465
uses: actions/download-artifact@v8

‎.github/workflows/cppcheck.yml‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ jobs:
1616

1717
- name: Install cppcheck
1818
if: always()
19-
run: sudo apt-get install cppcheck
19+
timeout-minutes: 5
20+
run: |
21+
sudo apt-get -o Acquire::Retries=3 update
22+
sudo apt-get -o Acquire::Retries=3 install -y cppcheck
2023
2124
- name: Run CppCheck
2225
id: cpp_check_run

‎.github/workflows/multi-compiler.yml‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,10 @@ jobs:
6565

6666
steps:
6767
- name: Install compiler
68+
timeout-minutes: 5
6869
run: |
69-
sudo apt-get update
70-
sudo apt-get install -y ${{ matrix.cc }}
70+
sudo apt-get -o Acquire::Retries=3 update
71+
sudo apt-get -o Acquire::Retries=3 install -y ${{ matrix.cc }}
7172
7273
- name: Checkout wolfSSH
7374
uses: actions/checkout@v6

‎.github/workflows/network-contention-test.yml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ jobs:
108108
run: ./scripts/sftp.test
109109

110110
- name: Install expect for extended tests
111-
run: sudo apt-get update && sudo apt-get install -y expect
111+
timeout-minutes: 2
112+
run: sudo apt-get -o Acquire::Retries=3 update && sudo apt-get -o Acquire::Retries=3 install -y expect
112113

113114
- name: Create large test files
114115
working-directory: ./wolfssh/

‎.github/workflows/paramiko-sftp-test.yml‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,10 @@ jobs:
6767
run: make
6868

6969
- name: Install dependencies
70+
timeout-minutes: 5
7071
run: |
71-
sudo apt-get update
72-
sudo apt-get install -y python3-pip openssh-client
72+
sudo apt-get -o Acquire::Retries=3 update
73+
sudo apt-get -o Acquire::Retries=3 install -y python3-pip openssh-client
7374
python3 -m pip install paramiko
7475
7576
- name: Create test directories

‎.github/workflows/sftp-test.yml‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,12 @@ jobs:
106106
echo "Echoserver started with PID: $!"
107107
sleep 2 # Give the server time to start
108108
109+
- name: Install expect
110+
timeout-minutes: 2
111+
run: |
112+
sudo apt-get -o Acquire::Retries=3 update
113+
sudo apt-get -o Acquire::Retries=3 install -y expect
114+
109115
- name: Run SFTP test
110116
working-directory: ./wolfssh/
111117
run: |
@@ -124,9 +130,6 @@ jobs:
124130
EOF
125131
chmod +x /tmp/sftp_test.exp
126132
127-
# Install expect
128-
sudo apt-get update && sudo apt-get install -y expect
129-
130133
# Run the expect script
131134
/tmp/sftp_test.exp
132135

‎.github/workflows/sshd-test.yml‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,17 @@ jobs:
125125
sudo ./run_all_sshd_tests.sh
126126
127127
# could use optimization with caching
128+
- name: Install valgrind
129+
if: matrix.extra_flags == ''
130+
timeout-minutes: 2
131+
run: |
132+
sudo apt-get -o Acquire::Retries=3 -y update
133+
sudo apt-get -o Acquire::Retries=3 -y install valgrind
134+
128135
- name: Test memory after close down
129136
working-directory: ./wolfssh/
130137
if: matrix.extra_flags == ''
131138
run: |
132-
sudo apt-get -y update
133-
sudo apt-get -y install valgrind
134139
touch sshd_config.txt
135140
./configure --enable-all LDFLAGS="-L${{ github.workspace }}/build-dir/lib" CPPFLAGS="-I${{ github.workspace }}/build-dir/include -DWOLFSSH_NO_FPKI -DWOLFSSH_NO_SFTP_TIMEOUT -DWOLFSSH_MAX_SFTP_RW=4000000 -DMAX_PATH_SZ=120" --enable-static --disable-shared && make
136141
# wolfSSHd loads the host key through the secure gate; the daemon runs

‎.github/workflows/test-fatfs.yml‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
name: Test wolfSSH with FatFS
3131
needs: get-fatfs
3232
runs-on: ubuntu-latest
33-
timeout-minutes: 4
33+
timeout-minutes: 10
3434
steps:
3535
- name: Checkout code
3636
uses: actions/checkout@v6
@@ -43,9 +43,10 @@ jobs:
4343
fail-on-cache-miss: true
4444

4545
- name: Install dependencies
46+
timeout-minutes: 3
4647
run: |
47-
sudo apt-get update
48-
sudo apt-get install -y build-essential autoconf automake libtool pkg-config openssh-server dosfstools
48+
sudo apt-get -o Acquire::Retries=3 update
49+
sudo apt-get -o Acquire::Retries=3 install -y build-essential autoconf automake libtool pkg-config openssh-server dosfstools
4950
5051
- name: Build wolfSSL
5152
uses: wolfSSL/actions-build-autotools-project@v1
@@ -89,9 +90,10 @@ jobs:
8990
chmod 600 ~/.ssh/config
9091
9192
- name: Install expect
93+
timeout-minutes: 2
9294
run: |
93-
sudo apt-get update
94-
sudo apt-get install -y expect
95+
sudo apt-get -o Acquire::Retries=3 update
96+
sudo apt-get -o Acquire::Retries=3 install -y expect
9597
9698
- name: Run wolfsftp client to get file
9799
run: |

‎.github/workflows/tpm-ssh.yml‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,11 @@ jobs:
4040
path: wolftpm
4141

4242
- name: Install Dependencies
43+
timeout-minutes: 10
4344
run: |
44-
sudo apt-get update
45-
sudo apt-get install -y libtool automake autoconf
46-
sudo apt-get install -y build-essential git autoconf-archive \
45+
sudo apt-get -o Acquire::Retries=3 update
46+
sudo apt-get -o Acquire::Retries=3 install -y libtool automake autoconf
47+
sudo apt-get -o Acquire::Retries=3 install -y build-essential git autoconf-archive \
4748
libcmocka-dev libssl-dev uthash-dev libglib2.0-dev \
4849
tpm2-tools openssh-client sshpass
4950

‎.github/workflows/windows-cert-store-test.yml‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,9 +298,10 @@ jobs:
298298
- uses: actions/checkout@v4
299299

300300
- name: Install mingw toolchain and autotools
301+
timeout-minutes: 5
301302
run: |
302-
sudo apt-get update
303-
sudo apt-get install -y gcc-mingw-w64-x86-64 autoconf automake libtool
303+
sudo apt-get -o Acquire::Retries=3 update
304+
sudo apt-get -o Acquire::Retries=3 install -y gcc-mingw-w64-x86-64 autoconf automake libtool
304305
305306
- name: Generate configure
306307
run: ./autogen.sh

0 commit comments

Comments
 (0)