Skip to content

Commit 156c088

Browse files
authored
Merge pull request #10475 from julek-wolfssl/ci-apt-cache
ci: switch direct apt usage to install-apt-deps action
2 parents e0f1ae2 + f2bfa1b commit 156c088

2 files changed

Lines changed: 9 additions & 15 deletions

File tree

.github/workflows/linuxkm.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,13 @@ jobs:
2828
- uses: actions/checkout@v4
2929
name: Checkout wolfSSL
3030

31+
- name: Install linux-headers
32+
uses: ./.github/actions/install-apt-deps
33+
with:
34+
packages: linux-headers-$(uname -r)
35+
3136
- name: Prepare target kernel for module builds
3237
run: |
33-
echo "updating linux-headers"
34-
apt_ok=false
35-
for i in 1 2 3; do
36-
if sudo apt-get update && sudo apt-get install -y linux-headers-$(uname -r); then
37-
apt_ok=true
38-
break
39-
fi
40-
echo "::warning::apt-get failed (attempt $i/3), retrying..."
41-
sleep $((5 * i))
42-
done
43-
if [ "$apt_ok" != true ]; then exit 2; fi
4438
echo "preparing target kernel $(uname -r)"
4539
pushd "/lib/modules/$(uname -r)/build" || $(exit 4)
4640
if [ -f /proc/config.gz ]; then gzip -dc /proc/config.gz > /tmp/.config && sudo mv /tmp/.config . || $(exit 5); elif [ -f "/boot/config-$(uname -r)" ]; then sudo cp -p "/boot/config-$(uname -r)" .config || $(exit 6); fi

.github/workflows/multi-arch.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ jobs:
5656
# This should be a safe limit for the tests to run.
5757
timeout-minutes: 10
5858
steps:
59-
- name: Install Compiler
60-
run: |
61-
sudo apt update
62-
sudo apt install -y crossbuild-essential-${{ matrix.ARCH }} qemu-user
6359
- uses: actions/checkout@v4
60+
- name: Install Compiler
61+
uses: ./.github/actions/install-apt-deps
62+
with:
63+
packages: crossbuild-essential-${{ matrix.ARCH }} qemu-user
6464
- name: Build for ${{ matrix.ARCH }} with ${{ matrix.opts.name }}
6565
env:
6666
CC: ${{ matrix.CC }}

0 commit comments

Comments
 (0)