Skip to content

Commit

Permalink
Alternate option: just cache the results, rebuild when new commits
Browse files Browse the repository at this point in the history
  • Loading branch information
gregmedd committed Apr 11, 2024
1 parent 615c491 commit fcbaab5
Showing 1 changed file with 7 additions and 24 deletions.
31 changes: 7 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fcbaab5

Please sign in to comment.