From 30bc92407e2411d1ae3199daf2aed9fbe16734e7 Mon Sep 17 00:00:00 2001 From: StefanCostea Date: Fri, 29 Nov 2024 01:59:09 +0100 Subject: [PATCH] Cache apt packets in compile CI --- .github/workflows/compile-check.yaml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/compile-check.yaml b/.github/workflows/compile-check.yaml index e25493b..baacb75 100644 --- a/.github/workflows/compile-check.yaml +++ b/.github/workflows/compile-check.yaml @@ -14,17 +14,26 @@ jobs: runs-on: ubuntu-latest steps: - # Step 1: Checkout the repository + # Step 1: Cache apt package archives + - name: Cache apt archives + uses: actions/cache@v3 + with: + path: /var/cache/apt/archives + key: ${{ runner.os }}-apt-${{ hashFiles('CMakeLists.txt') }} + restore-keys: | + ${{ runner.os }}-apt- + + # Step 2: Checkout the repository - name: Checkout repository uses: actions/checkout@v3 - # Step 2: Set up CMake + # Step 3: Set up CMake - name: Set up CMake uses: jwlawson/actions-setup-cmake@v1 with: cmake-version: "3.26" - # Step 3: Install dependencies (e.g., build tools) + # Step 4: Install dependencies (e.g., build tools) - name: Install dependencies run: | sudo apt-get update @@ -32,14 +41,14 @@ jobs: sudo apt install pybind11-dev sudo apt-get install libboost-all-dev - # Step 4: Configure the project with CMake + # Step 5: Configure the project with CMake - name: Configure with CMake run: | mkdir build cd build cmake .. - # Step 5: Build the project + # Step 6: Build the project - name: Build the project run: | cd build