From fcbaab5acdfa8ba9f1c0c24a69fd01f7b113ab76 Mon Sep 17 00:00:00 2001 From: Greg Medding Date: Wed, 10 Apr 2024 19:39:08 -0700 Subject: [PATCH] Alternate option: just cache the results, rebuild when new commits --- .github/workflows/ci.yml | 31 +++++++------------------------ 1 file changed, 7 insertions(+), 24 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fd545ab..e740f15 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,33 +23,16 @@ jobs: git clone https://github.com/eclipse-zenoh/zenoh-c.git cd zenoh-c && git rev-parse HEAD > .gh_head_rev && cat .gh_head_rev - - name: Cached rust + c build - uses: Swatinem/rust-cache@v2 + - name: Cache compiled zenoh-c library + id: cache-libzenohc + uses: actions/cache@v4 with: - #shared-key: zenohc - key: ${{ hashFiles('zenoh-c/.gh_head_rev') }} - workspaces: | - zenoh-c - cache-directories: | - zenoh-c/build - -# - name: Cached Cargo files -# uses: actions/cache@v4 -# with: -# key: zenohc-cargo-${{ hashFiles('zenoh-c/.gh_head_rev') }} -# restore-keys: | -# zenohc-cargo- -# path: | -# ~/.cargo - -# - name: Cached Zenoh-C build -# uses: actions/cache@v4 -# with: -# key: zenohc-${{ hashFiles('zenoh-c/.gh_head_rev') }} -# path: | -# zenoh-c/build + key: libzenohc-${{ hashFiles('zenoh-c/.gh_head_rev') }} + path: | + ~/local - name: Build and install Zenoh-C + if: ${{ steps.cache-libzenohc.outputs.cache-hit != 'true' }} shell: bash run: | cd zenoh-c