Skip to content

Commit 18d5d03

Browse files
authored
Merge pull request #80 from poyrazK/fix/ci-timeout-and-cache
ci: add 15min timeout to build/test jobs and cache apt packages
2 parents e4a1f57 + d02abdd commit 18d5d03

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
build:
2929
needs: style-check
3030
runs-on: ubuntu-latest
31+
timeout-minutes: 15
3132
strategy:
3233
matrix:
3334
compiler: [clang++, g++]
@@ -39,10 +40,11 @@ jobs:
3940
steps:
4041
- uses: actions/checkout@v4
4142

42-
- name: Install dependencies
43-
run: |
44-
sudo apt-get update
45-
sudo apt-get install -y cmake clang clang-tidy llvm ninja-build ccache || (sleep 10 && sudo apt-get update && sudo apt-get install -y cmake clang clang-tidy llvm ninja-build ccache)
43+
- name: Cache apt packages
44+
uses: awalsh128/cache-apt-pkgs-action@latest
45+
with:
46+
packages: cmake clang clang-tidy llvm ninja-build ccache
47+
version: 1.0
4648

4749
- name: Cache ccache
4850
uses: actions/cache@v4
@@ -83,6 +85,7 @@ jobs:
8385
test:
8486
needs: build
8587
runs-on: ubuntu-latest
88+
timeout-minutes: 15
8689
strategy:
8790
matrix:
8891
compiler: [clang++, g++]

0 commit comments

Comments
 (0)