From ca276dfe6872848087e4f3d0acc7b8d2b7fdcfe4 Mon Sep 17 00:00:00 2001 From: Daan Steenbergen Date: Sat, 6 Jan 2024 14:55:00 +0100 Subject: [PATCH] ci: enable python pip caching --- .github/workflows/build.yml | 24 ++++++++++++------------ .github/workflows/linting.yml | 3 ++- .github/workflows/pio.yml | 5 +++-- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f0b808a4..194d6676 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,6 +26,7 @@ jobs: uses: actions/setup-python@v4 with: python-version: 3.8 + cache: "pip" - name: install gcovr 5.0 run: | pip install gcovr==5.0 # 5.1 is not supported @@ -59,17 +60,16 @@ jobs: - name: Checkout uses: actions/checkout@v3 with: - ref: ${{ github.event.pull_request.head.sha }} # Check out the code of the PR head + ref: ${{ github.event.pull_request.head.sha }} # Check out the code of the PR head - name: Compile run: | - mkdir build - cmake -S . -B build -DBUILD_EXAMPLES=ON -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} - cmake --build build --config ${{ env.BUILD_TYPE }} + mkdir build + cmake -S . -B build -DBUILD_EXAMPLES=ON -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} + cmake --build build --config ${{ env.BUILD_TYPE }} - name: Test run: | - cd build - ctest -C ${{ env.BUILD_TYPE }} --rerun-failed --output-on-failure - + cd build + ctest -C ${{ env.BUILD_TYPE }} --rerun-failed --output-on-failure mac_os_build: name: Mac OS Build, Test @@ -81,10 +81,10 @@ jobs: ref: ${{ github.event.pull_request.head.sha }} # Check out the code of the PR head - name: Compile run: | - mkdir build - cmake -S . -B build -DBUILD_EXAMPLES=ON -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} - cmake --build build --config ${{ env.BUILD_TYPE }} + mkdir build + cmake -S . -B build -DBUILD_EXAMPLES=ON -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} + cmake --build build --config ${{ env.BUILD_TYPE }} - name: Test run: | - cd build - ctest -C ${{ env.BUILD_TYPE }} --rerun-failed --output-on-failure + cd build + ctest -C ${{ env.BUILD_TYPE }} --rerun-failed --output-on-failure diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml index de42857f..edd43590 100644 --- a/.github/workflows/linting.yml +++ b/.github/workflows/linting.yml @@ -24,6 +24,7 @@ jobs: uses: actions/setup-python@v4 with: python-version: 3.11 + cache: "pip" - name: Install lint tool run: | python -m pip install --upgrade pip @@ -43,4 +44,4 @@ jobs: - name: Generate Doxygen Documentation uses: mattnotmitt/doxygen-action@edge with: - doxyfile-path: 'doxyfile' + doxyfile-path: "doxyfile" diff --git a/.github/workflows/pio.yml b/.github/workflows/pio.yml index 17a1fb42..5b3af9ca 100644 --- a/.github/workflows/pio.yml +++ b/.github/workflows/pio.yml @@ -20,10 +20,11 @@ jobs: key: ${{ runner.os }}-pio - uses: actions/setup-python@v4 with: - python-version: '3.9' + python-version: "3.9" + cache: "pip" - name: Install PlatformIO Core run: pip install --upgrade platformio - name: Install AgIsoStack library in PlatformIO run: pio pkg install -g -l ./ - name: Build PlatformIO examples - run: pio run -d ${{ matrix.example }} -e local_agisostack \ No newline at end of file + run: pio run -d ${{ matrix.example }} -e local_agisostack